Skip to content

Commit 49c01e2

Browse files
committed
misc tidy up.
1 parent a69a43a commit 49c01e2

File tree

9 files changed

+605
-29
lines changed

9 files changed

+605
-29
lines changed

builds/install/arch-specific/win32/BuildExecutableInstall.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
::
1717
::=============================================================================
1818
@echo off
19+
@set SCRIPT_FULL_NAME=%~d0%~p0%~n0%~x0
20+
@set SCRIPT_SHORT_NAME=%~n0%~x0
1921

2022
@goto :MAIN
2123
@goto :EOF
@@ -297,6 +299,7 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
297299

298300
@echo Copying other documentation...
299301
@copy %FB_GEN_DIR%\readmes\installation_readme.txt %FB_OUTPUT_DIR%\doc\installation_readme.txt > nul
302+
@copy %FB_GEN_DIR%\readmes\installation_scripted.txt %FB_OUTPUT_DIR%\doc\installation_scripted.txt > nul
300303
@copy %FB_OUTPUT_DIR%\doc\WhatsNew %FB_OUTPUT_DIR%\doc\WhatsNew.txt > nul
301304
@del %FB_OUTPUT_DIR%\doc\WhatsNew
302305

@@ -675,7 +678,7 @@ goto :EOF
675678
:: errorlevel gets reset automatically so capture it before we lose it.
676679
@set ERRLEV=%ERRORLEVEL%
677680
@echo.
678-
@echo Error %ERRLEV% in BuildExecutableInstall
681+
@echo Error code %ERRLEV% in %SCRIPT_SHORT_NAME%
679682
@echo %*
680683
@echo.
681684
::End of ERROR

builds/install/arch-specific/win32/FirebirdInstallGUIFunctions.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
o EnumerateObjectList;
3131
- Simple demonstration of object enumeration.
3232
33-
o Show Help
33+
o Show Help
3434
- CreateHelpDlg;
3535
- ShowHelpDlg: Integer;
3636
- CloseHelpDlg;

