8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 15:23:02 +01:00
firebird-mirror/builds/win32/prepare.bat
brodsom 5b3fc370fa -Replace build_all with makeX_boot.
-Add make7_boot (To be reviewed by Ignacio J Ortega)
2003-07-04 13:08:52 +00:00

75 lines
1.8 KiB
Batchfile

@echo off
@echo.
@echo !! Warning !!
@echo This script no longer requires the
@echo path to the source. It now works it
@echo out automatically.
@echo.
@echo Paremeter 1 will now set the FIREBIRD variable
@echo This may not be what you intended
@echo.
::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
call :SET_DB_DIR
::Make sure that the db path is set to a style that wont break SED
for /f "tokens=*" %%a in ('@echo %ROOT_PATH:\=/%') do (set DB_PATH=%%a)
@md dbs 2>nul
@cd dbs
@echo Creating databases
@"%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.
@echo Completed Preparations for build
@echo You may now run makeX_boot.bat
@echo. where X is your version of MSVC - 6 or 7.
@echo.
@goto :END
::===========
: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.
@goto :END
:END