8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Prefix (almost) all env vars with FB.

Refactor common code (mostly into set_build_target.bat).
Ensure that all VS2005 x64 output is clearly generated into x64
directories,  and likewise for Win32 output
This commit is contained in:
paul_reeves 2007-02-26 15:18:41 +00:00
parent dca3fab473
commit e528997dc7
15 changed files with 339 additions and 315 deletions

View File

@ -4,28 +4,38 @@
@if errorlevel 1 (goto :END)
@echo Cleaning temporary directories
@rmdir /S /Q %ROOT_PATH%\output 2>nul
@rmdir /S /Q %ROOT_PATH%\gen 2>nul
@rmdir /S /Q %ROOT_PATH%\temp 2>nul
@rmdir /S /Q %FB_OUTPUT_DIR% 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\gen 2>nul
@rmdir /S /Q %FB_TEMP_DIR% 2>nul
@echo Cleaning INTL
@rmdir /S /Q %ROOT_PATH%\extern\icu\bin
@rmdir /S /Q %ROOT_PATH%\extern\icu\include
@rmdir /S /Q %ROOT_PATH%\extern\icu\lib
@rmdir /S /Q %ROOT_PATH%\extern\icu\source\data\out
@del /Q %ROOT_PATH%\extern\icu\source\extra\uconv\resources\*.res
@del %ROOT_PATH%\extern\icu\source\extra\uconv\pkgdatain.txt
@del %ROOT_PATH%\extern\icu\source\stubdata\stubdatabuilt.txt
@rmdir /S /Q %ROOT_PATH%\extern\icu\source\test\testdata\out
@rmdir /S /Q %ROOT_PATH%\extern\icu\source\tools\gencmn\decmn_Win32_Release
@rmdir /S /Q %ROOT_PATH%\extern\icu\source\tools\genrb\derb_Win32_Release
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\bin 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\include 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\lib 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\source\data\out 2>nul
@del /Q %FB_ROOT_PATH%\extern\icu\source\extra\uconv\resources\*.res 2>nul
@del %FB_ROOT_PATH%\extern\icu\source\extra\uconv\pkgdatain.txt 2>nul
@del %FB_ROOT_PATH%\extern\icu\source\stubdata\stubdatabuilt.txt 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\source\test\testdata\out 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\source\tools\gencmn\decmn_Win32_Release 2>nul
@rmdir /S /Q %FB_ROOT_PATH%\extern\icu\source\tools\genrb\derb_Win32_Release 2>nul
@echo Cleaning and install build files
@del *.log 2>nul
@del %ROOT_PATH%\src\include\gen\autoconfig.h 2>nul
@del %ROOT_PATH%\src\include\gen\blrtable.h 2>nul
@del %ROOT_PATH%\builds\win32\msvc6\*.plg 2>nul
@del %ROOT_PATH%\builds\win32\msvc7\*.plg 2>nul
@del %ROOT_PATH%\builds\install\arch-specific\win32\*.dll 2>nul
@rmdir /s /q %ROOT_PATH%\builds\win32\install_image 2>nul
::This really does clean the icu stuff - but is it too much? Not cleaning speeds
::up the build process if a previous build has been made for the same target.
::for /R %FB_ROOT_PATH%\extern\icu\source\ %%a in (release) do (rmdir /q /s "%%a" 2>nul)
::for /R %FB_ROOT_PATH%\extern\icu\source\ %%a in (debug) do (rmdir /q /s "%%a" 2>nul)
@echo Cleaning install and build files
@del *%FB_TARGET_PLATFORM%.log 2>nul
@del *.manifest 2>nul
@del %FB_ROOT_PATH%\src\include\gen\autoconfig.h 2>nul
@del %FB_ROOT_PATH%\src\include\gen\blrtable.h 2>nul
@del %FB_ROOT_PATH%\builds\win32\msvc6\*.plg 2>nul
@rmdir /s /q %FB_ROOT_PATH%\builds\win32\install_image 2>nul
@del %FB_ROOT_PATH%\src\dsql\dsql.tab.h 2>nul
@del %FB_ROOT_PATH%\src\dsql\parse.cpp 2>nul
@echo Completed executing %0
@echo.

View File

