Skip to content

Commit 488ff12

Browse files
Make it easier to produce automated builds
1 parent 00fb045 commit 488ff12

File tree

4 files changed

+44
-50
lines changed

4 files changed

+44
-50
lines changed

Builds/MsVc80.win/build.bat

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,23 @@ goto :MAIN & goto :EOF
2222
:MAIN
2323
::===========
2424

25-
for %%p in ( x86 AMD64 ) do (
26-
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
27-
if "%%p" == "AMD64" (
28-
call %windir%\system32\cmd.exe /c build_platform.bat AMD64 %1
29-
) else (
30-
call %windir%\SYSWOW64\cmd.exe /c build_platform.bat x86 %1
31-
)
32-
)
33-
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
34-
if "%%p" == "x86" (
35-
call %windir%\system32\cmd.exe /c build_platform.bat x86 %1
36-
)
37-
)
25+
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
26+
@set PLATFORM=x64
27+
) else (
28+
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
29+
@set PLATFORM=x64
30+
) else (
31+
@set PLATFORM=win32
32+
)
3833
)
39-
@title Build complete
40-
goto :EOF
4134

42-
if /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
43-
echo now building %2 %1 in 32-bit env.
44-
call %windir%\SYSWOW64\cmd.exe /c %0 %1
35+
if "%PLATFORM%" == "x64" (
36+
call build_platform.bat x86 %1
37+
call build_platform.bat AMD64 %1
38+
) else (
39+
call build_platform.bat x86 %1
4540
)
4641

47-
42+
@title Build complete
4843
goto :EOF
49-
::=======
50-
44+
::=======

Builds/MsVc90.win/build.bat

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,23 @@ goto :MAIN & goto :EOF
2222
:MAIN
2323
::===========
2424

25-
for %%p in ( x86 AMD64 ) do (
26-
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
27-
if "%%p" == "AMD64" (
28-
call %windir%\system32\cmd.exe /c build_platform.bat AMD64 %1
29-
) else (
30-
call %windir%\SYSWOW64\cmd.exe /c build_platform.bat x86 %1
31-
)
32-
)
33-
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
34-
if "%%p" == "x86" (
35-
call %windir%\system32\cmd.exe /c build_platform.bat x86 %1
36-
)
37-
)
25+
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
26+
@set PLATFORM=x64
27+
) else (
28+
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
29+
@set PLATFORM=x64
30+
) else (
31+
@set PLATFORM=win32
32+
)
3833
)
39-
@title Build complete
40-
goto :EOF
4134

42-
if /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
43-
echo now building %2 %1 in 32-bit env.
44-
call %windir%\SYSWOW64\cmd.exe /c %0 %1
35+
if "%PLATFORM%" == "x64" (
36+
call build_platform.bat x86 %1
37+
call build_platform.bat AMD64 %1
38+
) else (
39+
call build_platform.bat x86 %1
4540
)
4641

47-
42+
@title Build complete
4843
goto :EOF
49-
::=======
50-
44+
::=======

