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

Some enhancements and fixes for the Win32 build scripts.

This commit is contained in:
paul_reeves 2005-02-08 14:59:13 +00:00
parent bb35257ae6
commit 3cb0fce65b
5 changed files with 140 additions and 102 deletions

View File

@ -3,13 +3,13 @@ set ERRLEV=0
:: Set env vars
@call setenvvar.bat
@if errorlevel 1 (goto :END)
@if errorlevel 1 (call :ERROR Executing setenvvar.bat failed & goto :EOF)
:: verify that prepare was run before
@if not exist %ROOT_PATH%\gen\dbs\metadata.fdb (goto :HELP_PREP & goto :END)
@if not exist %ROOT_PATH%\gen\dbs\metadata.fdb (goto :HELP_PREP & goto :EOF)
:: verify that boot was run before
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :END)
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
::===========
:: Read input values
@ -28,9 +28,9 @@ set ERRLEV=0
) else (
call :DEBUG
)
if "%ERRLEV%"=="1" goto :END
if "%ERRLEV%"=="1" (call :ERROR Build failure. & goto :EOF)
@call :MOVE
@goto :END
@goto :EOF
::===========
:RELEASE
@ -79,13 +79,14 @@ goto :EOF
@mkdir %ROOT_PATH%\output\intl
@mkdir %ROOT_PATH%\output\udf
@mkdir %ROOT_PATH%\output\help
@mkdir %ROOT_PATH%\output\doc
::@mkdir %ROOT_PATH%\output\doc
@mkdir %ROOT_PATH%\output\include
@mkdir %ROOT_PATH%\output\lib
::
@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%\fbclient\fbclient.lib %ROOT_PATH%\output\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
@ -94,28 +95,35 @@ goto :EOF
@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\security.fbk > nul
:: LIB
@copy %ROOT_PATH%\temp\%DBG_DIR%\fbclient\fbclient.lib %ROOT_PATH%\output\lib\fbclient_ms.lib >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 %ROOT_PATH%\ChangeLog %ROOT_PATH%\output\doc\ChangeLog.txt >nul
::@copy %ROOT_PATH%\doc\WhatsNew %ROOT_PATH%\output\doc\WhatsNew.txt >nul
:: HEADERS
:: build headers
copy %ROOT_PATH%\src\misc\ibase_header.txt %ROOT_PATH%\output\include\ibase.tmp > nul
:: 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\fb_types.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\dsc_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\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\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
::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 %ROOT_PATH%\src\jrd\blr.h %ROOT_PATH%\output\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
:: 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
@ -140,5 +148,16 @@ copy %ROOT_PATH%\src\extlib\fbudf\fbudf.sql %ROOT_PATH%\output\udf > nul
@echo.
@goto :EOF
:END
:ERROR
::====
@echo.
@echo Error - %*
@echo.
cancel_script > nul 2>&1
::End of ERROR
::------------
@goto :EOF

View File

