Skip to content

Commit

Permalink
Win32: Add version detection to the Inno script
Browse files Browse the repository at this point in the history
Now you don't have to switch between IsRelease = yes and no.

Instead, you set the CurrentReleaseVersion variable to the
number of the latest stable release and Inno will decide
if the setup you are about to build is a stable or a development
package, so you have to alter the script only once for each release
cycle.

This is the highest level of automation I can currently imagine.
  • Loading branch information
rootfather committed Dec 19, 2017
1 parent 17625b2 commit d21742e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/windows/mgba-setup-win32.iss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
;For automation purposes it is highly recommended to copy the files from
;\tools\windows\ to the directory that contains the win32 distribution files!

;IsRelease = yes will create a setup file named after the current version of mGBA.
;IsRelease = no will create a setup fille named mGBA-setup-latest-win32.exe.
#define IsRelease = 'no'
;Set CurrentReleaseVersion to the number of the latest stable mGBA build.
#define CurrentReleaseVersion = '0.6.1'

#define VerMajor
#define VerMinor
Expand Down Expand Up @@ -38,10 +37,12 @@ UsePreviousSetupType=True
UsePreviousTasks=True
AlwaysShowGroupOnReadyPage=True
LicenseFile=LICENSE.txt
#if IsRelease=='yes';
#if CurrentReleaseVersion == AppVer;
#define IsRelease = 'yes'
AppVerName=mGBA {#AppVer}
OutputBaseFilename=mGBA-{#AppVer}-win32
#elif IsRelease=='no';
#elif CurrentReleaseVersion != AppVer;
#define IsRelease = 'no'
AppVerName=mGBA (Development build)
OutputBaseFilename=mGBA-setup-latest-win32
#endif
Expand Down

0 comments on commit d21742e

Please sign in to comment.