Install/Win32/MakePackage.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ if not defined FB_TARGET_PLATFORM (
6464
::========================================================
6565
sed /"#define BUILDNUM_VERSION"/!d %ROOT_PATH%\WriteBuildNo.h > %temp%.\b$1.bat
6666
sed -n -e s/\"//g -e s/"#define BUILDNUM_VERSION"//w%temp%.\b$2.bat %temp%.\b$1.bat
67-
for /f "tokens=*" %%a in ('type %temp%.\b$2.bat') do set PRODUCT_VER_STRING=2.1.0.%%a
67+
for /f "tokens=*" %%a in ('type %temp%.\b$2.bat') do set PRODUCT_VER_STRING=2.0.0.%%a
6868
@echo s/1.2.0/%PRODUCT_VER_STRING%/ > %temp%.\b$3.bat
6969
@echo s/define MSVC_VERSION 6/define MSVC_VERSION %MSVC_VERSION%/ >> %temp%.\b$3.bat
7070
@echo s/define BUILDCONFIG release/define BUILDCONFIG %BUILDCONFIG%/ >> %temp%.\b$3.bat
7171
@echo s/PRODUCT_VER_STRING/%PRODUCT_VER_STRING%/ >> %temp%.\b$3.bat
72+
@set PRODUCT_VERSION=%PRODUCT_VER_STRING%
7273
sed -f %temp%.\b$3.bat %~dp0\OdbcJdbcSetup.iss > %~dp0\OdbcJdbcSetup_%PRODUCT_VER_STRING%.iss
7374
del %temp%.\b$?.bat
7475
@goto :EOF

Install/Win32/OdbcJdbcSetup.iss

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ BUILD_ENV undefined
5656
#define PlatformTarget "win32"
5757
#endif
5858

59+
;---- If we haven't already set ProductVersion then pick it up from the environment.
60+
#ifndef ProductVersion
61+
#define ProductVersion GetEnv("PRODUCT_VERSION")
62+
#endif
63+
5964
#define BUILD_ROOT="..\..\"
6065
#define SOURCE_LIBS "Builds\"+AddBackslash(BUILD_ENV)+AddBackslash(PlatformTarget)+AddBackslash(BUILDCONFIG)
6166
#define SOURCE_DOCS="Install\"
@@ -74,8 +79,8 @@ BUILD_ENV undefined
7479

7580
[Setup]
7681
AppName=Firebird ODBC Driver
77-
AppVerName=Firebird/InterBase(r) ODBC driver 2.0
78-
AppVersion=2.0
82+
AppVerName=Firebird/InterBase(r) ODBC driver {#ProductVersion}
83+
AppVersion={#ProductVersion}
7984
AppMutex=InnoSetupExtensionsCompilerAppMutex
8085
AppPublisher=Firebird Project
8186
AppPublisherURL={#FIREBIRD_URL}
@@ -91,7 +96,7 @@ PrivilegesRequired=admin
9196

9297
SourceDir={#BUILD_ROOT}
9398
OutputDir={#SOURCE_DOCS}\Win32\install_image
94-
OutputBaseFilename=Firebird_ODBC_2.0.0_{#PlatformTarget}{#debug_str}
99+
OutputBaseFilename=Firebird_ODBC_{#ProductVersion}_{#PlatformTarget}{#debug_str}
95100
DiskSpanning=no
96101

97102
LicenseFile={#SOURCE_DOCS}\IDPLicense.txt
@@ -128,8 +133,8 @@ Name: DocumentationComponent; Description: {cm:DocumentationComponent}; Types: D
128133

129134
[Files]
130135
Source: {#SOURCE_LIBS}OdbcFb.dll; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent; Flags: regserver restartreplace sharedfile
131-
Source: {#SOURCE_LIBS}\OdbcFb.lib; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
132-
Source: {#SOURCE_LIBS}\OdbcFb.pdb; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
136+
Source: {#SOURCE_LIBS}\OdbcFb.lib; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent
137+
Source: {#SOURCE_LIBS}\OdbcFb.pdb; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent
133138
#ifdef HtmHelp
134139
Source: {#SOURCE_DOCS}\HtmlHelp\OdbcFb.chm; DestDir: {app}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
135140
Source: {#SOURCE_DOCS}\HtmlHelp\OdbcFb.chm; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
@@ -144,8 +149,8 @@ Source: {#SOURCE_DOCS}\IDPLicense.txt; DestDir: {app}; Components: Documentation
144149

145150
#if PlatformTarget == "x64"
146151
Source: {#SOURCE_LIBS32}OdbcFb.dll; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent; Flags: regserver restartreplace sharedfile
147-
Source: {#SOURCE_LIBS32}\OdbcFb.lib; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
148-
Source: {#SOURCE_LIBS32}\OdbcFb.pdb; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
152+
Source: {#SOURCE_LIBS32}\OdbcFb.lib; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent
153+
Source: {#SOURCE_LIBS32}\OdbcFb.pdb; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent
149154
#ifdef HtmlHelp
150155
Source: {#SOURCE_DOCS}\HtmlHelp\OdbcFb.chm; DestDir: {syswow64}; Components: DeveloperComponent DeploymentComponent; Flags: ignoreversion
151156
Source: {#SOURCE_DOCS}\HtmlHelp\OdbcFb.chm; DestDir: {syswow64}; Components: DocumentationComponent; Flags: ignoreversion

0 commit comments

Comments
 (0)