2003-07-05 03:10:56 +02:00
|
|
|
@echo off
|
2003-10-15 14:47:31 +02:00
|
|
|
set ERRLEV=0
|
2003-07-05 03:10:56 +02:00
|
|
|
|
|
|
|
:: Set env vars
|
2022-08-08 13:32:53 +02:00
|
|
|
@call setenvvar.bat %*
|
2005-06-27 15:54:02 +02:00
|
|
|
|
2005-02-08 15:59:13 +01:00
|
|
|
@if errorlevel 1 (call :ERROR Executing setenvvar.bat failed & goto :EOF)
|
2003-07-05 03:10:56 +02:00
|
|
|
|
|
|
|
:: verify that boot was run before
|
2007-09-06 15:25:04 +02:00
|
|
|
|
2022-08-08 02:14:52 +02:00
|
|
|
@if not exist %FB_BIN_DIR%\firebird.msg (goto :HELP_BOOT & goto :EOF)
|
2007-09-06 15:25:04 +02:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
|
|
|
|
::==========
|
|
|
|
:: MAIN
|
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo Building %FB_OBJ_DIR%
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
@if "%FB_CLIENT_ONLY%"=="" (
|
|
|
|
call compile.bat builds\win32\%VS_VER%\Firebird make_all_%FB_TARGET_PLATFORM%.log
|
|
|
|
) else (
|
|
|
|
call compile.bat builds\win32\%VS_VER%\Firebird make_all_%FB_TARGET_PLATFORM%.log DLLs\yvalve DLLs\chacha
|
|
|
|
)
|
2007-02-26 16:18:41 +01:00
|
|
|
if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log for details
|
2003-10-15 14:47:31 +02:00
|
|
|
|
2006-11-19 15:24:09 +01:00
|
|
|
@if "%ERRLEV%"=="1" (
|
|
|
|
@goto :EOF
|
2003-07-05 03:10:56 +02:00
|
|
|
) else (
|
2006-11-19 15:24:09 +01:00
|
|
|
@call :MOVE
|
2003-07-05 03:10:56 +02:00
|
|
|
)
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:MOVE
|
2022-09-04 17:30:30 +02:00
|
|
|
@echo Cleaning output directory
|
|
|
|
@rmdir /S /Q "%FB_OUTPUT_DIR%" 2>nul
|
|
|
|
|
|
|
|
:: short delay to let OS complete actions by rmdir above
|
|
|
|
@timeout 1 >nul
|
|
|
|
|
|
|
|
@mkdir %FB_OUTPUT_DIR% 2>nul
|
2020-01-14 16:40:25 +01:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\tzdata 2>nul
|
2007-02-26 16:18:41 +01:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\include 2>nul
|
2013-08-22 08:23:37 +02:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\include\firebird 2>nul
|
2022-09-04 17:30:30 +02:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\include\firebird\impl 2>nul
|
2007-02-26 16:18:41 +01:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\lib 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\system32 2>nul
|
2009-02-01 23:14:18 +01:00
|
|
|
@mkdir %FB_OUTPUT_DIR%\plugins 2>nul
|
2022-11-27 15:24:57 +01:00
|
|
|
|
|
|
|
@if "%FB_CLIENT_ONLY%"=="" (
|
|
|
|
mkdir %FB_OUTPUT_DIR%\intl 2>nul
|
|
|
|
mkdir %FB_OUTPUT_DIR%\doc 2>nul
|
|
|
|
mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
|
|
|
|
mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul
|
|
|
|
)
|
2007-09-13 12:47:39 +02:00
|
|
|
|
2022-09-04 17:30:30 +02:00
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\* %FB_OUTPUT_DIR% >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata\* %FB_OUTPUT_DIR%\tzdata >nul
|
2007-02-26 16:18:41 +01:00
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\system32\* %FB_OUTPUT_DIR%\system32 >nul
|
2022-09-04 17:30:30 +02:00
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\*.dll %FB_OUTPUT_DIR%\plugins >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\yvalve\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
|
2022-11-27 15:24:57 +01:00
|
|
|
|
|
|
|
@if "%FB_CLIENT_ONLY%"=="" (
|
|
|
|
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
|
|
|
|
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
|
|
|
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul
|
|
|
|
)
|
2022-09-04 17:30:30 +02:00
|
|
|
|
2023-09-30 00:01:35 +02:00
|
|
|
for %%v in (gpre_boot build_msg common_test engine_test isql_test) do (
|
2022-11-27 15:24:57 +01:00
|
|
|
@del %FB_OUTPUT_DIR%\%%v.* 2>nul
|
2022-09-04 17:30:30 +02:00
|
|
|
)
|
2008-12-31 10:43:46 +01:00
|
|
|
|
2003-08-08 12:26:09 +02:00
|
|
|
:: Firebird.conf, etc
|
2022-09-04 17:30:30 +02:00
|
|
|
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR%\ > nul
|
2020-01-15 18:01:32 +01:00
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_OUTPUT_DIR%\firebird.conf >nul
|
2013-08-22 11:24:09 +02:00
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\plugins.conf %FB_OUTPUT_DIR% >nul
|
2008-12-31 10:43:46 +01:00
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\IPLicense.txt %FB_OUTPUT_DIR% >nul
|
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\IDPLicense.txt %FB_OUTPUT_DIR% >nul
|
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
@if "%FB_CLIENT_ONLY%"=="" (
|
|
|
|
copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf >nul
|
|
|
|
copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl\ >nul
|
|
|
|
copy %FB_ROOT_PATH%\builds\install\misc\replication.conf %FB_OUTPUT_DIR% >nul
|
|
|
|
copy %FB_ROOT_PATH%\src\utilities\ntrace\fbtrace.conf %FB_OUTPUT_DIR% >nul
|
|
|
|
copy %FB_ROOT_PATH%\src\plugins\udr_engine\udr_engine.conf %FB_OUTPUT_DIR%\plugins\udr_engine.conf >nul
|
|
|
|
|
|
|
|
:: DATABASES
|
2023-09-17 17:29:17 +02:00
|
|
|
copy %FB_GEN_DIR%\dbs\security6.FDB %FB_OUTPUT_DIR%\security6.fdb >nul
|
2008-12-31 10:43:46 +01:00
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
:: DOCS
|
|
|
|
copy %FB_ROOT_PATH%\*.md %FB_OUTPUT_DIR%\doc\ >nul
|
2005-02-08 15:59:13 +01:00
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
:: READMES
|
|
|
|
copy %FB_ROOT_PATH%\doc\README.* %FB_OUTPUT_DIR%\doc >nul
|
|
|
|
copy %FB_ROOT_PATH%\doc\sql.extensions\README.* %FB_OUTPUT_DIR%\doc\sql.extensions >nul
|
|
|
|
)
|
2013-08-22 08:23:37 +02:00
|
|
|
|
2019-06-03 16:45:00 +02:00
|
|
|
:: Headers
|
2019-11-01 17:04:21 +01:00
|
|
|
copy %FB_ROOT_PATH%\src\include\ibase.h %FB_OUTPUT_DIR%\include > nul
|
2021-09-17 14:05:16 +02:00
|
|
|
copy %FB_ROOT_PATH%\src\include\iberror.h %FB_OUTPUT_DIR%\include > nul
|
2022-09-04 17:30:30 +02:00
|
|
|
copy %FB_GEN_DIR%\iberror_c.h %FB_OUTPUT_DIR%\include\firebird\impl > nul
|
2005-02-08 15:59:13 +01:00
|
|
|
|
2013-08-22 08:23:37 +02:00
|
|
|
:: New API headers
|
2022-08-08 02:14:52 +02:00
|
|
|
xcopy /y %FB_ROOT_PATH%\src\include\firebird %FB_OUTPUT_DIR%\include\firebird /e > nul
|
2013-08-22 08:23:37 +02:00
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
@if "%FB_CLIENT_ONLY%"=="" (
|
|
|
|
:: UDR
|
|
|
|
copy %FB_ROOT_PATH%\src\extlib\*.sql %FB_OUTPUT_DIR%\plugins\udr > nul
|
2008-12-31 10:43:46 +01:00
|
|
|
|
2022-11-27 15:24:57 +01:00
|
|
|
:: Installers
|
|
|
|
copy %FB_INSTALL_SCRIPTS%\install_service.bat %FB_OUTPUT_DIR% >nul
|
|
|
|
copy %FB_INSTALL_SCRIPTS%\uninstall_service.bat %FB_OUTPUT_DIR% >nul
|
|
|
|
)
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2008-12-31 10:43:46 +01:00
|
|
|
:: MSVC runtime
|
2022-06-17 19:33:12 +02:00
|
|
|
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140.dll" %FB_OUTPUT_DIR% > nul
|
|
|
|
if exist "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140_1.dll" (
|
2022-11-27 15:24:57 +01:00
|
|
|
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140_1.dll" %FB_OUTPUT_DIR% > nul
|
2016-03-17 23:03:55 +01:00
|
|
|
)
|
2022-06-17 19:33:12 +02:00
|
|
|
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\msvcp140.dll" %FB_OUTPUT_DIR% > nul
|
|
|
|
|
2008-12-31 10:43:46 +01:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::==============
|
|
|
|
:HELP_BOOT
|
|
|
|
@echo.
|
|
|
|
@echo You must run make_boot.bat before running this script
|
|
|
|
@echo.
|
|
|
|
@goto :EOF
|
|
|
|
|
2005-02-08 15:59:13 +01:00
|
|
|
:ERROR
|
|
|
|
::====
|
|
|
|
@echo.
|
2005-02-17 11:46:39 +01:00
|
|
|
@echo An error occurred while running make_all.bat -
|
|
|
|
@echo %*
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo.
|
2005-02-17 11:46:39 +01:00
|
|
|
set ERRLEV=1
|
2005-02-08 15:59:13 +01:00
|
|
|
cancel_script > nul 2>&1
|
|
|
|
::End of ERROR
|
|
|
|
::------------
|
|
|
|
@goto :EOF
|