mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Win32 examples build scripts
This commit is contained in:
parent
235b14c9a6
commit
1a2c5693ef
12
examples/build_win32/clean_api.bat
Normal file
12
examples/build_win32/clean_api.bat
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
del %ROOT_PATH%\examples\api\*.obj 2>nul
|
||||
del %ROOT_PATH%\examples\api\*.exp 2>nul
|
||||
del %ROOT_PATH%\examples\api\*.lib 2>nul
|
||||
del %ROOT_PATH%\examples\api\*.exe 2>nul
|
||||
del %ROOT_PATH%\examples\api\*.pdb 2>nul
|
||||
del %ROOT_PATH%\examples\api\api14.c 2>nul
|
10
examples/build_win32/clean_dyn.bat
Normal file
10
examples/build_win32/clean_dyn.bat
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
del %ROOT_PATH%\examples\dyn\*.obj 2>nul
|
||||
del %ROOT_PATH%\examples\dyn\*.exe 2>nul
|
||||
del %ROOT_PATH%\examples\dyn\*.c 2>nul
|
||||
|
10
examples/build_win32/clean_empbuild.bat
Normal file
10
examples/build_win32/clean_empbuild.bat
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning empbuild.fdb
|
||||
:: CLEANING
|
||||
del %ROOT_PATH%\examples\empbuild\*.fdb 2>nul
|
||||
del %ROOT_PATH%\examples\empbuild\*.obj 2>nul
|
||||
del %ROOT_PATH%\examples\empbuild\*.c 2>nul
|
||||
del %ROOT_PATH%\examples\empbuild\*.exe 2>nul
|
10
examples/build_win32/clean_stat.bat
Normal file
10
examples/build_win32/clean_stat.bat
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
del %ROOT_PATH%\examples\stat\*.obj 2>nul
|
||||
del %ROOT_PATH%\examples\stat\*.exe 2>nul
|
||||
del %ROOT_PATH%\examples\stat\*.c 2>nul
|
||||
|
38
examples/build_win32/make_api.bat
Normal file
38
examples/build_win32/make_api.bat
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
call clean_api.bat
|
||||
|
||||
@echo.
|
||||
@echo preprocessing empbuild.e
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\api\api14.e %ROOT_PATH%\examples\api\api14.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
|
||||
cd %ROOT_PATH%\examples\api\
|
||||
:: OLD FLAGS (to analyze)
|
||||
:: /c /AL /Ge /Zi /Mq /Od /G2 /Zp1 /W3
|
||||
set CLFLAGS=-I %ROOT_PATH%\include -I %ROOT_PATH%\examples\include
|
||||
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api1.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api2.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api3.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api4.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api5.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api6.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api7.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api8.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api9.c
|
||||
:: cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api9f.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api10.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api11.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api12.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api13.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api14.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api15.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api16.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\api16t.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\api\apifull.c
|
||||
|
||||
cd %ROOT_PATH%\examples\build_win32\
|
30
examples/build_win32/make_dyn.bat
Normal file
30
examples/build_win32/make_dyn.bat
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
@call clean_dyn.bat
|
||||
|
||||
@echo.
|
||||
@echo preprocessing dyn.e
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dyn1.e %ROOT_PATH%\examples\dyn\dyn1.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dyn2.e %ROOT_PATH%\examples\dyn\dyn2.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dyn3.e %ROOT_PATH%\examples\dyn\dyn3.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dyn4.e %ROOT_PATH%\examples\dyn\dyn4.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dyn5.e %ROOT_PATH%\examples\dyn\dyn5.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\dyn\dynfull.e %ROOT_PATH%\examples\dyn\dynfull.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
|
||||
cd %ROOT_PATH%\examples\dyn\
|
||||
set CLFLAGS=-I %ROOT_PATH%\include -I %ROOT_PATH%\examples\include
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dyn1.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dyn2.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dyn3.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dyn4.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dyn5.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\dyn\dynfull.c
|
||||
cd %ROOT_PATH%\examples\build_win32
|
||||
|
||||
::cd %ROOT_PATH%\examples\dyn
|
||||
::nmake -f msvc6.mak all
|
||||
::cd %ROOT_PATH%\examples\build_win32
|
70
examples/build_win32/make_empbuild.bat
Normal file
70
examples/build_win32/make_empbuild.bat
Normal file
@ -0,0 +1,70 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning empbuild.fdb
|
||||
:: CLEANING
|
||||
call clean_empbuild.bat
|
||||
|
||||
cd %ROOT_PATH%\examples\empbuild\
|
||||
@echo.
|
||||
@echo building databases
|
||||
del isql.sed 2>nul
|
||||
:: @echo s;empbuild.fdb;localhost:%DB_PATH%/examples/empbuild/empbuild.fdb;g > isql.tmp
|
||||
:: @echo s;employe2.fdb;localhost:%DB_PATH%/examples/empbuild/employe2.fdb;g >> isql.tmp
|
||||
:: @echo s;intlbuild.fdb;localhost:%DB_PATH%/examples/empbuild/intlbuild.fdb;g >> isql.tmp
|
||||
::
|
||||
:: sed "s/\//\\//g" < isql.tmp > isql.tmp2
|
||||
:: sed "s/;/\//g" < isql.tmp2 > isql.sed
|
||||
|
||||
@echo s;empbuild.fdb;localhost:%ROOT_PATH%\examples\empbuild\empbuild.fdb;g > isql.tmp
|
||||
@echo s;employe2.fdb;localhost:%ROOT_PATH%\examples\empbuild\employe2.fdb;g >> isql.tmp
|
||||
@echo s;intlbuild.fdb;localhost:%ROOT_PATH%\examples\empbuild\intlbuild.fdb;g >> isql.tmp
|
||||
@echo s;intlemp.fdb;localhost:%ROOT_PATH%\examples\empbuild\intlemp.fdb;g >> isql.tmp
|
||||
|
||||
sed "s/\\/\\\\/g" < isql.tmp > isql.tmp2
|
||||
sed "s/;/\//g" < isql.tmp2 > isql.sed
|
||||
|
||||
sed -f isql.sed < empbld.sql > empbld.tmp
|
||||
sed -f isql.sed < employe2.sql > employe2.tmp
|
||||
sed -f isql.sed < intlbld.sql > intlbld.tmp
|
||||
sed -f isql.sed < intldml.sql > intldml.tmp
|
||||
|
||||
echo save intldml.sql
|
||||
move intldml.sql intldml.ori
|
||||
move intldml.tmp intldml.sql
|
||||
|
||||
echo Executing sql
|
||||
isql -i empbld.tmp
|
||||
isql -i employe2.tmp
|
||||
isql -i intlbld.tmp
|
||||
cd %ROOT_PATH%\examples\build_win32
|
||||
|
||||
@echo.
|
||||
@echo preprocessing empbuild.e and intlbuild.e
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\empbuild\empbuild.e %ROOT_PATH%\examples\empbuild\empbuild.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
%ROOT_PATH%\bin\gpre -r -m -n -z %ROOT_PATH%\examples\empbuild\intlbld.e %ROOT_PATH%\examples\empbuild\intlbld.c -b localhost:%ROOT_PATH%\examples\empbuild\
|
||||
|
||||
cd %ROOT_PATH%\examples\empbuild\
|
||||
cl -I %ROOT_PATH%\include %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\empbuild\empbuild.c
|
||||
cl -I %ROOT_PATH%\include %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\empbuild\intlbld.c
|
||||
cd %ROOT_PATH%\examples\build_win32
|
||||
|
||||
@echo.
|
||||
@echo Building employee.fdb
|
||||
:: and empbuild.exe uses isql
|
||||
@del %ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
@del %ROOT_PATH%\examples\empbuild\intlemp.fdb
|
||||
|
||||
:: Este programa utiliza isql y por lo tanto hay que ponerse en el lugar adecuado
|
||||
:: para que encuentre los scripts
|
||||
cd %ROOT_PATH%\examples\empbuild\
|
||||
@empbuild.exe localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
@intlbld.exe localhost:%ROOT_PATH%\examples\empbuild\intlemp.fdb
|
||||
|
||||
echo Restore
|
||||
move intldml.sql intldml.tmp
|
||||
move intldml.ori intldml.sql
|
||||
|
||||
cd %ROOT_PATH%\examples\build_win32
|
||||
|
41
examples/build_win32/make_stat.bat
Normal file
41
examples/build_win32/make_stat.bat
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
call setenvvar.bat
|
||||
|
||||
@echo.
|
||||
@echo cleaning
|
||||
:: CLEANING
|
||||
@call clean_stat.bat
|
||||
|
||||
@echo.
|
||||
@echo preprocessing dyn.e
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat1.e %ROOT_PATH%\examples\stat\stat1.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat2.e %ROOT_PATH%\examples\stat\stat2.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat3.e %ROOT_PATH%\examples\stat\stat3.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat4.e %ROOT_PATH%\examples\stat\stat4.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat5.e %ROOT_PATH%\examples\stat\stat5.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat6.e %ROOT_PATH%\examples\stat\stat6.c -d localhost:%ROOT_PATH%\examples\empbuild\intlemp.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat7.e %ROOT_PATH%\examples\stat\stat7.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat8.e %ROOT_PATH%\examples\stat\stat8.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat9.e %ROOT_PATH%\examples\stat\stat9.c -d localhost:%ROOT_PATH%\examples\empbuild\employee.fdb
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat10.e %ROOT_PATH%\examples\stat\stat10.c -b localhost:%DB_PATH%/examples/empbuild/
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat11.e %ROOT_PATH%\examples\stat\stat11.c -b localhost:%DB_PATH%/examples/empbuild/
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat12.e %ROOT_PATH%\examples\stat\stat12.c -b localhost:%DB_PATH%/examples/empbuild/
|
||||
%ROOT_PATH%\bin\gpre -c -m -n -z %ROOT_PATH%\examples\stat\stat12t.e %ROOT_PATH%\examples\stat\stat12t.c -b localhost:%DB_PATH%/examples/empbuild/
|
||||
|
||||
cd %ROOT_PATH%\examples\stat\
|
||||
set CLFLAGS=-I %ROOT_PATH%\include -I %ROOT_PATH%\examples\include
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat1.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat2.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat3.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat4.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat5.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat6.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat7.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat8.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat9.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat10.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat11.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat12.c
|
||||
cl %CLFLAGS% %ROOT_PATH%\lib\gds32_ms.lib %ROOT_PATH%\examples\stat\stat12t.c
|
||||
|
||||
cd %ROOT_PATH%\examples\build_win32
|
35
examples/build_win32/setenvvar.bat
Normal file
35
examples/build_win32/setenvvar.bat
Normal file
@ -0,0 +1,35 @@
|
||||
:: This bat set the environment values
|
||||
:: ROOT_PATH dos format path of the main directory
|
||||
:: DB_PATH unix format path of the main directory
|
||||
:: VS_VER VisualStudio version (msvc6|msvc7)
|
||||
|
||||
@echo off
|
||||
::=================
|
||||
:SET_DB_DIR
|
||||
|
||||
@cd ..\..
|
||||
@for /f "delims=" %%a in ('@cd') do (set ROOT_PATH=%%a)
|
||||
@cd %~dp0
|
||||
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))
|
||||
|
||||
@devenv /? >nul 2>nul
|
||||
@if not errorlevel 9009 ((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.
|
||||
:: set errorlevel
|
||||
@exit /B 1
|
||||
|
||||
:END
|
||||
@echo.
|
||||
@echo vs_ver=%VS_VER%
|
||||
@echo db_path=%DB_PATH%
|
||||
@echo root_path=%ROOT_PATH%
|
||||
@echo.
|
Loading…
Reference in New Issue
Block a user