@ -1,6 +1,6 @@
::
:: This bat file doesn't uses cd, all the paths are full paths.
:: with this convention this bat file is position independent
:: This bat file doesn't use cd, all the paths are full paths.
:: with this convention this bat file is position independent
:: and it will be easier to move the place of somefiles.
::
@ -33,34 +33,16 @@ set ERRLEV=0
@echo Creating directories
:: Don't rmdir gen, it contains the dbs, only the exe files
@del gen\*.exe 2>nul
@rmdir /s /q %ROOT_PATH%\gen\alice 2>nul
@mkdir %ROOT_PATH%\gen\alice 2>nul
@rmdir /s /q %ROOT_PATH%\gen\burp 2>nul
@mkdir %ROOT_PATH%\gen\burp 2>nul
@rmdir /s /q %ROOT_PATH%\gen\dsql 2>nul
@mkdir %ROOT_PATH%\gen\dsql 2>nul
@rmdir /s /q %ROOT_PATH%\gen\dudley 2>nul
@mkdir %ROOT_PATH%\gen\dudley 2>nul
@rmdir /s /q %ROOT_PATH%\gen\gpre 2>nul
@mkdir %ROOT_PATH%\gen\gpre 2>nul
@rmdir /s /q %ROOT_PATH%\gen\isql 2>nul
@mkdir %ROOT_PATH%\gen\isql 2>nul
:: Let the rmdir in place so people won't be fooled by existing compiled files when rebuilding
@rmdir /s /q %ROOT_PATH%\gen\journal 2>nul
@rmdir /s /q %ROOT_PATH%\gen\jrd 2>nul
@mkdir %ROOT_PATH%\gen\jrd 2>nul
@rmdir /s /q %ROOT_PATH%\gen\misc 2>nul
@mkdir %ROOT_PATH%\gen\misc 2>nul
@rmdir /s /q %ROOT_PATH%\gen\msgs 2>nul
@mkdir %ROOT_PATH%\gen\msgs 2>nul
@rmdir /s /q %ROOT_PATH%\gen\qli 2>nul
@mkdir %ROOT_PATH%\gen\qli 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 (
@rmdir /s /q %ROOT_PATH%\gen\%%v 2>nul
if NOT "%%v"=="journal" (@mkdir %ROOT_PATH%\gen\%%v 2>nul)
)
@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 %ROOT_PATH%\gen\examples 2>nul
@mkdir %ROOT_PATH%\gen\examples 2>nul
::=======
@if "%DBG%"=="" (
@ -107,9 +89,9 @@ if "%ERRLEV%"=="1" goto :END
@echo.
@echo Building gpre_boot (release)...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_boot - Win32 Release" %CLEAN% /OUT boot1.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_boot - Win32 Release" %CLEAN% /OUT gpre_boot.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_boot %CLEAN% release /OUT boot1.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_boot %CLEAN% release /OUT gpre_boot.log
)
if errorlevel 1 goto :gpre_boot2
goto :EOF
@ -120,9 +102,9 @@ goto :EOF
@echo.
@echo Building gpre_boot (debug)...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_boot - Win32 Debug" %CLEAN% /OUT boot1.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_boot - Win32 Debug" %CLEAN% /OUT gpre_boot.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_boot %CLEAN% debug /OUT boot1.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_boot %CLEAN% debug /OUT gpre_boot.log
)
if errorlevel 1 goto :gpre_boot2
goto :EOF
@ -131,7 +113,7 @@ goto :EOF
:: Error gpre_boot
:gpre_boot2
echo.
echo Error building gpre_boot, see boot1.log
echo Error building gpre_boot, see gpre_boot.log
echo.
set ERRLEV=1
goto :EOF
@ -142,9 +124,9 @@ goto :EOF
@echo.
@echo Building gpre_static (release)...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_static - Win32 Release" %CLEAN% /OUT boot2.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_static - Win32 Release" %CLEAN% /OUT gpre_static.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_static %CLEAN% release /OUT boot2.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_static %CLEAN% release /OUT gpre_static.log
)
if errorlevel 1 goto :gpre_static2
@goto :EOF
@ -155,9 +137,9 @@ if errorlevel 1 goto :gpre_static2
@echo.
@echo Building gpre_static (debug)...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_static - Win32 Debug" %CLEAN% /OUT boot2.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "gpre_static - Win32 Debug" %CLEAN% /OUT gpre_static.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_static %CLEAN% debug /OUT boot2.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project gpre_static %CLEAN% debug /OUT gpre_static.log
)
if errorlevel 1 goto :gpre_static2
@goto :EOF
@ -166,7 +148,7 @@ if errorlevel 1 goto :gpre_static2
:: ERROR gpre_static
:gpre_static2
echo.
echo Error building gpre_static, see boot2.log
echo Error building gpre_static, see gpre_static.log
echo.
set ERRLEV=1
goto :EOF
@ -178,16 +160,16 @@ goto :EOF
@echo.
@echo Building build_msg...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "build_msg - Win32 Release" /OUT boot3.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "build_msg - Win32 Release" /OUT build_msg.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project build_msg /rebuild release /OUT boot3.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project build_msg /rebuild release /OUT build_msg.log
)
if errorlevel 1 goto :msgs2
@copy %ROOT_PATH%\temp\release\build_msg\build_msg.exe %ROOT_PATH%\gen\ > nul
@goto :EOF
:msgs2
echo.
echo Error building build_msg, see boot3.log
echo Error building build_msg, see build_msg.log
echo.
set ERRLEV=1
goto :EOF
@ -198,16 +180,16 @@ goto :EOF
@echo.
@echo Building codes...
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "codes - Win32 Release" /OUT boot4.log
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.dsw /MAKE "codes - Win32 Release" /OUT codes.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project codes /rebuild release /OUT boot4.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2Boot.sln /project codes /rebuild release /OUT codes.log
)
if errorlevel 1 goto :codes2
@copy %ROOT_PATH%\temp\release\codes\codes.exe %ROOT_PATH%\gen\ > nul
@goto :EOF
:codes2
echo.
echo Error building codes, see boot4.log
echo Error building codes, see codes.log
echo.
set ERRLEV=1
goto :EOF

