-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathcompile.bat
More file actions
91 lines (72 loc) · 2.92 KB
/
Copy pathcompile.bat
File metadata and controls
91 lines (72 loc) · 2.92 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@echo off
rem Inno Setup
rem Copyright (C) 1997-2026 Jordan Russell
rem Portions by Martijn Laan
rem For conditions of distribution and use, see LICENSE.TXT.
rem
rem Batch file to compile Inno Setup
setlocal
cd /d %~dp0
if "%1"=="x86" goto archfound
if "%1"=="x64" goto archfound
echo Architecture parameter is missing or invalid. Must be "x86" or "x64".
goto failed2
:archfound
if exist compilesettings.bat goto compilesettingsfound
:compilesettingserror
echo compilesettings.bat is missing or incomplete. It needs to contain
echo the following line, adjusted for your system:
echo.
echo set DELPHIXEROOT=C:\Program Files\Embarcadero\RAD Studio\20.0 [Path to Delphi 10.4 Sydney (or later)]
goto failed2
:compilesettingsfound
set DELPHIXEROOT=
call .\compilesettings.bat
if "%DELPHIXEROOT%"=="" goto compilesettingserror
rem -------------------------------------------------------------------------
call "%DELPHIXEROOT%\bin\rsvars.bat"
if errorlevel 1 goto failed
cd Projects
if errorlevel 1 goto failed
set EnvOptionsWarn=false
rem Optional: make it use rc.exe (via bin\cgrc.exe) instead of resinator.exe (via bin64\cgrc.exe)
rem set BRCC_CompilerToUse=msrc
if "%1"=="x64" ( set Bits=64 ) else ( set Bits=32 )
set "SignFiles="
if /I "%2"=="iscmplr" set "SignFiles=Files\ISCmplr.dll"
if /I "%2"=="ispp" set "SignFiles=Files\ISPP.dll"
if /I "%2"=="setup" set "SignFiles=Files\Setup.e%Bits%"
if /I "%2"=="setupcustomstyle" set "SignFiles=Files\SetupCustomStyle.e%Bits%"
if /I "%2"=="setupldr" set "SignFiles=Files\SetupLdr.e%Bits%"
if "%2"=="" set "SignFiles=Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\Setup.e64 Files\SetupCustomStyle.e32 Files\SetupCustomStyle.e64 Files\SetupLdr.e32 Files\SetupLdr.e64"
if /I "%2"=="ishelpgen" (
echo - ISHelpGen.exe
msbuild.exe ..\ISHelp\ISHelpGen\ISHelpGen.dproj /t:Build /p:Config=Release;Platform=Win64 /nologo
) else if not "%2"=="" (
echo - %2
msbuild.exe "%2.dproj" /t:Build /p:Config=Release;Platform=Win%Bits% /nologo
) else (
echo - Projects.groupproj - Release build group
rem This emits warning MSB4056, but that's ok since the build doesn't use COM. Modern MSBuild supports
rem /noWarn:MSB4056, but the version targeted by Delphi 12.3's rsvars.bat does not. Additionally Delphi's
rem implementation of build groups does not seem to pass through additional parameters, so even with a
rem modern MSBuild you cannot suppress the warning. Likewise, using /nologo or /v:q has no effect.
msbuild.exe Projects.groupproj /t:Build /p:BuildGroup=Release%Bits%
)
if errorlevel 1 goto failed
cd ..
if errorlevel 1 goto failed
if defined SignFiles (
rem Sign using user's private key - will be overwritten if called by build.bat
call .\issig.bat sign %SignFiles%
if errorlevel 1 goto failed2
echo ISSigTool sign done
)
echo Success!
goto exit
:failed
echo *** FAILED ***
cd ..
:failed2
exit /b 1
:exit