builds/install/arch-specific/win32/FirebirdInstall_30.iss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@
4040
; server. They must be stopped manually.
4141
;
4242
;
43+
; Debugging this script
44+
;
45+
; You need to run BuildExecutableInstall.bat to create the correct environment.
46+
; If you have built firebird from run_all.bat you need to switch to the install
47+
; script directory:
48+
; pushd ..\install\arch-specific\win32
49+
;
50+
; After that you should be able to compile and debug the script from the command
51+
; line thus:
52+
; "%INNO5_SETUP_PATH%"\compil32.exe FirebirdInstall_30.iss
53+
;
4354
;
4455
#define MyAppPublisher "Firebird Project"
4556
#define MyAppURL "http://www.firebirdsql.org/"
@@ -511,7 +522,7 @@ Source: {#FilesDir}\help\*.*; DestDir: {app}\help; Components: DevAdminComponent
511522
Source: {#FilesDir}\include\*.*; DestDir: {app}\include; Components: DevAdminComponent; Flags: ignoreversion recursesubdirs createallsubdirs;
512523
Source: {#FilesDir}\intl\fbintl.dll; DestDir: {app}\intl; Components: ServerComponent; Flags: sharedfile ignoreversion;
513524
Source: {#FilesDir}\intl\fbintl.conf; DestDir: {app}\intl; Components: ServerComponent; Flags: onlyifdoesntexist
514-
Source: {#FilesDir}\lib\*.*; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion;
525+
Source: {#FilesDir}\lib\*.lib; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion;
515526
#if PlatformTarget == "x64"
516527
Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion
517528
#endif
@@ -649,8 +660,8 @@ begin
649660
if ((pos('HELP',Uppercase(CommandLine)) > 0) or
650661
(pos('--',Uppercase(CommandLine)) > 0) )
651662
// or
652-
// (pos('/?',Uppercase(CommandLine)) > 0) or // InnoSetup displays its own help if these switches are passed.
653-
// (pos('/H',Uppercase(CommandLine)) > 0) ) // Note also that our help scren only appears after the Choose Language dialogue :-(
663+
// (pos('/?',Uppercase(CommandLine)) > 0) or // InnoSetup displays its own help if these switches are passed.
664+
// (pos('/H',Uppercase(CommandLine)) > 0) ) // Note also that our help screen only appears after the Choose Language dialogue :-(
654665
then begin
655666
ShowHelpDlg;
656667
result := False;
@@ -1221,7 +1232,7 @@ begin
12211232
Result := True;
12221233
case CurPageID of
12231234
AdminUserPage.ID : begin
1224-
{ check user has entered new sysdba password correctly. }
1235+
{ check user has entered new sysdba password correctly. }
12251236
i := CompareStr(AdminUserPage.Values[0],AdminUserPage.Values[1]);
12261237
If not (i = 0) then begin
12271238
Result := False;

builds/install/arch-specific/win32/installation_scripted.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ HELP
7272

7373
would be required for a client only install.
7474

75-
NOTE - If a full server install is required there is no need to
75+
NOTE - If a full server install is required there is no need to
7676
specify /COMPONENTS. All three are chosen by default.
7777

7878

@@ -107,6 +107,7 @@ HELP
107107

108108
UseSuperServerTask,UseServiceTask,AutoStartTask,CopyFbClientToSysTask
109109

110+
110111
/MERGETASKS="comma separated list of task names"
111112

112113
Like the /TASKS parameter, except the specified tasks will be merged

builds/win32/clean_all.bat

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
set FB_CLEAN_SHARED=
77

88
:: Read the command line
9-
for %%v in ( %* ) do (
10-
( if /I "%%v"=="REALCLEAN" (set FB_CLEAN_SHARED=1) )
9+
@for %%v in ( %* ) do (
10+
( if /I "%%v"=="REALCLEAN" (set FB_CLEAN_SHARED=1) )
1111
)
1212

1313
@echo Cleaning temporary directories...
@@ -27,20 +27,20 @@ for %%v in ( %* ) do (
2727

2828
:: Removing these might screw up parallel builds.
2929
:: So let's be sure we mean it.
30-
if defined FB_CLEAN_SHARED (
30+
@if defined FB_CLEAN_SHARED (
3131

32-
@echo Cleaning icu Shared dirs...
33-
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\include
32+
echo Cleaning icu Shared dirs...
33+
rmdir /S /Q %FB_ROOT_PATH%\extern\icu\include
3434

35-
@echo Cleaning zlib...
36-
@rmdir /S /Q %FB_ROOT_PATH%\extern\zlib\%FB_TARGET_PLATFORM% 2>nul
37-
@del %FB_ROOT_PATH%\extern\zlib\zconf.h 2>nul
38-
@del %FB_ROOT_PATH%\extern\zlib\zlib.h 2>nul
35+
echo Cleaning zlib...
36+
rmdir /S /Q %FB_ROOT_PATH%\extern\zlib\%FB_TARGET_PLATFORM% 2>nul
37+
del %FB_ROOT_PATH%\extern\zlib\zconf.h 2>nul
38+
del %FB_ROOT_PATH%\extern\zlib\zlib.h 2>nul
3939

40-
@echo Cleaning shared gen and dsql files...
41-
@del %FB_ROOT_PATH%\src\include\gen\parse.h
42-
@del %FB_ROOT_PATH%\src\dsql\dsql.tab.h
43-
@del %FB_ROOT_PATH%\src\dsql\parse.cpp
40+
echo Cleaning shared gen and dsql files...
41+
del %FB_ROOT_PATH%\src\include\gen\parse.h
42+
del %FB_ROOT_PATH%\src\dsql\dsql.tab.h
43+
del %FB_ROOT_PATH%\src\dsql\parse.cpp
4444

4545
)
4646

builds/win32/make_examples.bat

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if "%VS_VER%"=="msvc6" (
5050

5151
@echo.
5252
:: Here we must use cd because isql does not have an option to set a base directory
53-
@cd %FB_GEN_DIR%\examples
53+
@pushd %FB_GEN_DIR%\examples
5454
@echo Creating empbuild.fdb...
5555
@echo.
5656
@del empbuild.fdb 2> nul
@@ -78,6 +78,7 @@ if defined FB2_INTLEMP (
7878
@%FB_BIN_DIR%\gpre.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\intlbld.e %FB_GEN_DIR%\examples\intlbld.c -b %FB_GEN_DB_DIR%/examples/
7979
)
8080

81+
@popd
8182
@goto :EOF
8283

8384

@@ -142,10 +143,10 @@ if defined FB2_INTLEMP (
142143
:: the employee database.
143144
@set FIREBIRD=%FB_BIN_DIR%
144145

145-
@cd %FB_GEN_DIR%\examples
146+
@pushd %FB_GEN_DIR%\examples
146147
@del %FB_GEN_DIR%\examples\employee.fdb 2>nul
147148
@%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\empbuild\empbuild.exe %FB_GEN_DB_DIR%/examples/employee.fdb
148-
if errorlevel 44 (call :ERROR empbuild.exe failed - see %~n0.log for details & goto :EOF)
149+
if errorlevel 44 (call :ERROR empbuild.exe failed - see %~n0.log for details & popd & goto :EOF)
149150

150151
@if defined FB2_INTLEMP (
151152
@echo Building intlemp.fdb
@@ -156,7 +157,7 @@ if errorlevel 44 (call :ERROR empbuild.exe failed - see %~n0.log for details & g
156157
)
157158
@set FIREBIRD=
158159
@set PATH=%FB_SAVE_PATH%
159-
@cd %FB_ROOT_PATH%\builds\win32
160+
@popd
160161

161162
@goto :EOF
162163

builds/win32/run_all.bat

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set FBBUILD_BUILDTYPE=release
88
set FBBUILD_INCLUDE_PDB=
99
set FBBUILD_MAKE_KITS_ONLY=
1010
set FBBUILD_BUILD_ONLY=0
11+
set FBBUILD_KITS=ISX ZIP
12+
set FBBUILD_TEST_ONLY=
1113

1214
::Check if on-line help is required
1315
for %%v in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do (
@@ -24,9 +26,13 @@ for %%v in ( %* ) do (
2426
( if /I "%%v"=="PDB" (set FBBUILD_INCLUDE_PDB=1) )
2527
( if /I "%%v"=="REPACK" (set FBBUILD_MAKE_KITS_ONLY=1) )
2628
( if /I "%%v"=="JUSTBUILD" (set FBBUILD_BUILD_ONLY=1) )
29+
( if /I "%%v"=="TESTENV" (set FBBUILD_TEST_ONLY=1) )
2730
( if /I "%%v"=="NO_RN" set FB_EXTERNAL_DOCS=)
31+
( if /I "%%v"=="NO_RN" set FBBUILD_PACKAGE_NUMBER=)
2832
)
2933

34+
if defined FBBUILD_TEST_ONLY ( goto TEST_ENV & goto :EOF )
35+
3036
if defined FBBUILD_MAKE_KITS_ONLY (goto :MAKE_KITS & goto :EOF)
3137

3238
:: Go to work
@@ -46,13 +52,13 @@ if "%FBBUILD_BUILD_ONLY%"=="1" goto :END
4652
:MAKE_KITS
4753
:: Package everything up
4854
pushd ..\install\arch-specific\win32
49-
call BuildExecutableInstall ISX ZIP EMB %FBBUILD_BUILDTYPE%
55+
call BuildExecutableInstall %FBBUILD_KITS% %FBBUILD_BUILDTYPE%
5056
if "%ERRLEV%"=="1" (
5157
@echo Oops - some sort of error during packaging & popd & goto :END
5258
)
5359
if defined FBBUILD_INCLUDE_PDB (
5460
set /A FBBUILD_PACKAGE_NUMBER-=1
55-
call BuildExecutableInstall ISX ZIP EMB %FBBUILD_BUILDTYPE% PDB
61+
call BuildExecutableInstall %FBBUILD_KITS% %FBBUILD_BUILDTYPE% PDB
5662
)
5763
popd
5864

@@ -74,11 +80,27 @@ goto :END
7480
@echo.
7581
@echo JUSTBUILD - Just build - don't create packages.
7682
@echo.
83+
@echo TESTENV - Sanity check - is Visual Studio available?.
84+
@echo - print the build variables that will be used
85+
@echo.
7786
@echo NO_RN - Do not fail the packaging if release notes unavailable.
7887
@echo Default is to fail if FB_EXTERNAL_DOCS is set and release notes not found.
7988
@echo.
8089
@goto :EOF
8190

91+
92+
:TEST_ENV
93+
::===============================
94+
:: Show variables
95+
@call setenvvar.bat %*
96+
if "%ERRLEV%"=="1" goto :END
97+
for /F "tokens=2*" %%a in ( %FB_ROOT_PATH%\gen\jrd\build_no.h ) do ( SET %%a=%%~b )
98+
set > %FB_ROOT_PATH%\builds\install\arch-specific\win32\test_installer\fb_build_vars_%PROCESSOR_ARCHITECTURE%.txt
99+
type %FB_ROOT_PATH%\builds\install\arch-specific\win32\test_installer\fb_build_vars_%PROCESSOR_ARCHITECTURE%.txt
100+
goto :END
101+
::---------
102+
103+
82104
:END
83105

84106
if "%ERRLEV%"=="1" exit /b 1

0 commit comments

Comments
 (0)