-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBOSS_install.bat
More file actions
50 lines (36 loc) · 1.07 KB
/
BOSS_install.bat
File metadata and controls
50 lines (36 loc) · 1.07 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
49
50
@echo off
setlocal
:: Save the original working directory
set "ORIG_DIR=%CD%"
call :RunBossInstall "App"
pause
exit /b
:: === Subroutine ===
:RunBossInstall
set "TARGET=%~1"
set "JUNCTION=C:\myTMP"
::-- Note: use a really short path for the JUNCTION
:: Always return to original dir before creating junction
cd /d "%ORIG_DIR%"
echo.
echo Creating junction: %JUNCTION% -^> %TARGET%
mklink /J "%JUNCTION%" "%TARGET%" > nul
if errorlevel 1 (
echo Failed to create junction for %TARGET%
exit /b 1
)
cd /d "%JUNCTION%"
::-- Note: to change Delphi compiler use:
::-- boss config delphi list
::-- boss config delphi use X -g
::-- where X is the compiler you want from the list shown. The -g makes it remembered globally
::-- in that case make sure old modules folder gets removed, then do boss install
echo Removing old modules folder
rd /s/q modules
echo Running boss install in %JUNCTION%...
boss install
echo Removing .dcp subfolders under modules
for /d /r modules %%d in (.dcp) do if exist "%%d" rd /s /q "%%d"
echo Removing junction: %JUNCTION%
rmdir "%JUNCTION%"
exit /b