View File

@ -1,14 +1,15 @@
@echo off
::@echo off
:: Set env vars
@call setenvvar.bat
@if errorlevel 1 (goto :END)
@if errorlevel 1 (goto :EOF)
:: verify that prepare was run before
@if not exist %ROOT_PATH%\gen\dbs\metadata.fdb (goto :HELP_PREP & goto :END)
@if not exist %ROOT_PATH%\gen\dbs\metadata.fdb (goto :HELP_PREP & goto :EOF)
:: verify that boot was run before
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :END)
@if not exist %ROOT_PATH%\gen\gpre_boot.exe (goto :HELP_BOOT & goto :EOF)
::===========
:: Read input values
@ -20,6 +21,11 @@
@if "%1"=="CLEAN" (set CLEAN=/REBUILD)
@if "%2"=="CLEAN" (set CLEAN=/REBUILD)
::Uncomment this to build intlemp
::set FB2_INTLEMP=1
::===========
:MAIN
@call :BUILD_EMPBUILD
@ -27,13 +33,13 @@
@call :MOVE
@call :BUILD_EMPLOYEE
@call :MOVE2
@goto :END
@goto :EOF
::===========
:BUILD_EMPBUILD
@echo.
@echo Building empbuild.fdb
@copy %ROOT_PATH%\output\bin\ %ROOT_PATH%\gen\examples\ > nul
@copy %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
@ -43,8 +49,6 @@
@cd %ROOT_PATH%\gen\examples
@del empbuild.fdb 2> nul
@del intlbuild.fdb 2> nul
:: CVC: I need this line to ensure isql is the correct one.
@copy %ROOT_PATH%\output\bin\isql.exe %ROOT_PATH%\gen\examples\ /y > nul
@%ROOT_PATH%\gen\examples\isql -i empbld.sql
@%ROOT_PATH%\gen\examples\isql -i intlbld.sql
@cd %ROOT_PATH%\builds\win32
@ -63,9 +67,12 @@
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.dsw /MAKE "empbuild - Win32 Release" "intlbld - Win32 Release" %CLEAN% /OUT examples.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln /project empbuild %CLEAN% /OUT empbuild.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln /project intlbld %CLEAN% /OUT intlbld.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples.sln %CLEAN% release /project empbuild /OUT empbuild.log
if defined FB2_INTLEMP (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2_Examples.sln %CLEAN% release /project intlbuild /OUT intlbuild.log
)
)
@goto :EOF
::===========
@ -75,8 +82,10 @@ if "%VS_VER%"=="msvc6" (
if "%VS_VER%"=="msvc6" (
@msdev %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.dsw /MAKE "empbuild - Win32 Debug" "intlbld - Win32 Debug" %CLEAN% /OUT examples.log
) else (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln /project empbuild debug %CLEAN% /OUT empbuild.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln /project intlbld debug %CLEAN% /OUT intlbld.log
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln %CLEAN% debug /project empbuild /OUT empbuild.log
if defined FB2_INTLEMP (
@devenv %ROOT_PATH%\builds\win32\%VS_VER%\Firebird2.sln %CLEAN% debug /project intlbuild /OUT intlbld.log
)
)
@goto :EOF
@ -110,7 +119,13 @@ if "%VS_VER%"=="msvc6" (
:: @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 %ROOT_PATH%\temp\%DBG_DIR%\examples\intlbld.exe %ROOT_PATH%\gen\examples\intlbld.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
) else (
@copy %ROOT_PATH%\temp\%DBG_DIR%\examples\intlbuild.exe %ROOT_PATH%\gen\examples\intlbuild.exe > nul
)
)
@goto :EOF
::===========
@ -124,10 +139,13 @@ if "%VS_VER%"=="msvc6" (
@del %ROOT_PATH%\gen\examples\employee.fdb 2>nul
@del %ROOT_PATH%\gen\examples\intlemp.fdb 2>nul
@%ROOT_PATH%\gen\examples\empbuild.exe %DB_PATH%/gen/examples/employee.fdb
:: The script intldml.sql contains a reference to intlemp.fdb that must be changed
@del isql.tmp 2>nul
@echo s;intlemp.fdb;%SERVER_NAME%:%ROOT_PATH%\gen\examples\intlemp.fdb;g > isql.tmp
@%ROOT_PATH%\gen\examples\intlbld.exe %DB_PATH%/gen/examples/intlemp.fdb
if defined FB2_INTLEMP (
@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
)
@cd %ROOT_PATH%\builds\win32
@goto :EOF
@ -135,7 +153,10 @@ if "%VS_VER%"=="msvc6" (
::==============
:MOVE2
@copy %ROOT_PATH%\gen\examples\employee.fdb %ROOT_PATH%\output\examples\empbuild\ > nul
@copy %ROOT_PATH%\gen\examples\intlemp.fdb %ROOT_PATH%\output\examples\empbuild\ > nul
if defined FB2_INTLEMP (
@copy %ROOT_PATH%\gen\examples\intlemp.fdb %ROOT_PATH%\output\examples\empbuild\ > nul
)
@goto :EOF
@ -153,4 +174,15 @@ if "%VS_VER%"=="msvc6" (
@echo.
@goto :EOF
:END
:ERROR
::====
@echo.
@echo Error - %*
@echo.
cancel_script > nul 2>&1
::End of ERROR
::------------
@goto :EOF

View File

@ -3,12 +3,12 @@
@echo.
@echo !! Warning !!
@echo This script no longer requires the
@echo path to the source. It now works it
@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 Parameter 1 will now set the FIREBIRD variable
@echo This may not be what you intended
@echo.
::Check if on-line help is required
@ -18,9 +18,9 @@
@if /I "%1"=="/?" (goto :HELP & goto :EOF)
@if "%1" NEQ "" (set FIREBIRD=%1)
:: BRS
:: BRS
:: Get all the file name when there are spaces
:: this can be also achieved with %* but I don't know which versions of
:: this can be also achieved with %* but I don't know which versions of
:: windows allows it
:LOOP
@shift
@ -32,6 +32,9 @@
@echo FIREBIRD=%FIREBIRD%
@if "%FIREBIRD%"=="" (goto :HELP & goto :EOF)
@if "%ISC_USER%"=="" (set ISC_USER=SYSDBA)
@if "%ISC_PASSWORD%"=="" (set ISC_PASSWORD=masterke)
::===========
:MAIN
@call setenvvar.bat
@ -50,25 +53,25 @@
@echo create database '%SERVER_NAME%:%DB_PATH%\gen\dbs\msg.fdb'; | "%FIREBIRD%\bin\isql" -q
@set MSG_ISQL=@"%FIREBIRD%\bin\isql" -q %SERVER_NAME%:%DB_PATH%\gen\dbs\msg.fdb -i %ROOT_PATH%\src\msgs\
@%MSG_ISQL%msg.sql
@%MSG_ISQL%msg.sql
@%MSG_ISQL%facilities.sql
@echo _
@echo loading locales
@%MSG_ISQL%locales.sql
@%MSG_ISQL%locales.sql
@echo loading history
@%MSG_ISQL%history.sql
@%MSG_ISQL%history.sql
@echo loading messages
@%MSG_ISQL%messages.sql
@%MSG_ISQL%messages.sql
@echo loading symbols
@%MSG_ISQL%symbols.sql
@%MSG_ISQL%symbols.sql
@echo loading system errors
@%MSG_ISQL%system_errors.sql
@%MSG_ISQL%system_errors.sql
@echo loading French translation
@%MSG_ISQL%transmsgs.fr_FR.sql
@%MSG_ISQL%transmsgs.fr_FR.sql
@echo loading German translation
@%MSG_ISQL%transmsgs.de_DE.sql
@%MSG_ISQL%transmsgs.de_DE.sql
@"%FIREBIRD%\bin\gbak" -r %ROOT_PATH%\builds\misc\help.gbak %SERVER_NAME%:%DB_PATH%\gen\dbs\help.fdb
@"%FIREBIRD%\bin\gbak" -r %ROOT_PATH%\builds\misc\help.gbak %SERVER_NAME%:%DB_PATH%\gen\dbs\help.fdb
@copy %ROOT_PATH%\gen\dbs\metadata.fdb %ROOT_PATH%\gen\dbs\yachts.lnk > nul
@echo.
@ -85,7 +88,7 @@
@echo FIREBIRD value should be the root directory of your Firebird installation.
@echo Example:
@echo c:\program files\firebird
@echo.
@echo.
@goto :END

View File

@ -1,6 +1,6 @@
:: This bat set the environment values
:: ROOT_PATH dos format path of the main directory
:: DB_PATH unix format path of the main directory
:: ROOT_PATH dos format path of the main directory
:: DB_PATH unix format path of the main directory
:: VS_VER VisualStudio version (msvc6|msvc7)
:: SERVER_NAME server needed to connect to firebird (could include port)
:: Example : localhost/3051
@ -17,24 +17,26 @@
for /f "tokens=*" %%a in ('@echo %ROOT_PATH:\=/%') do (set DB_PATH=%%a)
@msdev /? >nul 2>nul
@if not errorlevel 9009 ((set VS_VER=msvc6) & (goto :END))
@if not errorlevel 9009 ((set MSVC_VERSION=6) & (set VS_VER=msvc6) & (goto :END))
@devenv /? >nul 2>nul
@if not errorlevel 9009 ((set VS_VER=msvc7) & (goto :END))
@if not errorlevel 9009 ((set MSVC_VERSION=7) & (set VS_VER=msvc7) & (goto :END))
::===========
:HELP
@echo.
@echo ERROR: There are not a visual studio valid version in your path.
@echo You need visual studio 6 or 7 to build Firebird
@echo.
@echo ERROR: A working version of visual studio cannot be found on your current path.
@echo You need MS Visual Studio 6 or 7 to build Firebird from these batch files.
@echo.
:: set errorlevel
@exit /B 1
:END
@echo.
@echo vs_ver=%VS_VER%
@echo msvc_version=%MSVC_VERSION%
@echo db_path=%DB_PATH%
@echo root_path=%ROOT_PATH%
@echo firebird=%FIREBIRD%
@echo server_name=%SERVER_NAME%
@echo.