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

Automate the Win32 build process a little bit more.

This commit is contained in:
paul_reeves 2003-06-04 08:22:12 +00:00
parent 474fe0b114
commit 006f8ff875
2 changed files with 81 additions and 40 deletions

View File

@ -1,10 +1,10 @@
:: run prepare.bat first
:: Then run this script.
:: After that run makeX_debug.bat or makeX_release.bat
:: where X is your version of MSVC - 6 or 7.
@echo off
:CHECK_ENV
@if /I "%DB_PATH%"=="" (goto :HELP & goto :EOF) else (@goto :MAIN)
::===========
:MAIN
@echo.
@ -21,6 +21,25 @@
@call preprocess.bat
@echo Building message file and codes header...
@call build_msg.bat
@goto :END
@echo Building BLR Table
@call blrtable.bat
@goto :NEXT_STEP
::==============
:NEXT_STEP
@echo.
@echo You may now run makeX_debug.bat or makeX_release.bat
@echo. where X is your version of MSVC - 6 or 7.
@echo.
@goto :EOF
::==============
:HELP
@echo.
@echo You must run prepare.bat before running this script
@echo.
@goto :EOF
::==============
:END

View File

@ -1,42 +1,65 @@
@echo off
::Check if on-line help is required
@if /I "%1"=="-h" (goto :HELP & goto :EOF)
@if /I "%1"=="/h" (goto :HELP & goto :EOF)
@if /I "%1"=="-?" (goto :HELP & goto :EOF)
@if /I "%1"=="/?" (goto :HELP & goto :EOF)
if "%1" NEQ "" (set FIREBIRD="%1")
if "%FIREBIRD%"=="" (goto :HELP & goto :EOF)
@goto :MAIN
:SET_DB_DIR
@cd ..\..
@for /f "delims=" %%a in ('@cd') do (set ROOT_PATH=%%a)
@echo Setting root path to %ROOT_PATH%
@cd %~dp0
::for /f "delims=" %%a in ('cd') do (@echo %%a)
@goto :EOF
::===========
:MAIN
@if "%1"=="" (@goto :ERROR_PARAM_EXPECTED)
call :SET_DB_DIR
::Make sure that the db path is set to a style that wont break SED
set DB_PATH=%1
for /f "tokens=*" %%a in ('@echo %DB_PATH:\=/%') do (set DB_PATH=%%a)
for /f "tokens=*" %%a in ('@echo %ROOT_PATH:\=/%') do (set DB_PATH=%%a)
if "%2" NEQ "" (set FIREBIRD="%2")
@md dbs
@md dbs 2>nul
@cd dbs
@echo Creating databases
@%FIREBIRD%\bin\gbak -r %1\src\misc\metadata.gbak localhost:%DB_PATH%\builds\win32\dbs\metadata.fdb
@md jrd
@%FIREBIRD%\bin\gbak -r %1\src\misc\security.gbak localhost:%DB_PATH%\builds\win32\dbs\jrd\security.fdb
@md msgs
@%FIREBIRD%\bin\gbak -r %1\src\msgs\msg.gbak localhost:%DB_PATH%\builds\win32\dbs\msgs\msg.fdb
@md qli
@%FIREBIRD%\bin\gbak -r %1\src\misc\help.gbak localhost:%DB_PATH%\builds\win32\dbs\qli\help.fdb
@%FIREBIRD%\bin\gbak -r %ROOT_PATH%\src\misc\metadata.gbak localhost:%DB_PATH%\builds\win32\dbs\metadata.fdb
@md jrd 2>nul
@%FIREBIRD%\bin\gbak -r %ROOT_PATH%\src\misc\security.gbak localhost:%DB_PATH%\builds\win32\dbs\jrd\security.fdb
@md msgs 2>nul
@%FIREBIRD%\bin\gbak -r %ROOT_PATH%\src\msgs\msg.gbak localhost:%DB_PATH%\builds\win32\dbs\msgs\msg.fdb
@md qli 2>nul
@%FIREBIRD%\bin\gbak -r %ROOT_PATH%\src\misc\help.gbak localhost:%DB_PATH%\builds\win32\dbs\qli\help.fdb
@cd ..
@echo Running SED
@del expand.sed
@call :SED yachts.lnk %1 metadata.fdb
@call :SED ODS.RDB %1 jrd/security.fdb
@call :SED msg.fdb %1 msgs/msg.fdb
@call :SED master_msg_db %1 msgs/msg.fdb
@call :SED yachts.link %1 jrd/security.fdb
@call :SED master_help_db %1 qli/help.fdb
@call :SED help.fdb %1 qli/help.fdb
@call :SED yachts.gdb %1 jrd/security.fdb
@call :SED isc.gdb %1 jrd/security.fdb
@call :SED isc4.gdb %1 jrd/security.fdb
@call :SED security.fdb %1 jrd/security.fdb
@call :SED empbuild.gdb %1 example5/employee.fdb
@call :SED source/msgs/msg.fdb %1 msgs/msg.fdb
@call :SED yachts.lnk %DB_PATH% metadata.fdb
@call :SED ODS.RDB %DB_PATH% jrd/security.fdb
@call :SED msg.fdb %DB_PATH% msgs/msg.fdb
@call :SED master_msg_db %DB_PATH% msgs/msg.fdb
@call :SED yachts.link %DB_PATH% jrd/security.fdb
@call :SED master_help_db %DB_PATH% qli/help.fdb
@call :SED help.fdb %DB_PATH% qli/help.fdb
@call :SED yachts.gdb %DB_PATH% jrd/security.fdb
@call :SED isc.gdb %DB_PATH% jrd/security.fdb
@call :SED isc4.gdb %DB_PATH% jrd/security.fdb
@call :SED security.fdb %DB_PATH% jrd/security.fdb
@call :SED empbuild.gdb %DB_PATH% example5/employee.fdb
@call :SED source/msgs/msg.fdb %DB_PATH% msgs/msg.fdb
@echo.
@echo Completed Preparations for build
@echo You many now continue by running BUILD_ALL.BAT
@echo.
@goto :END
::===========
@ -45,16 +68,15 @@ if "%2" NEQ "" (set FIREBIRD="%2")
@goto :EOF
::===========
:ERROR_PARAM_EXPECTED
@echo You must specify the root directory of the Firebird source tree.
@echo Example:
@echo prepare.bat d:\work\firebird
:HELP
@echo.
@echo If gbak is not available on your path specify the
@echo root directory of your Firebird installation.
@echo Example:
@echo c:\program files\firebird
@echo If gbak is not available on your path specify the
@echo root directory of your Firebird installation.
@echo Example:
@echo c:\program files\firebird
@echo.
@goto :END
:END