@ -1,17 +1,20 @@
@echo off
::==============
:: compile.bat solution, output, [projects...]
:: Note: MSVC7/8 don't accept more than one project
::
:: Note2: Our MSVC8 projects create object files in temp/$platform/$config
:: but we call devenv with $config|$platform (note variable in reverse order
:: and odd syntax.) This extended syntax for devenv does not seem to be
:: supported in MSVC7 (despite documentation to the contrary.)
setlocal
set solution=%1
set output=%2
set projects=""
set projects=
@if "%DBG%"=="" (
if "%VS_VER%"=="msvc6" (
@if "%FB_DBG%"=="" (
if "%VS_VER%"=="msvc6" (
set config=Release
) else (
set config=release
@ -23,6 +26,9 @@ set projects=""
set config=debug
)
)
if %MSVC_VERSION% GEQ 8 (
set config="%config%|%FB_TARGET_PLATFORM%"
)
if "%VS_VER%"=="msvc6" (
set exec=msdev
@ -30,11 +36,7 @@ if "%VS_VER%"=="msvc6" (
if "%VS_VER_EXPRESS%"=="1" (
set exec=vcexpress
) else (
set exec=devenv
)
if "%VS_VER%"=="msvc8" (
set config="%config%|%PLATFORM%"
set exec=devenv /USEENV
)
)
@ -63,11 +65,10 @@ if "%VS_VER%"=="msvc6" (
set projects=/MAKE "all - Win32 %config%"
)
)
if "%VS_VER%"=="msvc6" (
%exec% %solution%.dsw %projects% %CLEAN% /OUT %output%
%exec% %solution%.dsw %projects% %FB_CLEAN% /OUT %output%
) else (
%exec% %solution%.sln %projects% %CLEAN% %config% /OUT %output%
%exec% %solution%.sln %projects% %FB_CLEAN% %config% /OUT %output%
)
endlocal

View File

@ -5,33 +5,33 @@
@if "%1"=="msg" goto MSG
@if exist "%DB_PATH%\gen\dbs\msg.fdb" del "%DB_PATH%\gen\dbs\msg.fdb"
@if exist "%FB_DB_PATH%\gen\dbs\msg.fdb" del "%FB_DB_PATH%\gen\dbs\msg.fdb"
@echo create database '%DB_PATH%\gen\dbs\msg.fdb'; | "%ROOT_PATH%\gen\isql_embed" -q
@set MSG_ISQL=@"%ROOT_PATH%\gen\isql_embed" -q %DB_PATH%\gen\dbs\msg.fdb -i %ROOT_PATH%\src\msgs\
@%MSG_ISQL%msg.sql
@%MSG_ISQL%facilities.sql
@echo create database '%FB_DB_PATH%\gen\dbs\msg.fdb'; | "%FB_ROOT_PATH%\gen\isql_embed" -q
@set FB_MSG_ISQL=@"%FB_ROOT_PATH%\gen\isql_embed" -q %FB_DB_PATH%\gen\dbs\msg.fdb -i %FB_ROOT_PATH%\src\msgs\
@%FB_MSG_ISQL%msg.sql
@%FB_MSG_ISQL%facilities.sql
@echo.
@echo loading locales
@%MSG_ISQL%locales.sql
@%FB_MSG_ISQL%locales.sql
@echo loading history
@%MSG_ISQL%history.sql
@%FB_MSG_ISQL%history.sql
@echo loading messages
@%MSG_ISQL%messages.sql
@%FB_MSG_ISQL%messages.sql
@echo loading symbols
@%MSG_ISQL%symbols.sql
@%FB_MSG_ISQL%symbols.sql
@echo loading system errors
@%MSG_ISQL%system_errors.sql
@%FB_MSG_ISQL%system_errors.sql
@echo loading French translation
@%MSG_ISQL%transmsgs.fr_FR.sql
@%FB_MSG_ISQL%transmsgs.fr_FR.sql
@echo loading German translation
@%MSG_ISQL%transmsgs.de_DE.sql
@%FB_MSG_ISQL%transmsgs.de_DE.sql
@if "%1"=="db" goto END
:MSG
@echo Building message file and codes header...
@%ROOT_PATH%\gen\build_msg -f %DB_PATH%/gen/firebird.msg -D %DB_PATH%/gen/dbs/msg.fdb
@%ROOT_PATH%\gen\codes %ROOT_PATH%\src\include\gen %ROOT_PATH%\lang_helpers
@%FB_ROOT_PATH%\gen\build_msg -f %FB_DB_PATH%/gen/firebird.msg -D %FB_DB_PATH%/gen/dbs/msg.fdb
@%FB_ROOT_PATH%\gen\codes %FB_ROOT_PATH%\src\include\gen %FB_ROOT_PATH%\lang_helpers
:END

View File

@ -1,3 +0,0 @@
instreg install -z
instsvc install -auto -classic -guardian -z
instsvc start

View File

@ -1,3 +0,0 @@
instreg install -z
instsvc install -auto -superserver -guardian -z
instsvc start

View File

@ -7,25 +7,17 @@ set ERRLEV=0
@if errorlevel 1 (call :ERROR Executing setenvvar.bat failed & goto :EOF)
:: verify that boot was run before
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
@if not exist %FB_ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
::===========
:: Read input values
@set DBG=
@set DBG_DIR=release
@set CLEAN=/build
@if "%1"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%2"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%1"=="CLEAN" (set CLEAN=/rebuild)
@if "%2"=="CLEAN" (set CLEAN=/rebuild)
@call set_build_target.bat %*
::==========
:: MAIN
@echo Building %DBG_DIR%
@echo Building %FB_OBJ_DIR%
call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2 make_all.log
if errorlevel 1 call :ERROR build failed - see make_all.log for details
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
@if "%ERRLEV%"=="1" (
@goto :EOF
@ -37,73 +29,75 @@ if errorlevel 1 call :ERROR build failed - see make_all.log for details
::===========
:MOVE
@echo Copying files to output
@del %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\*.exp 2>nul
@del %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\*.lib 2>nul
@rmdir /q /s %ROOT_PATH%\output 2>nul
@mkdir %ROOT_PATH%\output
@mkdir %ROOT_PATH%\output\bin
@mkdir %ROOT_PATH%\output\intl
@mkdir %ROOT_PATH%\output\udf
@mkdir %ROOT_PATH%\output\help
::@mkdir %ROOT_PATH%\output\doc
@mkdir %ROOT_PATH%\output\include
@mkdir %ROOT_PATH%\output\lib
@mkdir %ROOT_PATH%\output\system32 > nul
@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
@copy %ROOT_PATH%\extern\icu\bin\icuuc30.dll %ROOT_PATH%\output\bin >nul
@copy %ROOT_PATH%\extern\icu\bin\icudt30.dll %ROOT_PATH%\output\bin >nul
@copy %ROOT_PATH%\extern\icu\bin\icuin30.dll %ROOT_PATH%\output\bin >nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\* %ROOT_PATH%\output\bin >nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\intl\* %ROOT_PATH%\output\intl >nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\udf\* %ROOT_PATH%\output\udf >nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\system32\* %ROOT_PATH%\output\system32 >nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\fbclient\fbclient.lib %ROOT_PATH%\output\lib\fbclient_ms.lib >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
:: Firebird.conf, etc
@copy %ROOT_PATH%\gen\firebird.msg %ROOT_PATH%\output > nul
@copy %ROOT_PATH%\builds\install\misc\firebird.conf %ROOT_PATH%\output >nul
@copy %ROOT_PATH%\builds\install\misc\fbintl.conf %ROOT_PATH%\output\intl >nul
@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
:: DATABASES
@copy %ROOT_PATH%\gen\dbs\SECURITY2.FDB %ROOT_PATH%\output\security2.fdb >nul
@copy %ROOT_PATH%\gen\dbs\HELP.fdb %ROOT_PATH%\output\help\help.fdb >nul
::@copy %ROOT_PATH%\gen\firebird.msg %ROOT_PATH%\output\firebird.msg >nul
@copy %ROOT_PATH%\builds\misc\security.gbak %ROOT_PATH%\output\security2.fbk > nul
@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
:: DOCS
::@copy %ROOT_PATH%\ChangeLog %ROOT_PATH%\output\doc\ChangeLog.txt >nul
::@copy %ROOT_PATH%\doc\WhatsNew %ROOT_PATH%\output\doc\WhatsNew.txt >nul
::@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
:: HEADERS
:: 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.
echo #pragma message("Non-production version of ibase.h.") > %ROOT_PATH%\output\include\ibase.tmp
echo #pragma message("Using raw, unprocessed concatenation of header files.") >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\misc\ibase_header.txt >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\include\types_pub.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\jrd\dsc_pub.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\dsql\sqlda_pub.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\jrd\ibase.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\jrd\inf_pub.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\include\consts_pub.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\jrd\blr.h >> %ROOT_PATH%\output\include\ibase.tmp
type %ROOT_PATH%\src\include\gen\iberror.h >> %ROOT_PATH%\output\include\ibase.tmp
sed -f %ROOT_PATH%\src\misc\headers.sed < %ROOT_PATH%\output\include\ibase.tmp > %ROOT_PATH%\output\include\ibase.h
del %ROOT_PATH%\output\include\ibase.tmp > nul
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
::Copy additional headers
copy %ROOT_PATH%\src\extlib\ib_util.h %ROOT_PATH%\output\include > nul
copy %ROOT_PATH%\src\jrd\perf.h %ROOT_PATH%\output\include >nul
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
::This is in ibase.h so why make a separate copy?
::copy %ROOT_PATH%\src\jrd\blr.h %ROOT_PATH%\output\include > nul
copy %ROOT_PATH%\src\include\gen\iberror.h %ROOT_PATH%\output\include > nul
::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
:: UDF
copy %ROOT_PATH%\src\extlib\ib_udf.sql %ROOT_PATH%\output\udf > nul
copy %ROOT_PATH%\src\extlib\fbudf\fbudf.sql %ROOT_PATH%\output\udf > nul
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
:: Examples
@copy install_super.bat %ROOT_PATH%\output\bin >nul
@copy install_classic.bat %ROOT_PATH%\output\bin >nul
@copy uninstall.bat %ROOT_PATH%\output\bin >nul
@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
@goto :EOF

View File

@ -11,38 +11,31 @@ set ERRLEV=0
@call setenvvar.bat
@if errorlevel 1 (goto :END)
::===========
:: Read input values
@set DBG=
@set DBG_DIR=release
@set CLEAN=/build
@if "%1"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%2"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%1"=="CLEAN" (set CLEAN=/rebuild)
@if "%2"=="CLEAN" (set CLEAN=/rebuild)
@call set_build_target.bat %*
::===========
:MAIN
@echo.
@echo Copy autoconfig.h
@del %ROOT_PATH%\src\include\gen\autoconfig.h 2> nul
@copy %ROOT_PATH%\src\include\gen\autoconfig_msvc.h %ROOT_PATH%\src\include\gen\autoconfig.h > nul
@del %FB_ROOT_PATH%\src\include\gen\autoconfig.h 2> nul
@copy %FB_ROOT_PATH%\src\include\gen\autoconfig_msvc.h %FB_ROOT_PATH%\src\include\gen\autoconfig.h > nul
@echo Creating directories
@rmdir /s /q %ROOT_PATH%\gen 2>nul
@rmdir /s /q %FB_ROOT_PATH%\gen 2>nul
:: Remove previously generated output, and recreate the directory hierarchy. Note the exceptions to the rule!
for %%v in ( alice burp dsql dudley gpre isql journal jrd misc msgs qli examples ) do (
if NOT "%%v"=="journal" (@mkdir %ROOT_PATH%\gen\%%v 2>nul)
if NOT "%%v"=="journal" (@mkdir %FB_ROOT_PATH%\gen\%%v )
)
@rmdir /s /q %ROOT_PATH%\gen\utilities 2>nul
@mkdir %ROOT_PATH%\gen\utilities 2>nul
@mkdir %ROOT_PATH%\gen\utilities\gstat 2>nul
@mkdir %ROOT_PATH%\gen\utilities\gsec 2>nul
@rmdir /s /q %FB_ROOT_PATH%\gen\utilities 2>nul
@mkdir %FB_ROOT_PATH%\gen\utilities 2>nul
@mkdir %FB_ROOT_PATH%\gen\utilities\gstat 2>nul
@mkdir %FB_ROOT_PATH%\gen\utilities\gsec 2>nul
::=======
call :btyacc
if "%ERRLEV%"=="1" goto :END
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\btyacc.exe %ROOT_PATH%\gen\ > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\btyacc.exe %FB_ROOT_PATH%\gen\ > nul
@echo Generating DSQL parser...
@call parse.bat
@ -56,7 +49,7 @@ if "%ERRLEV%"=="1" goto :END
::=======
call :gpre_boot
if "%ERRLEV%"=="1" goto :END
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\gpre_boot.exe %ROOT_PATH%\gen\ > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\gpre_boot.exe %FB_ROOT_PATH%\gen\ > nul
::=======
@echo Preprocessing the source files needed to build gbak_embed, gpre_embed and isql_embed...
@ -71,13 +64,13 @@ if "%ERRLEV%"=="1" goto :END
call :isql_embed
if "%ERRLEV%"=="1" goto :END
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\gbak_embed.exe %ROOT_PATH%\gen > nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\gpre_embed.exe %ROOT_PATH%\gen > nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\isql_embed.exe %ROOT_PATH%\gen > nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\firebird\bin\fbembed.dll %ROOT_PATH%\gen > nul
@copy %ROOT_PATH%\extern\icu\bin\icuuc30.dll %ROOT_PATH%\gen >nul
@copy %ROOT_PATH%\extern\icu\bin\icudt30.dll %ROOT_PATH%\gen >nul
@copy %ROOT_PATH%\extern\icu\bin\icuin30.dll %ROOT_PATH%\gen >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\gbak_embed.exe %FB_ROOT_PATH%\gen > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\gpre_embed.exe %FB_ROOT_PATH%\gen > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\isql_embed.exe %FB_ROOT_PATH%\gen > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\bin\fbembed.dll %FB_ROOT_PATH%\gen > nul
@copy %FB_ROOT_PATH%\extern\icu\bin\icuuc30.dll %FB_ROOT_PATH%\gen >nul
@copy %FB_ROOT_PATH%\extern\icu\bin\icudt30.dll %FB_ROOT_PATH%\gen >nul
@copy %FB_ROOT_PATH%\extern\icu\bin\icuin30.dll %FB_ROOT_PATH%\gen >nul
::=======
@call :databases
@ -100,8 +93,8 @@ if "%ERRLEV%"=="1" goto :END
:: BUILD btyacc
:btyacc
@echo.
@echo Building btyacc (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot btyacc.log btyacc
@echo Building btyacc (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot btyacc.log btyacc
if errorlevel 1 call :boot2 btyacc
goto :EOF
@ -109,8 +102,8 @@ goto :EOF
:: BUILD gpre_boot
:gpre_boot
@echo.
@echo Building gpre_boot (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gpre_boot.log gpre_boot
@echo Building gpre_boot (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gpre_boot.log gpre_boot
if errorlevel 1 goto :gpre_boot2
goto :EOF
@ -128,8 +121,8 @@ goto :EOF
:: BUILD gbak_embed
:gbak_embed
@echo.
@echo Building gbak_embed (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gbak_embed.log gbak_embed
@echo Building gbak_embed (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gbak_embed.log gbak_embed
if errorlevel 1 call :boot2 gbak_embed
@goto :EOF
@ -137,8 +130,8 @@ if errorlevel 1 call :boot2 gbak_embed
:: BUILD gpre_embed
:gpre_embed
@echo.
@echo Building gpre_embed (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gpre_embed.log gpre_embed
@echo Building gpre_embed (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot gpre_embed.log gpre_embed
if errorlevel 1 call :boot2 gpre_embed
@goto :EOF
@ -146,8 +139,8 @@ if errorlevel 1 call :boot2 gpre_embed
:: BUILD isql_embed
:isql_embed
@echo.
@echo Building isql_embed (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot isql_embed.log isql_embed
@echo Building isql_embed (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot isql_embed.log isql_embed
if errorlevel 1 call :boot2 isql_embed
@goto :EOF
@ -165,10 +158,10 @@ goto :EOF
:: BUILD messages
:msgs
@echo.
@echo Building build_msg (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot build_msg.log build_msg
@echo Building build_msg (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot build_msg.log build_msg
if errorlevel 1 goto :msgs2
@copy %ROOT_PATH%\temp\%DBG_DIR%\build_msg\build_msg.exe %ROOT_PATH%\gen\ > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\build_msg\build_msg.exe %FB_ROOT_PATH%\gen\ > nul
@goto :EOF
:msgs2
echo.
@ -181,10 +174,10 @@ goto :EOF
:: BUILD codes
:codes
@echo.
@echo Building codes (%DBG_DIR%)...
@call compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot codes.log codes
@echo Building codes (%FB_OBJ_DIR%)...
@call compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot codes.log codes
if errorlevel 1 goto :codes2
@copy %ROOT_PATH%\temp\%DBG_DIR%\codes\codes.exe %ROOT_PATH%\gen\ > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\codes\codes.exe %FB_ROOT_PATH%\gen\ > nul
@goto :EOF
:codes2
echo.
@ -195,18 +188,18 @@ goto :EOF
::==============
:databases
@rmdir /s /q %ROOT_PATH%\gen\dbs 2>nul
@mkdir %ROOT_PATH%\gen\dbs 2>nul
@rmdir /s /q %FB_ROOT_PATH%\gen\dbs 2>nul
@mkdir %FB_ROOT_PATH%\gen\dbs 2>nul
@echo create database '%DB_PATH%\gen\dbs\security2.fdb'; | "%ROOT_PATH%\gen\isql_embed" -q
@"%ROOT_PATH%\gen\isql_embed" -q %DB_PATH%\gen\dbs\security2.fdb -i %ROOT_PATH%\src\dbs\security.sql
@echo create database '%FB_DB_PATH%\gen\dbs\security2.fdb'; | "%FB_ROOT_PATH%\gen\isql_embed" -q
@"%FB_ROOT_PATH%\gen\isql_embed" -q %FB_DB_PATH%\gen\dbs\security2.fdb -i %FB_ROOT_PATH%\src\dbs\security.sql
@%ROOT_PATH%\gen\gbak_embed -r %ROOT_PATH%\builds\misc\metadata.gbak %DB_PATH%\gen\dbs\metadata.fdb
@%FB_ROOT_PATH%\gen\gbak_embed -r %FB_ROOT_PATH%\builds\misc\metadata.gbak %FB_DB_PATH%\gen\dbs\metadata.fdb
@call create_msgs.bat db
@%ROOT_PATH%\gen\gbak_embed -r %ROOT_PATH%\builds\misc\help.gbak %DB_PATH%\gen\dbs\help.fdb
@copy %ROOT_PATH%\gen\dbs\metadata.fdb %ROOT_PATH%\gen\dbs\yachts.lnk > nul
@%FB_ROOT_PATH%\gen\gbak_embed -r %FB_ROOT_PATH%\builds\misc\help.gbak %FB_DB_PATH%\gen\dbs\help.fdb
@copy %FB_ROOT_PATH%\gen\dbs\metadata.fdb %FB_ROOT_PATH%\gen\dbs\yachts.lnk > nul
@goto :EOF

View File

@ -6,18 +6,9 @@
@if errorlevel 1 (goto :EOF)
:: verify that boot was run before
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
::===========
:: Read input values
@set DBG=
@set DBG_DIR=release
@set CLEAN=/build
@if "%1"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%2"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%1"=="CLEAN" (set CLEAN=/REBUILD)
@if "%2"=="CLEAN" (set CLEAN=/REBUILD)
@if not exist %FB_ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
@call set_build_target.bat %*
::Uncomment this to build intlemp
::set FB2_INTLEMP=1
@ -28,13 +19,13 @@
@call :BUILD_EMPBUILD
@echo.
@echo Building %DBG_DIR%
@echo Building %FB_OBJ_DIR%
if "%VS_VER%"=="msvc6" (
@compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2 examples.log empbuild intlbld
@compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2 examples.log empbuild intlbld
) else (
@compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples empbuild.log empbuild
if defined FB2_INTLEMP (
@compile.bat %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples intlbuild.log intlbuild
@compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples empbuild.log empbuild
if defined FB2_INTLEMP (
@compile.bat %FB_ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples intlbuild.log intlbuild
)
)
@ -47,37 +38,38 @@ if "%VS_VER%"=="msvc6" (
:BUILD_EMPBUILD
@echo.
@echo Building empbuild.fdb
@copy /y %ROOT_PATH%\output\bin\isql.exe %ROOT_PATH%\gen\examples\ > nul
@copy /y %ROOT_PATH%\examples\empbuild\*.sql %ROOT_PATH%\gen\examples\ > nul
@copy /y %ROOT_PATH%\examples\empbuild\*.inp %ROOT_PATH%\gen\examples\ > nul
@copy /y %FB_OUTPUT_DIR%\bin\isql.exe %FB_ROOT_PATH%\gen\examples\ > nul
@copy /y %FB_OUTPUT_DIR%\bin\fbclient.dll %FB_ROOT_PATH%\gen\examples\ > nul
@copy /y %FB_ROOT_PATH%\examples\empbuild\*.sql %FB_ROOT_PATH%\gen\examples\ > nul
@copy /y %FB_ROOT_PATH%\examples\empbuild\*.inp %FB_ROOT_PATH%\gen\examples\ > nul
@echo.
:: Here we must use cd because isql does not have an option to set a base directory
@cd %ROOT_PATH%\gen\examples
@cd %FB_ROOT_PATH%\gen\examples
@echo Creating empbuild.fdb...
@echo.
@del empbuild.fdb 2> nul
@%ROOT_PATH%\gen\examples\isql -i empbld.sql
@%FB_ROOT_PATH%\gen\examples\isql -i empbld.sql
if defined FB2_INTLEMP (
@echo Creating intlbuild.fdb...
@echo.
@del intlbuild.fdb 2> nul
@%ROOT_PATH%\gen\examples\isql -i intlbld.sql
@%FB_ROOT_PATH%\gen\examples\isql -i intlbld.sql
)
@cd %ROOT_PATH%\builds\win32
@cd %FB_ROOT_PATH%\builds\win32
@echo.
@echo path = %DB_PATH%/gen/examples
@echo path = %FB_DB_PATH%/gen/examples
@echo Preprocessing empbuild.e...
@echo.
@%ROOT_PATH%\gen\gpre_embed.exe -r -m -n -z %ROOT_PATH%\examples\empbuild\empbuild.e %ROOT_PATH%\gen\examples\empbuild.c -b %DB_PATH%/gen/examples/
@%FB_ROOT_PATH%\gen\gpre_embed.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\empbuild.e %FB_ROOT_PATH%\gen\examples\empbuild.c -b %FB_DB_PATH%/gen/examples/
if defined FB2_INTLEMP (
@echo Preprocessing intlbld.e...
@echo.
@%ROOT_PATH%\gen\gpre_embed.exe -r -m -n -z %ROOT_PATH%\examples\empbuild\intlbld.e %ROOT_PATH%\gen\examples\intlbld.c -b %DB_PATH%/gen/examples/
@%FB_ROOT_PATH%\gen\gpre_embed.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\intlbld.e %FB_ROOT_PATH%\gen\examples\intlbld.c -b %FB_DB_PATH%/gen/examples/
)
@goto :EOF
@ -86,38 +78,38 @@ if defined FB2_INTLEMP (
::===========
:MOVE
@echo.
@rmdir /q /s %ROOT_PATH%\output\examples 2>nul
@mkdir %ROOT_PATH%\output\examples
@mkdir %ROOT_PATH%\output\examples\api
@mkdir %ROOT_PATH%\output\examples\build_unix
@mkdir %ROOT_PATH%\output\examples\build_win32
@mkdir %ROOT_PATH%\output\examples\dyn
@mkdir %ROOT_PATH%\output\examples\empbuild
@mkdir %ROOT_PATH%\output\examples\include
@mkdir %ROOT_PATH%\output\examples\stat
@mkdir %ROOT_PATH%\output\examples\udf
@rmdir /q /s %FB_OUTPUT_DIR%\examples 2>nul
@mkdir %FB_OUTPUT_DIR%\examples
@mkdir %FB_OUTPUT_DIR%\examples\api
@mkdir %FB_OUTPUT_DIR%\examples\build_unix
@mkdir %FB_OUTPUT_DIR%\examples\build_win32
@mkdir %FB_OUTPUT_DIR%\examples\dyn
@mkdir %FB_OUTPUT_DIR%\examples\empbuild
@mkdir %FB_OUTPUT_DIR%\examples\include
@mkdir %FB_OUTPUT_DIR%\examples\stat
@mkdir %FB_OUTPUT_DIR%\examples\udf
@echo Moving files to output directory
@copy %ROOT_PATH%\examples\* %ROOT_PATH%\output\examples > nul
@ren %ROOT_PATH%\output\examples\readme readme.txt > nul
@copy %ROOT_PATH%\examples\api\* %ROOT_PATH%\output\examples\api > nul
@copy %ROOT_PATH%\examples\build_unix\* %ROOT_PATH%\output\examples\build_unix > nul
@copy %ROOT_PATH%\examples\build_win32\* %ROOT_PATH%\output\examples\build_win32 > nul
@copy %ROOT_PATH%\examples\dyn\* %ROOT_PATH%\output\examples\dyn > nul
:: @copy %ROOT_PATH%\examples\empbuild\* %ROOT_PATH%\output\examples\empbuild > nul
@copy %ROOT_PATH%\examples\empbuild\employe2.sql %ROOT_PATH%\output\examples\empbuild > nul
@copy %ROOT_PATH%\examples\include\* %ROOT_PATH%\output\examples\include > nul
@copy %ROOT_PATH%\examples\stat\* %ROOT_PATH%\output\examples\stat > nul
@copy %ROOT_PATH%\examples\udf\* %ROOT_PATH%\output\examples\udf > nul
@copy %ROOT_PATH%\src\extlib\ib_udf* %ROOT_PATH%\output\examples\udf > nul
@copy %ROOT_PATH%\src\extlib\fbudf\* %ROOT_PATH%\output\examples\udf > nul
@copy %FB_ROOT_PATH%\examples\* %FB_OUTPUT_DIR%\examples > nul
@ren %FB_OUTPUT_DIR%\examples\readme readme.txt > nul
@copy %FB_ROOT_PATH%\examples\api\* %FB_OUTPUT_DIR%\examples\api > nul
@copy %FB_ROOT_PATH%\examples\build_unix\* %FB_OUTPUT_DIR%\examples\build_unix > nul
@copy %FB_ROOT_PATH%\examples\build_win32\* %FB_OUTPUT_DIR%\examples\build_win32 > nul
@copy %FB_ROOT_PATH%\examples\dyn\* %FB_OUTPUT_DIR%\examples\dyn > nul
:: @copy %FB_ROOT_PATH%\examples\empbuild\* %FB_OUTPUT_DIR%\examples\empbuild > nul
@copy %FB_ROOT_PATH%\examples\empbuild\employe2.sql %FB_OUTPUT_DIR%\examples\empbuild > nul
@copy %FB_ROOT_PATH%\examples\include\* %FB_OUTPUT_DIR%\examples\include > nul
@copy %FB_ROOT_PATH%\examples\stat\* %FB_OUTPUT_DIR%\examples\stat > nul
@copy %FB_ROOT_PATH%\examples\udf\* %FB_OUTPUT_DIR%\examples\udf > nul
@copy %FB_ROOT_PATH%\src\extlib\ib_udf* %FB_OUTPUT_DIR%\examples\udf > nul
@copy %FB_ROOT_PATH%\src\extlib\fbudf\* %FB_OUTPUT_DIR%\examples\udf > nul
:: @copy %ROOT_PATH%\gen\examples\empbuild.c %ROOT_PATH%\output\examples\empbuild\ > nul
@copy %ROOT_PATH%\temp\%DBG_DIR%\examples\empbuild.exe %ROOT_PATH%\gen\examples\empbuild.exe > nul
:: @copy %FB_ROOT_PATH%\gen\examples\empbuild.c %FB_OUTPUT_DIR%\examples\empbuild\ > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\empbuild.exe %FB_ROOT_PATH%\gen\examples\empbuild.exe > nul
if defined FB2_INTLEMP (
if "%VS_VER%"=="msvc6" (
@copy %ROOT_PATH%\temp\%DBG_DIR%\examples\intlbld.exe %ROOT_PATH%\gen\examples\intlbuild.exe > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\intlbld.exe %FB_ROOT_PATH%\gen\examples\intlbuild.exe > nul
) else (
@copy %ROOT_PATH%\temp\%DBG_DIR%\examples\intlbuild.exe %ROOT_PATH%\gen\examples\intlbuild.exe > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\intlbuild.exe %FB_ROOT_PATH%\gen\examples\intlbuild.exe > nul
)
)
@goto :EOF
@ -129,29 +121,29 @@ if "%VS_VER%"=="msvc6" (
@echo Building employee.fdb
:: Here we must use cd because isql does not have an option to set a base directory
:: and empbuild.exe uses isql
@cd %ROOT_PATH%\gen\examples
@del %ROOT_PATH%\gen\examples\employee.fdb 2>nul
@%ROOT_PATH%\gen\examples\empbuild.exe %DB_PATH%/gen/examples/employee.fdb
@cd %FB_ROOT_PATH%\gen\examples
@del %FB_ROOT_PATH%\gen\examples\employee.fdb 2>nul
@%FB_ROOT_PATH%\gen\examples\empbuild.exe %FB_DB_PATH%/gen/examples/employee.fdb
if defined FB2_INTLEMP (
@echo Building intlemp.fdb
@del %ROOT_PATH%\gen\examples\intlemp.fdb 2>nul
@del %FB_ROOT_PATH%\gen\examples\intlemp.fdb 2>nul
@del isql.tmp 2>nul
@echo s;intlemp.fdb;%SERVER_NAME%:%ROOT_PATH%\gen\examples\intlemp.fdb;g > isql.tmp
@%ROOT_PATH%\gen\examples\intlbuild.exe %DB_PATH%/gen/examples/intlemp.fdb
@echo s;intlemp.fdb;%SERVER_NAME%:%FB_ROOT_PATH%\gen\examples\intlemp.fdb;g > isql.tmp
@%FB_ROOT_PATH%\gen\examples\intlbuild.exe %FB_DB_PATH%/gen/examples/intlemp.fdb
)
@cd %ROOT_PATH%\builds\win32
@cd %FB_ROOT_PATH%\builds\win32
@goto :EOF
::==============
:MOVE2
@copy %ROOT_PATH%\gen\examples\employee.fdb %ROOT_PATH%\output\examples\empbuild\ > nul
@copy %FB_ROOT_PATH%\gen\examples\employee.fdb %FB_ROOT_PATH%\output\examples\empbuild\ > nul
if defined FB2_INTLEMP (
if exist %ROOT_PATH%\gen\examples\intlemp.fdb (
@copy %ROOT_PATH%\gen\examples\intlemp.fdb %ROOT_PATH%\output\examples\empbuild\ > nul
if exist %FB_ROOT_PATH%\gen\examples\intlemp.fdb (
@copy %FB_ROOT_PATH%\gen\examples\intlemp.fdb %FB_ROOT_PATH%\output\examples\empbuild\ > nul
)
)

View File

@ -1,46 +1,23 @@
@echo off
::Set up the compiler environment
if DEFINED VS80COMNTOOLS (
@devenv /? >nul 2>nul
@if errorlevel 9009 (call "%VS80COMNTOOLS%vsvars32.bat") else ( echo The file: & echo "%VS80COMNTOOLS%vsvars32.bat" & echo has already been executed.)
) else (
if DEFINED VS71COMNTOOLS (
@devenv /? >nul 2>nul
@if errorlevel 9009 (call "%VS71COMNTOOLS%vsvars32.bat") else ( echo The file: & echo "%VS71COMNTOOLS%vsvars32.bat" & echo has already been executed.)
) else (
@msdev /? >nul 2>nul
@if errorlevel 9009 (call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat") else (echo MSVC6 vcvars.bat has already been executed.)
)
)
@echo.
:: Set env vars
@call setenvvar.bat
::===========
:: Read input values
@set DBG=
@set DBG_DIR=release
@set CLEAN=/build
@if "%1"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%2"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
@if "%1"=="CLEAN" (set CLEAN=/rebuild)
@if "%2"=="CLEAN" (set CLEAN=/rebuild)
@call set_build_target.bat %* icu
::==========
:: MAIN
@echo Building %DBG_DIR%
@echo Building %FB_OBJ_DIR% for %FB_TARGET_PLATFORM%
if "%VS_VER%"=="msvc8" (
@call compile.bat %ROOT_PATH%\extern\icu\source\allinone\allinone_8 make_icu.log
@call compile.bat %FB_ROOT_PATH%\extern\icu\source\allinone\allinone_8 make_icu_%FB_TARGET_PLATFORM%.log
) else (
@call compile.bat %ROOT_PATH%\extern\icu\source\allinone\allinone make_icu.log
@call compile.bat %FB_ROOT_PATH%\extern\icu\source\allinone\allinone make_icu_%FB_TARGET_PLATFORM%.log
)
if errorlevel 1 call :ERROR build failed - see make_icu.log for details
if errorlevel 1 call :ERROR build failed - see make_icu_%FB_TARGET_PLATFORM%.log for details
@goto :EOF

View File

@ -8,10 +8,10 @@
@echo Generating parse.cpp and dsql.tab.h
%ROOT_PATH%\gen\btyacc -l -d -S %ROOT_PATH%\src\dsql\btyacc_fb.ske %ROOT_PATH%\src\dsql\parse.y
%FB_ROOT_PATH%\gen\btyacc -l -d -S %FB_ROOT_PATH%\src\dsql\btyacc_fb.ske %FB_ROOT_PATH%\src\dsql\parse.y
@if errorlevel 1 (exit /B 1)
@copy y_tab.h %ROOT_PATH%\src\dsql\dsql.tab.h > nul
@copy y_tab.c %ROOT_PATH%\src\dsql\parse.cpp > nul
@copy y_tab.h %FB_ROOT_PATH%\src\dsql\dsql.tab.h > nul
@copy y_tab.c %FB_ROOT_PATH%\src\dsql\parse.cpp > nul
@del y_tab.h
@del y_tab.c

View File

@ -30,11 +30,11 @@
@echo Calling GPRE for %1/%2.epp
@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2)
@if not exist %ROOT_PATH%\gen\%1\%2.cpp (
@move %ROOT_PATH%\gen\preprocessing.cpp %ROOT_PATH%\gen\%1\%2.cpp
@if not exist %FB_ROOT_PATH%\gen\%1\%2.cpp (
@move %FB_ROOT_PATH%\gen\preprocessing.cpp %FB_ROOT_PATH%\gen\%1\%2.cpp
) else (
@fc %ROOT_PATH%\gen\preprocessing.cpp %ROOT_PATH%\gen\%1\%2.cpp >nul
@if errorlevel 1 @move %ROOT_PATH%\gen\preprocessing.cpp %ROOT_PATH%\gen\%1\%2.cpp
@fc %FB_ROOT_PATH%\gen\preprocessing.cpp %FB_ROOT_PATH%\gen\%1\%2.cpp >nul
@if errorlevel 1 @move %FB_ROOT_PATH%\gen\preprocessing.cpp %FB_ROOT_PATH%\gen\%1\%2.cpp
)
@echo.
@ -42,25 +42,25 @@
::===========
:GPRE_M
@%GPRE% -n -m -raw %ROOT_PATH%\src\%1\%2.epp %ROOT_PATH%\gen\preprocessing.cpp -b %DB_PATH%/gen/dbs/
@%GPRE% -n -m -raw %FB_ROOT_PATH%\src\%1\%2.epp %FB_ROOT_PATH%\gen\preprocessing.cpp -b %FB_DB_PATH%/gen/dbs/
@goto :EOF
::===========
:GPRE_GDS
@%GPRE% -n -gds -raw -ids %ROOT_PATH%\src\%1\%2.epp %ROOT_PATH%\gen\preprocessing.cpp -b %DB_PATH%/gen/dbs/
@%GPRE% -n -gds -raw -ids %FB_ROOT_PATH%\src\%1\%2.epp %FB_ROOT_PATH%\gen\preprocessing.cpp -b %FB_DB_PATH%/gen/dbs/
goto :EOF
::===========
:BOOT_PROCESS
@echo.
@set GPRE=%ROOT_PATH%\gen\gpre_boot -lang_internal
@set GPRE=%FB_ROOT_PATH%\gen\gpre_boot -lang_internal
@for %%i in (array, blob, metd) do @call :PREPROCESS dsql %%i
@for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i
@for %%i in (backup, restore) do @call :PREPROCESS burp %%i
@for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i
@for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
@set GPRE=%ROOT_PATH%\gen\gpre_boot
@set GPRE=%FB_ROOT_PATH%\gen\gpre_boot
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (array, blob, metd) do @call :PREPROCESS dsql %%i
@for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i
@ -70,7 +70,7 @@ goto :EOF
::===========
:MASTER_PROCESS
@set GPRE=%ROOT_PATH%\gen\gpre_embed
@set GPRE=%FB_ROOT_PATH%\gen\gpre_embed
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (backup, restore) do @call :PREPROCESS burp %%i
@for %%i in (array, blob, metd) do @call :PREPROCESS dsql %%i

View File

@ -5,26 +5,18 @@ set ERRLEV=0
call clean_all
call make_icu
if "%ERRLEV%"=="1" goto :END
call make_boot
if "%ERRLEV%"=="1" goto :END2
call make_all
if "%ERRLEV%"=="1" goto :END2
if "%ERRLEV%"=="1" goto :END
call make_all
if "%ERRLEV%"=="1" goto :END
call make_examples
if "%ERRLEV%"=="1" goto :END2
cd ..\install\arch-specific\win32
call BuildExecutableInstall
cd ..\..\..\win32
if "%ERRLEV%"=="1" goto :END
pushd ..\install\arch-specific\win32
call BuildExecutableInstall ZIP
popd
goto:END2
goto:END
::===========
:HELP
@echo.
@echo Build process need the FIREBIRD environment variable set to work.
@echo FIREBIRD value should be the root directory of your Firebird installation.
@echo Example:
@echo c:\program files\firebird
@echo.
@goto :END2
:END2
:END

View File

@ -0,0 +1,32 @@
@echo off
set FB_DBG=
set FB_OBJ_DIR=release
set FB_CLEAN=/build
set FB_ICU=
for %%v in ( %* ) do (
( if /I "%%v"=="DEBUG" ( (set FB_DBG=TRUE) && (set FB_OBJ_DIR=debug) ) )
( if /I "%%v"=="CLEAN" (set FB_CLEAN=/rebuild) )
( if /I "%%v"=="ICU" (set FB_ICU=1) )
)
::If we are build icu then we want to test for a platform switch.
::If found we must rebuild.
if defined FB_ICU (
if exist make_icu_win32.log (
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" ((set FB_CLEAN=/rebuild) & (@echo Rebuilding icu))
)
if exist make_icu_x64.log (
if "%PROCESSOR_ARCHITECTURE%"=="x86" ((set FB_CLEAN=/rebuild) & (@echo Rebuilding icu))
)
)
::For now, icu continues to use the old object directory hierarchy
if not defined FB_ICU (
if %MSVC_VERSION% GEQ 8 (set FB_OBJ_DIR=%FB_TARGET_PLATFORM%\%FB_OBJ_DIR%)
)
@echo Executed %0
@echo.

View File

@ -1,39 +1,81 @@
:: This bat sets the environment values
:: ROOT_PATH dos format path of the main directory
:: DB_PATH unix format path of the main directory
:: This batch file sets the environment values
:: FB_ROOT_PATH dos format path of the main directory
:: FB_DB_PATH unix format path of the main directory
:: (We probably don't need this anymore. Anyone got time to check?)
:: VS_VER VisualStudio version (msvc6|msvc7|msvc8)
:: SERVER_NAME server needed to connect to firebird (could include port)
:: Example : localhost/3051
:: (Note - SERVER_NAME is almost deprecated - it is only used by
:: make_examples.bat
::
:: Note for VS8 and 64-bit build environment: The assumption is that a
:: 64-bit host is available and builds are targeted at either the native
:: 64-bit environment or the 32-bit WOW64 environment. Cross-compiling 64-bit
:: from a 32-bit host is not currently supported from this set of batch files.
::
@echo off
::===============================
::Set up the compiler environment
if DEFINED VS80COMNTOOLS (
@devenv /? >nul 2>nul
@if errorlevel 9009 (call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" %PROCESSOR_ARCHITECTURE%) else ( echo The file: & @echo "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" %PROCESSOR_ARCHITECTURE% & echo has already been executed.)
) else (
if DEFINED VS71COMNTOOLS (
@devenv /? >nul 2>nul
@if errorlevel 9009 (call "%VS71COMNTOOLS%vsvars32.bat") else ( echo The file: & echo "%VS71COMNTOOLS%vsvars32.bat" & echo has already been executed.)
) else (
@msdev /? >nul 2>nul
@if errorlevel 9009 (call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat") else (echo MSVC6 vcvars.bat has already been executed.)
)
)
@echo.
::=================
:SET_DB_DIR
@SET SERVER_NAME=localhost
@set PLATFORM=win32
@if %PROCESSOR_ARCHITECTURE%==x86 (set PLATFORM=win32)
@if %PROCESSOR_ARCHITECTURE%==AMD64 (set PLATFORM=x64)
@cd ..\..
@for /f "delims=" %%a in ('@cd') do (set ROOT_PATH=%%a)
@for /f "delims=" %%a in ('@cd') do (set FB_ROOT_PATH=%%a)
@cd %~dp0
@for /f "tokens=*" %%a in ('@echo %ROOT_PATH:\=/%') do (set DB_PATH=%%a)
@for /f "tokens=*" %%a in ('@echo %FB_ROOT_PATH:\=/%') do (set FB_DB_PATH=%%a)
::=================
:SET_MSVC_VER
@vcexpress /? >nul 2>nul
@if not errorlevel 9009 ((set MSVC_VERSION=8) & (set VS_VER=msvc8) & (set VS_VER_EXPRESS=1) & (goto :END))
@if not errorlevel 9009 ((set MSVC_VERSION=8) & (set VS_VER=msvc8) & (set VS_VER_EXPRESS=1) & (goto :SET_FB_TARGET_PLATFORM))
@set VS_VER_EXPRESS=
@for /f "delims=." %%a in ('@devenv /?') do (
@for /f "tokens=6" %%b in ("%%a") do ((set MSVC_VERSION=%%b) & (set VS_VER=msvc%%b) & (goto :END))
@for /f "tokens=6" %%b in ("%%a") do ((set MSVC_VERSION=%%b) & (set VS_VER=msvc%%b) & (goto :SET_FB_TARGET_PLATFORM))
)
@msdev /? >nul 2>nul
@if not errorlevel 9009 ((set MSVC_VERSION=6) & (set VS_VER=msvc6) & (goto :END))
@if not errorlevel 9009 ((set MSVC_VERSION=6) & (set VS_VER=msvc6) & (goto :SET_FB_TARGET_PLATFORM))
@if not defined MSVC_VERSION goto :HELP
:SET_FB_TARGET_PLATFORM
@set FB_TARGET_PLATFORM=win32
:: If MSVC >= 8 then we can test for processor architecture
:: We certainly don't want to try and set platform=x64 if MSVC7 is installed
@if %MSVC_VERSION% GEQ 8 (
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (set FB_TARGET_PLATFORM=win32)
@if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set FB_TARGET_PLATFORM=x64)
)
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%
@set FB_TEMP_DIR=%FB_ROOT_PATH%\temp\%FB_TARGET_PLATFORM%
@set FB_INSTALL_SCRIPTS=%FB_ROOT_PATH%\builds\install\arch-specific\win32
goto :END
::===========
@ -46,29 +88,29 @@
@echo You need MS Visual Studio 6, 7 or 8 to build Firebird
@echo from these batch files.
@echo.
@echo Perhaps you need to run something like:
@echo.
@echo %%VS71COMNTOOLS%%\vsvars32.bat
@echo.
@echo or
@echo %%VS80COMNTOOLS%%\vsvars32.bat
@echo.
@echo depending on the version of Visual Studio.
@echo A properly installed version of Visual Studio will set
@echo an environment variable such as %%VS71COMNTOOLS%% or
@echo %%VS80COMNTOOLS%%. We use that variable to run the
@echo appropriate batch file to set up the build environment.
@echo.
:: set errorlevel
@exit /B 1
:END
@echo.
@echo Setting Environment Variables thus...
@echo.
@echo vs_ver=%VS_VER%
if defined VS_VER_EXPRESS (
@echo vs_ver_express=%VS_VER_EXPRESS%
@echo platform=%PLATFORM%
)
@echo platform=%FB_TARGET_PLATFORM%
@echo msvc_version=%MSVC_VERSION%
@echo db_path=%DB_PATH%
@echo root_path=%ROOT_PATH%
@echo db_path=%FB_DB_PATH%
@echo root_path=%FB_ROOT_PATH%
@echo server_name=%SERVER_NAME%
@echo.
@echo (End of %0)
@echo.
@exit /B 0

View File

@ -1,3 +0,0 @@
instsvc stop
instsvc remove -z
instreg remove -z