Skip to content

Commit a97ad6e

Browse files
author
ahuser
committed
* Added setup build script
* Updated installer helper (C++ LibraryPath)
1 parent edc3823 commit a97ad6e

File tree

7 files changed

+140
-114
lines changed

7 files changed

+140
-114
lines changed

thirdparty/InnoSetup/BuildSetup.bat

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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

thirdparty/InnoSetup/CompInstall.dll

7 KB
Binary file not shown.

thirdparty/InnoSetup/CompInstall/CompInst.pas

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function compinst_init: Integer; stdcall;
103103

104104
ConfigDataLocation := Inst.ConfigDataLocation;
105105
if (ConfigDataLocation <> '') and (ConfigDataLocation[1] = PathDelim) then
106-
ConfigDataLocation := Copy(ConfigDataLocation, 2, MaxInt); // there is no such thing as am absolute "\Software" registry key
106+
ConfigDataLocation := Copy(ConfigDataLocation, 2, MaxInt); // there is no such thing as an absolute "\Software" registry key
107107

108108
case Inst.RadToolKind of
109109
brDelphi:
@@ -269,6 +269,7 @@ function ChangeSearchPaths(Inst: TJclBorRADToolInstallation; Installing: Boolean
269269
begin
270270
TJclBDSInstallation(Inst).AddToCppBrowsingPath(BrowsePaths);
271271
TJclBDSInstallation(Inst).AddToCppIncludePath(IncludePaths);
272+
TJclBDSInstallation(Inst).AddToCppLibraryPath(SearchPaths); // for .lib and .bpi
272273
end;
273274
end
274275
else
@@ -280,6 +281,7 @@ function ChangeSearchPaths(Inst: TJclBorRADToolInstallation; Installing: Boolean
280281
begin
281282
TJclBDSInstallation(Inst).RemoveFromCppBrowsingPath(BrowsePaths);
282283
TJclBDSInstallation(Inst).RemoveFromCppIncludePath(IncludePaths);
284+
TJclBDSInstallation(Inst).RemoveFromCppLibraryPath(SearchPaths); // for .lib and .bpi
283285
end;
284286
end;
285287
Result := 1;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@echo off
2+
3+
SET PATH=E:\Borland\Delphi7\Bin
4+
5+
dcc32 -U..\..\JCL\source\Common;..\..\JCL\source\Windows -I..\..\JCL\source\Include -Q -$D- -E.. CompInstall.dpr
6+
7+
pause

0 commit comments

Comments
 (0)