1
+ @ echo off
2
+ SETLOCAL
3
+ SET SETUPDIR = %CD%
4
+
5
+ :: ==========================================================
6
+ :: rsvars.bat check
7
+ :: ==========================================================
8
+ if not " -%BDS% " == " -" goto RsVarsCalled
9
+ call rsvars.bat
10
+ if " -%BDS% " == " -" goto Leave
11
+
12
+ :RsVarsCalled
13
+ SET JCLROOT = %SETUPDIR% \..\jcl
14
+ SET JCLBUILTDIR = %SETUPDIR% \setupbuild
15
+ SET InnoSetupDir = %SETUPDIR% \InnoSetup
16
+
17
+ :: == Sanity checks ==
18
+ if not exist " %JCLROOT% \source\common\JclBase.pas" goto NoRootDirFound
19
+ if not exist " %SETUPDIR% \Install.iss" goto NoInstallDir
20
+
21
+
22
+ :: ==========================================================
23
+ :: Compile JCL
24
+ :: ==========================================================
25
+
26
+ :: == Create output directories ==
27
+ md " %SETUPDIR% \setupbuild" 2 > NUL > NUL
28
+ md " %JCLBUILTDIR% " 2 > NUL > NUL
29
+ md " %JCLBUILTDIR% \hpp" 2 > NUL > NUL
30
+ md " %JCLBUILTDIR% \lib" 2 > NUL > NUL
31
+ md " %JCLBUILTDIR% \bpl" 2 > NUL > NUL
32
+
33
+ :: == Delete all files in the output directories, we always want to rebuild them ==
34
+ del /Q /S " %JCLBUILTDIR% \*.*" 2 > NUL > NUL
35
+
36
+ :: == Compile the files
37
+ cd %JCLROOT%
38
+ msbuild make.proj " /p:HppOutDir=%JCLBUILTDIR% \hpp" " /p:DcuOutDir=%JCLBUILTDIR% \lib" " /p:BplOutDir=%JCLBUILTDIR% \bpl"
39
+ if ERRORLEVEL 1 goto Failed
40
+ cd %SETUPDIR%
41
+
42
+ :: ==========================================================
43
+ :: Compile Setup
44
+ :: ==========================================================
45
+ :Setup
46
+ " %InnoSetupDir% \ISCC.exe" Install.iss /dCmdLineBuild " /dJclRoot=%JCLROOT% " " /dJclLib=%JCLBUILTDIR% \lib" " /dJclBpl=%JCLBUILTDIR% \bpl" " /dJclHpp=" %JCLBUILTDIR% \hpp"
47
+ if ERRORLEVEL 1 goto Failed
48
+
49
+
50
+ goto Leave
51
+
52
+ :NoInstalLDirFound
53
+ echo You must start BuildSetup.bat from the JclInnoSetup directory.
54
+ goto Failed
55
+
56
+ :NoRootDirFound
57
+ echo " %JCLROOT% " is not the JCL root directory.
58
+
59
+ :Failed
60
+ echo .
61
+ pause
62
+
63
+ :Leave
64
+ cd %SETUPDIR%
65
+ ENDLOCAL
0 commit comments