2003-10-09 19:48:29 +02:00
|
|
|
|
|
|
|
@echo off
|
|
|
|
|
2007-10-10 16:00:25 +02:00
|
|
|
:: Reset or clear some variables, as appropriate.
|
2003-10-15 14:47:31 +02:00
|
|
|
set ERRLEV=0
|
2020-04-22 16:08:47 +02:00
|
|
|
set FBBUILD_NOCLEAN=
|
|
|
|
set FBBUILD_REAL_CLEAN=
|
2007-10-10 16:00:25 +02:00
|
|
|
set FBBUILD_INCLUDE_PDB=
|
2007-12-21 13:22:22 +01:00
|
|
|
set FBBUILD_MAKE_KITS_ONLY=
|
2012-06-07 12:08:46 +02:00
|
|
|
set FBBUILD_BUILD_ONLY=0
|
2022-06-17 18:05:38 +02:00
|
|
|
set FBBUILD_TEST_ONLY=
|
2022-07-25 12:16:28 +02:00
|
|
|
set FB2_SNAPSHOT=
|
2007-12-21 13:22:22 +01:00
|
|
|
|
|
|
|
::Check if on-line help is required
|
|
|
|
for %%v in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do (
|
|
|
|
( @if /I "%%v"=="-h" (goto :HELP & goto :EOF) )
|
|
|
|
( @if /I "%%v"=="/h" (goto :HELP & goto :EOF) )
|
|
|
|
( @if /I "%%v"=="HELP" (goto :HELP & goto :EOF) )
|
|
|
|
)
|
|
|
|
|
2003-10-15 14:47:31 +02:00
|
|
|
|
2007-10-10 16:00:25 +02:00
|
|
|
:: Read the command line
|
|
|
|
for %%v in ( %* ) do (
|
2020-04-22 16:08:47 +02:00
|
|
|
( if /I "%%v"=="NOCLEAN" (set FBBUILD_NOCLEAN=1) )
|
|
|
|
( if /I "%%v"=="REALCLEAN" (set FBBUILD_REAL_CLEAN=REALCLEAN) )
|
2007-10-10 16:00:25 +02:00
|
|
|
( if /I "%%v"=="PDB" (set FBBUILD_INCLUDE_PDB=1) )
|
2007-12-21 13:22:22 +01:00
|
|
|
( if /I "%%v"=="REPACK" (set FBBUILD_MAKE_KITS_ONLY=1) )
|
2012-06-07 12:08:46 +02:00
|
|
|
( if /I "%%v"=="JUSTBUILD" (set FBBUILD_BUILD_ONLY=1) )
|
2022-06-17 18:05:38 +02:00
|
|
|
( if /I "%%v"=="TESTENV" (set FBBUILD_TEST_ONLY=1) )
|
2022-07-25 12:16:28 +02:00
|
|
|
( if /I "%%v"=="SNAPSHOT" (set FB2_SNAPSHOT=1) )
|
2007-10-10 16:00:25 +02:00
|
|
|
)
|
|
|
|
|
2022-08-16 12:24:59 +02:00
|
|
|
@call setenvvar.bat %*
|
2022-06-17 18:05:38 +02:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
|
|
|
|
|
|
|
if defined FBBUILD_TEST_ONLY ( goto TEST_ENV & goto :EOF )
|
2020-04-24 16:19:57 +02:00
|
|
|
|
2007-12-21 13:22:22 +01:00
|
|
|
if defined FBBUILD_MAKE_KITS_ONLY (goto :MAKE_KITS & goto :EOF)
|
|
|
|
|
2020-04-22 16:07:32 +02:00
|
|
|
|
2007-10-10 16:00:25 +02:00
|
|
|
:: Go to work
|
2022-08-08 13:32:53 +02:00
|
|
|
if not defined FBBUILD_NOCLEAN (call clean_all %FBBUILD_BUILDTYPE% %FBBUILD_REAL_CLEAN%)
|
2007-10-10 16:00:25 +02:00
|
|
|
:: We do not support debug builds of icu, so we don't pass %FBBUILD_BUILDTYPE%
|
2022-08-08 13:32:53 +02:00
|
|
|
call make_icu %FBBUILD_BUILDTYPE%
|
2007-02-26 16:18:41 +01:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
2007-10-10 16:00:25 +02:00
|
|
|
call make_boot %FBBUILD_BUILDTYPE%
|
2007-02-26 16:18:41 +01:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
2007-10-10 16:00:25 +02:00
|
|
|
call make_all %FBBUILD_BUILDTYPE%
|
2007-02-26 16:18:41 +01:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
2007-10-10 16:00:25 +02:00
|
|
|
call make_examples %FBBUILD_BUILDTYPE%
|
2007-02-26 16:18:41 +01:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
2007-10-10 16:00:25 +02:00
|
|
|
|
2012-06-07 12:08:46 +02:00
|
|
|
if "%FBBUILD_BUILD_ONLY%"=="1" goto :END
|
|
|
|
|
2007-12-21 13:22:22 +01:00
|
|
|
:MAKE_KITS
|
2007-10-10 16:00:25 +02:00
|
|
|
:: Package everything up
|
2007-02-26 16:18:41 +01:00
|
|
|
pushd ..\install\arch-specific\win32
|
2007-10-10 16:00:25 +02:00
|
|
|
call BuildExecutableInstall ISX ZIP EMB %FBBUILD_BUILDTYPE%
|
2022-06-17 18:05:38 +02:00
|
|
|
if "%ERRLEV%"=="1" (
|
|
|
|
@echo Oops - some sort of error during packaging & popd & goto :END
|
|
|
|
)
|
2007-10-10 16:00:25 +02:00
|
|
|
if defined FBBUILD_INCLUDE_PDB (
|
2022-06-17 18:05:38 +02:00
|
|
|
set /A FBBUILD_PACKAGE_NUMBER-=1
|
|
|
|
call BuildExecutableInstall ISX ZIP EMB %FBBUILD_BUILDTYPE% PDB
|
2007-10-10 16:00:25 +02:00
|
|
|
)
|
2007-02-26 16:18:41 +01:00
|
|
|
popd
|
2003-10-09 19:48:29 +02:00
|
|
|
|
2007-12-21 13:22:22 +01:00
|
|
|
goto :END
|
2020-04-22 16:08:47 +02:00
|
|
|
::---------
|
2003-10-15 14:47:31 +02:00
|
|
|
|
2007-12-21 13:22:22 +01:00
|
|
|
:HELP
|
|
|
|
@echo.
|
|
|
|
@echo The following params may be passed:
|
|
|
|
@echo.
|
2012-06-07 12:08:46 +02:00
|
|
|
@echo NOCLEAN - don't run CLEAN_ALL.BAT
|
|
|
|
@echo.
|
2022-07-25 12:16:28 +02:00
|
|
|
@echo REALCLEAN - Run CLEAN_ALL.BAT REALCLEAN
|
|
|
|
@echo This will do a deeper clean.
|
|
|
|
@echo Recommended for multi-platform builds
|
2020-04-22 16:08:47 +02:00
|
|
|
@echo.
|
2012-06-07 12:08:46 +02:00
|
|
|
@echo DEBUG - Do a DEBUG build (for experienced developers only.)
|
|
|
|
@echo This switch is not needed to debug Firebird.
|
2007-12-21 13:22:22 +01:00
|
|
|
@echo.
|
2012-06-07 12:08:46 +02:00
|
|
|
@echo PDB - Create PDB packages as well as standard kits
|
2007-12-21 13:22:22 +01:00
|
|
|
@echo.
|
2012-06-07 12:08:46 +02:00
|
|
|
@echo REPACK - Don't build - just repack kits.
|
2007-12-21 13:22:22 +01:00
|
|
|
@echo.
|
2012-06-07 12:08:46 +02:00
|
|
|
@echo JUSTBUILD - Just build - don't create packages.
|
2007-12-21 13:22:22 +01:00
|
|
|
@echo.
|
2022-06-17 18:05:38 +02:00
|
|
|
@echo TESTENV - Sanity check - is Visual Studio available?.
|
|
|
|
@echo - print the build variables that will be used
|
|
|
|
@echo.
|
2022-07-25 12:16:28 +02:00
|
|
|
@echo SNAPSHOT - Build and create a zip kit.
|
|
|
|
@echo This is intended to produce a x64 test kit
|
|
|
|
@echo with no dependency on Win32
|
|
|
|
@echo.
|
2007-12-21 13:22:22 +01:00
|
|
|
@goto :EOF
|
2020-04-22 16:08:47 +02:00
|
|
|
::---------
|
2003-10-09 19:48:29 +02:00
|
|
|
|
2020-04-22 16:07:32 +02:00
|
|
|
|
2022-06-17 18:05:38 +02:00
|
|
|
:TEST_ENV
|
|
|
|
::===============================
|
|
|
|
:: Show variables
|
2022-08-16 12:24:59 +02:00
|
|
|
@call setenvvar.bat %*
|
2022-06-17 18:05:38 +02:00
|
|
|
if "%ERRLEV%"=="1" goto :END
|
|
|
|
echo.
|
|
|
|
set FB
|
|
|
|
set MS
|
|
|
|
set VC
|
|
|
|
set VS
|
|
|
|
echo.
|
2020-04-22 16:07:32 +02:00
|
|
|
goto :END
|
|
|
|
::---------
|
|
|
|
|
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
:END
|
2007-12-21 13:22:22 +01:00
|
|
|
|
2018-08-06 16:48:08 +02:00
|
|
|
if "%ERRLEV%"=="1" exit /b 1
|