From 8880ed7277165d96ad796b326551850904b051c1 Mon Sep 17 00:00:00 2001 From: rootfather Date: Tue, 19 Dec 2017 11:56:36 +0100 Subject: [PATCH] Win32: Add version detection to the Inno script 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. --- tools/windows/mgba-setup-win32.iss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/windows/mgba-setup-win32.iss b/tools/windows/mgba-setup-win32.iss index 638955371..c00ef0131 100644 --- a/tools/windows/mgba-setup-win32.iss +++ b/tools/windows/mgba-setup-win32.iss @@ -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 @@ -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