Permalink
Browse files

Automate version numbers for VisualStudio / Inno Setup

  • Loading branch information...
1 parent 7046564 commit f3832e7eff7187ea54df22fe26e3156cb73df9ba @c99koder committed Jul 10, 2007
Showing with 70 additions and 27 deletions.
  1. +35 −0 DreamZZT-lite.vcproj
  2. +7 −7 dreamzzt-lite.iss
  3. +21 −13 dreamzzt.iss
  4. +6 −6 dreamzzt.rc → dreamzzt.rc.in
  5. +1 −1 src/editor.cpp
View
@@ -12,6 +12,9 @@
/>
</Platforms>
<ToolFiles>
+ <ToolFile
+ RelativePath=".\RULES.rules"
+ />
</ToolFiles>
<Configurations>
<Configuration
@@ -29,6 +32,9 @@
Name="VCCustomBuildTool"
/>
<Tool
+ Name="SubWCRev"
+ />
+ <Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
@@ -112,6 +118,9 @@
Name="VCCustomBuildTool"
/>
<Tool
+ Name="SubWCRev"
+ />
+ <Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
@@ -573,6 +582,19 @@
>
</File>
<File
+ RelativePath=".\include\version.h.in"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="&quot;c:\Program Files\TortoiseSVN\bin\SubWCRev.exe&quot; . include\version.h.in include\version.h"
+ Outputs="include\version.h"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath=".\include\window.h"
>
</File>
@@ -614,6 +636,19 @@
RelativePath=".\dreamzzt.rc"
>
</File>
+ <File
+ RelativePath=".\dreamzzt.rc.in"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="&quot;c:\Program Files\TortoiseSVN\bin\SubWCRev.exe&quot; . dreamzzt.rc.in dreamzzt.rc"
+ Outputs="dreamzzt.rc"
+ />
+ </FileConfiguration>
+ </File>
</Filter>
</Files>
<Globals>
View
@@ -1,30 +1,30 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-#define AppVersion "3.1.0"
+#define Version() ParseVersion(AddBackslash(SourcePath) + "Release\DreamZZT-lite.exe", Local[0], Local[1], Local[2], Local[3]), str(Local[0]) + "." + str(Local[1]) + "." + str(Local[2])
[Setup]
-AppVersion={#AppVersion}
+AppVersion={#Version()}
AppName=DreamZZT Lite
-AppVerName=DreamZZT Lite {#AppVersion}
+AppVerName=DreamZZT Lite {#Version()}
AppPublisher=Sam Steele
AppPublisherURL=http://www.c99.org/
AppSupportURL=http://forums.c99.org/
AppUpdatesURL=http://dev.c99.org/DreamZZT/
DefaultDirName={pf}\DreamZZT-lite
DefaultGroupName=DreamZZT Lite
-OutputBaseFilename=dreamzzt-lite-{#AppVersion}-setup
+OutputBaseFilename=dreamzzt-lite-{#Version()}-setup
Compression=lzma
SolidCompression=true
MinVersion=4.1.2222,5.0.2195
LicenseFile=COPYING
ChangesAssociations=true
UninstallDisplayIcon={app}\DreamZZT-lite.exe
-UninstallDisplayName=DreamZZT Lite {#AppVersion}
+UninstallDisplayName=DreamZZT Lite {#Version()}
VersionInfoVersion={#GetFileVersion(AddBackslash(SourcePath) + "Release\DreamZZT-lite.exe")}
VersionInfoCompany=Sam Steele
-VersionInfoDescription=DreamZZT Lite {#AppVersion}
-VersionInfoTextVersion={#AppVersion}
+VersionInfoDescription=DreamZZT Lite {#Version()}
+VersionInfoTextVersion={#Version()}
VersionInfoCopyright=Copyright (C) 2000 - 2007 Sam Steele, All Rights Reserved.
InternalCompressLevel=max
InfoBeforeFile=ChangeLog
View
@@ -1,30 +1,30 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-#define AppVersion "3.0.8"
+#define Version() ParseVersion(AddBackslash(SourcePath) + "Release\DreamZZT.exe", Local[0], Local[1], Local[2], Local[3]), str(Local[0]) + "." + str(Local[1]) + "." + str(Local[2])
[Setup]
-AppVersion={#AppVersion}
+AppVersion={#Version()}
AppName=DreamZZT
-AppVerName=DreamZZT {#AppVersion}
+AppVerName=DreamZZT {#Version()}
AppPublisher=Sam Steele
AppPublisherURL=http://www.c99.org/
AppSupportURL=http://forums.c99.org/
AppUpdatesURL=http://dev.c99.org/DreamZZT/
DefaultDirName={pf}\DreamZZT
DefaultGroupName=DreamZZT
-OutputBaseFilename=dreamzzt-{#AppVersion}-setup
+OutputBaseFilename=DreamZZT-{#Version()}-setup
Compression=lzma
SolidCompression=true
MinVersion=4.1.2222,5.0.2195
LicenseFile=COPYING
ChangesAssociations=true
UninstallDisplayIcon={app}\DreamZZT.exe
-UninstallDisplayName=DreamZZT {#AppVersion}
-VersionInfoVersion={#GetFileVersion(AddBackslash(SourcePath) + "resources\DreamZZT.exe")}
+UninstallDisplayName=DreamZZT {#Version()}
+VersionInfoVersion={#GetFileVersion(AddBackslash(SourcePath) + "Release\DreamZZT.exe")}
VersionInfoCompany=Sam Steele
-VersionInfoDescription=DreamZZT {#AppVersion}
-VersionInfoTextVersion={#AppVersion}
+VersionInfoDescription=DreamZZT {#Version()}
+VersionInfoTextVersion={#Version()}
VersionInfoCopyright=Copyright (C) 2000 - 2007 Sam Steele, All Rights Reserved.
InternalCompressLevel=max
InfoBeforeFile=ChangeLog
@@ -36,6 +36,7 @@ Name: english; MessagesFile: compiler:Default.isl
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: registerzzt; Description: Associate DreamZZT with .ZZT files; Flags: checkedonce; GroupDescription: Register file types:
Name: registersav; Description: Associate DreamZZT with .SAV files; Flags: checkedonce; GroupDescription: Register file types:
+Name: registerszt; Description: Associate DreamZZT with .SZT files; Flags: checkedonce; GroupDescription: Register file types:
[Files]
Source: COPYING; DestDir: {app}
@@ -44,12 +45,14 @@ Source: Release\DreamZZT.exe; DestDir: {app}; Flags: ignoreversion
Source: resources\town.zzt; DestDir: {app}; Flags: ignoreversion
Source: resources\tutorial.zzt; DestDir: {app}; Flags: ignoreversion
Source: resources\enigma.zzt; DestDir: {app}; Flags: ignoreversion
-Source: resources\zzt-ascii.png; DestDir: {app}; Flags: ignoreversion
+Source: resources\zzt-ascii.bmp; DestDir: {app}; Flags: ignoreversion
Source: win32\alut.dll; DestDir: {app}; Flags: ignoreversion
Source: win32\OpenAL32.dll; DestDir: {app}; Flags: ignoreversion
Source: win32\wrap_oal.dll; DestDir: {app}; Flags: ignoreversion
Source: win32\libcurl.dll; DestDir: {app}; Flags: ignoreversion; Tasks:
Source: win32\vcredist80_x86.exe; DestDir: {tmp}; Flags: deleteafterinstall
+Source: win32\SDL.dll; DestDir: {app}; Flags: ignoreversion
+Source: resources\monster.szt; DestDir: {app}; Flags: ignoreversion
[INI]
@@ -63,6 +66,7 @@ Name: {group}\Report a Bug; Filename: http://dev.c99.org/DreamZZT/newticket
Name: {group}\Town of ZZT; Filename: {app}\town.zzt; WorkingDir: {app}; IconFilename: {app}\DreamZZT.exe; IconIndex: 1
Name: {group}\Mission Enigma; Filename: {app}\enigma.zzt; WorkingDir: {app}; IconFilename: {app}\DreamZZT.exe; IconIndex: 1
Name: {group}\DreamZZT Tutorial; Filename: {app}\tutorial.zzt; WorkingDir: {app}; IconFilename: {app}\DreamZZT.exe; IconIndex: 1
+Name: {group}\ZZT Monster Zoo; Filename: {app}\monster.szt; WorkingDir: {app}; IconFilename: {app}\DreamZZT.exe; IconIndex: 1
[Run]
Filename: {app}\DreamZZT.exe; Description: {cm:LaunchProgram,DreamZZT}; Flags: nowait postinstall skipifsilent
@@ -78,7 +82,11 @@ Root: HKCR; SubKey: .zzt; ValueType: string; ValueData: ZZTGame; Flags: uninsdel
Root: HKCR; SubKey: ZZTGame; ValueType: string; ValueData: DreamZZT Game; Flags: uninsdeletekey; Tasks: registerzzt
Root: HKCR; SubKey: ZZTGame\Shell\Open\Command; ValueType: string; ValueData: """{app}\DreamZZT.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: registerzzt
Root: HKCR; Subkey: ZZTGame\DefaultIcon; ValueType: string; ValueData: {app}\DreamZZT.exe,1; Flags: uninsdeletevalue; Tasks: registerzzt
-Root: HKCR; SubKey: .sav; ValueType: string; ValueData: ZZTSaveGame; Flags: uninsdeletekey; Tasks: registerzzt
-Root: HKCR; SubKey: ZZTSaveGame; ValueType: string; ValueData: DreamZZT Saved Game; Flags: uninsdeletekey; Tasks: registerzzt
-Root: HKCR; SubKey: ZZTSaveGame\Shell\Open\Command; ValueType: string; ValueData: """{app}\DreamZZT.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: registerzzt
-Root: HKCR; Subkey: ZZTSaveGame\DefaultIcon; ValueType: string; ValueData: {app}\DreamZZT.exe,1; Flags: uninsdeletevalue; Tasks: registerzzt
+Root: HKCR; SubKey: .sav; ValueType: string; ValueData: ZZTSaveGame; Flags: uninsdeletekey; Tasks: registersav
+Root: HKCR; SubKey: ZZTSaveGame; ValueType: string; ValueData: DreamZZT Saved Game; Flags: uninsdeletekey; Tasks: registersav
+Root: HKCR; SubKey: ZZTSaveGame\Shell\Open\Command; ValueType: string; ValueData: """{app}\DreamZZT.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: registersav
+Root: HKCR; Subkey: ZZTSaveGame\DefaultIcon; ValueType: string; ValueData: {app}\DreamZZT.exe,1; Flags: uninsdeletevalue; Tasks: registersav
+Root: HKCR; SubKey: .szt; ValueType: string; ValueData: SuperZZTGame; Flags: uninsdeletekey; Tasks: registerszt
+Root: HKCR; SubKey: SuperZZTGame; ValueType: string; ValueData: Super DreamZZT Game; Flags: uninsdeletekey; Tasks: registerszt
+Root: HKCR; SubKey: SuperZZTGame\Shell\Open\Command; ValueType: string; ValueData: """{app}\DreamZZT.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: registerszt
+Root: HKCR; Subkey: SuperZZTGame\DefaultIcon; ValueType: string; ValueData: {app}\DreamZZT.exe,1; Flags: uninsdeletevalue; Tasks: registerszt
@@ -65,8 +65,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,8,0
- PRODUCTVERSION 3,0,8,0
+ FILEVERSION 3,1,$WCREV$,0
+ PRODUCTVERSION 3,1,$WCREV$,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -82,13 +82,13 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Sam Steele"
- VALUE "FileDescription", "DreamZZT 3.0.8"
- VALUE "FileVersion", "3, 0, 8, 0"
+ VALUE "FileDescription", "DreamZZT 3.1.$WCREV$"
+ VALUE "FileVersion", "3, 1, $WCREV$, 0"
VALUE "InternalName", "dreamzzt"
VALUE "LegalCopyright", "Copyright (C) 2000 - 2007 Sam Steele, All Rights Reserved."
VALUE "OriginalFilename", "dreamzzt.rc"
- VALUE "ProductName", " DreamZZT 3.0.8"
- VALUE "ProductVersion", "3, 0, 8, 0"
+ VALUE "ProductName", " DreamZZT 3.1.$WCREV$"
+ VALUE "ProductVersion", "3, 1, $WCREV$, 0"
END
END
BLOCK "VarFileInfo"
View
@@ -52,7 +52,7 @@ extern struct board_info_node *board_list;
extern struct board_info_node *currentbrd;
extern int switchbrd;
-extern bool debug_visible;
+extern int debug_visible;
void draw_main() {
ct->color(15,1);

0 comments on commit f3832e7

Please sign in to comment.