From c21023701679ce6d55031b428006d1544339ac3d Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Sun, 4 Nov 2012 11:45:03 +0100 Subject: [PATCH] Installer: Make it easier to compile the script from the IDE As it is now required to make changes at more than one place in the code if we want to compile the script from within the IDE, introduce a define for easy toggling. Signed-off-by: Sebastian Schuberth --- share/WinGit/install.iss | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/share/WinGit/install.iss b/share/WinGit/install.iss index e3ce3340..1e4f444c 100644 --- a/share/WinGit/install.iss +++ b/share/WinGit/install.iss @@ -1,5 +1,12 @@ +; Uncomment the line below to be able to compile the script from within the IDE. +;#define COMPILE_FROM_IDE + #define APP_NAME 'Git' +#ifdef COMPILE_FROM_IDE +#define APP_VERSION 'Snapshot' +#else #define APP_VERSION '%APPVERSION%' +#endif #define APP_URL 'http://msysgit.googlecode.com/' #define APP_BUILTINS 'etc\fileList-builtins.txt' #define APP_BINDIMAGE 'etc\fileList-bindimage.txt' @@ -15,9 +22,9 @@ LZMAUseSeparateProcess=yes OutputBaseFilename={#APP_NAME+'-'+APP_VERSION} OutputDir={#GetEnv('USERPROFILE')} SolidCompression=yes - -; Uncomment the line below to be able to compile the script from within the IDE. -;SourceDir={#GetEnv('TEMP')}\WinGit +#ifdef COMPILE_FROM_IDE +SourceDir={#GetEnv('TEMP')}\WinGit +#endif ; Installer-related AllowNoIcons=yes @@ -34,10 +41,12 @@ DisableReadyPage=yes InfoBeforeFile=gpl-2.0.rtf PrivilegesRequired=none UninstallDisplayIcon={app}\etc\git.ico +#ifndef COMPILE_FROM_IDE #if Pos('-',APP_VERSION)>0 - VersionInfoVersion={#Copy(APP_VERSION,1,Pos('-',APP_VERSION)-1)} +VersionInfoVersion={#Copy(APP_VERSION,1,Pos('-',APP_VERSION)-1)} #else - VersionInfoVersion={#APP_VERSION} +VersionInfoVersion={#APP_VERSION} +#endif #endif ; Cosmetic -- 2.11.4.GIT