-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixKF5Install.bat
More file actions
48 lines (35 loc) · 1.46 KB
/
fixKF5Install.bat
File metadata and controls
48 lines (35 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal
set CRAFT_ROOT=NOTFOUND
:: Check for craft at default paths
for %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO (
for %%J IN (%%I:\CraftRoot) DO (
if EXIST "%%J" set CRAFT_ROOT=%%J
)
)
:: Check if detected, prompt manual entry if not
if "%CRAFT_ROOT%"=="NOTFOUND" (
echo Could not find Craft installation at default path [Drive:\CraftRoot].
GOTO user_prompt
)
:copy
set INSTALL_ROOT=%~dp0\install
echo Copying required files...
robocopy "%CRAFT_ROOT%\include" "%INSTALL_ROOT%\include" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\bin" "%INSTALL_ROOT%\bin" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\lib" "%INSTALL_ROOT%\lib" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\share" "%INSTALL_ROOT%\share" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\plugins" "%INSTALL_ROOT%\plugins" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\mkspecs" "%INSTALL_ROOT%\mkspecs" * /S /NJH /NFL /NDL /NJS > NUL
robocopy "%CRAFT_ROOT%\dev-utils" "%INSTALL_ROOT%\dev-utils" * /S /NJH /NFL /NDL /NJS > NUL
echo Done
GOTO:eof
:user_prompt
set /P CRAFT_ROOT="Please specify the path to the Craft Root directory: "
if not exist "%CRAFT_ROOT%" (
echo Invalid path
GOTO user_prompt
)
echo Trying "%CRAFT_ROOT%"
GOTO copy
endlocal