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
|
|
|
|
@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-02-26 16:18:41 +01:00
|
|
|
@if not exist %FB_ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
@call set_build_target.bat %*
|
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
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2 make_all_%FB_TARGET_PLATFORM%.log
|
|
|
|
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
|
|
|
|
@echo Copying files to output
|
2007-02-26 16:18:41 +01:00
|
|
|
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%
|
|
|
|
@del %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\*.exp 2>nul
|
|
|
|
@del %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\*.lib 2>nul
|
|
|
|
@rmdir /q /s %FB_ROOT_PATH%\output 2>nul
|
|
|
|
|
|
|
|
@mkdir %FB_OUTPUT_DIR% 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\bin 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\intl 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\udf 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\help 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\doc 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\include 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\lib 2>nul
|
|
|
|
@mkdir %FB_OUTPUT_DIR%\system32 2>nul
|
|
|
|
|
|
|
|
@copy %FB_ROOT_PATH%\extern\icu\bin\icuuc30.dll %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_ROOT_PATH%\extern\icu\bin\icudt30.dll %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_ROOT_PATH%\extern\icu\bin\icuin30.dll %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\* %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\udf\* %FB_OUTPUT_DIR%\udf >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\system32\* %FB_OUTPUT_DIR%\system32 >nul
|
|
|
|
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\fbclient\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
|
2003-08-08 12:26:09 +02:00
|
|
|
:: Firebird.conf, etc
|
2007-02-26 16:18:41 +01:00
|
|
|
@copy %FB_ROOT_PATH%\gen\firebird.msg %FB_OUTPUT_DIR% > nul
|
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_OUTPUT_DIR% >nul
|
|
|
|
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl >nul
|
2003-08-08 12:26:09 +02:00
|
|
|
:: DATABASES
|
2007-02-26 16:18:41 +01:00
|
|
|
@copy %FB_ROOT_PATH%\gen\dbs\SECURITY2.FDB %FB_OUTPUT_DIR%\security2.fdb >nul
|
|
|
|
@copy %FB_ROOT_PATH%\gen\dbs\HELP.fdb %FB_OUTPUT_DIR%\help\help.fdb >nul
|
|
|
|
::@copy %FB_ROOT_PATH%\gen\firebird.msg %FB_OUTPUT_DIR%\firebird.msg >nul
|
|
|
|
@copy %FB_ROOT_PATH%\builds\misc\security.gbak %FB_OUTPUT_DIR%\security2.fbk > nul
|
2003-08-08 12:26:09 +02:00
|
|
|
:: DOCS
|
2007-02-26 16:18:41 +01:00
|
|
|
::@copy %FB_ROOT_PATH%\ChangeLog %FB_OUTPUT_DIR%\doc\ChangeLog.txt >nul
|
|
|
|
::@copy %FB_ROOT_PATH%\doc\WhatsNew %FB_OUTPUT_DIR%\doc\WhatsNew.txt >nul
|
2005-02-08 15:59:13 +01:00
|
|
|
|
2003-08-08 12:26:09 +02:00
|
|
|
:: HEADERS
|
2005-02-08 15:59:13 +01:00
|
|
|
:: Don't use this ibase.h unless you have to - we build it better in BuildExecutableInstall.bat
|
|
|
|
:: This variation doesn't clean up the license templates, and processes the component files in
|
|
|
|
:: a different order to that used in the production version. However, this version doesn't
|
|
|
|
:: have a dependancy upon sed while the production one does.
|
2007-02-26 16:18:41 +01:00
|
|
|
echo #pragma message("Non-production version of ibase.h.") > %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
echo #pragma message("Using raw, unprocessed concatenation of header files.") >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\misc\ibase_header.txt >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\include\types_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\jrd\dsc_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\dsql\sqlda_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\jrd\ibase.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\jrd\inf_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\include\consts_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\jrd\blr.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
type %FB_ROOT_PATH%\src\include\gen\iberror.h >> %FB_OUTPUT_DIR%\include\ibase.tmp
|
|
|
|
sed -f %FB_ROOT_PATH%\src\misc\headers.sed < %FB_OUTPUT_DIR%\include\ibase.tmp > %FB_OUTPUT_DIR%\include\ibase.h
|
|
|
|
del %FB_OUTPUT_DIR%\include\ibase.tmp > nul
|
2003-08-08 12:26:09 +02:00
|
|
|
|
2005-02-08 15:59:13 +01:00
|
|
|
::Copy additional headers
|
2007-02-26 16:18:41 +01:00
|
|
|
copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul
|
|
|
|
copy %FB_ROOT_PATH%\src\jrd\perf.h %FB_OUTPUT_DIR%\include >nul
|
2005-02-08 15:59:13 +01:00
|
|
|
::This is in ibase.h so why make a separate copy?
|
2007-02-26 16:18:41 +01:00
|
|
|
::copy %FB_ROOT_PATH%\src\jrd\blr.h %FB_OUTPUT_DIR%\include > nul
|
|
|
|
copy %FB_ROOT_PATH%\src\include\gen\iberror.h %FB_OUTPUT_DIR%\include > nul
|
2005-02-08 15:59:13 +01:00
|
|
|
|
2003-08-08 12:26:09 +02:00
|
|
|
:: UDF
|
2007-02-26 16:18:41 +01:00
|
|
|
copy %FB_ROOT_PATH%\src\extlib\ib_udf.sql %FB_OUTPUT_DIR%\udf > nul
|
|
|
|
copy %FB_ROOT_PATH%\src\extlib\fbudf\fbudf.sql %FB_OUTPUT_DIR%\udf > nul
|
2003-08-08 12:26:09 +02:00
|
|
|
:: Examples
|
2007-02-26 16:18:41 +01:00
|
|
|
@copy %FB_INSTALL_SCRIPTS%\install_super.bat %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_INSTALL_SCRIPTS%\install_classic.bat %FB_OUTPUT_DIR%\bin >nul
|
|
|
|
@copy %FB_INSTALL_SCRIPTS%\uninstall.bat %FB_OUTPUT_DIR%\bin >nul
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-01-06 11:33:18 +01:00
|
|
|
|