Skip to content

Commit fecd672

Browse files
committed
installer: fix version of installer and installed file
As reported by @JJClements, the File version and Product version of the installer and installer binary were not the same. They are set by the `installer/release.sh` and by using `sdk build (installer | git-and-installer)` commands, which created this discrepancy. Create two macros, `FILE_VERSION` and `PROD_VERSION` to store File and Product version of the included binary and copy it to the installer file. Closes: git-for-windows/git#1797 Signed-off-by: Rohit Ashiwal <[email protected]>
1 parent 95dc31f commit fecd672

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

installer/install.iss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ SolidCompression=yes
4242
SourceDir={#SOURCE_DIR}
4343
#else
4444
SourceDir={#SourcePath}\..\..\..\..
45+
#define SOURCE_DIR SourcePath+'\..\..\..\..'
4546
#endif
4647
#if BITNESS=='64'
4748
ArchitecturesInstallIn64BitMode=x64
@@ -50,13 +51,17 @@ ArchitecturesInstallIn64BitMode=x64
5051
SignTool=signtool
5152
#endif
5253

54+
#define FILE_VERSION GetFileVersion(SOURCE_DIR+'\'+MINGW_BITNESS+'\bin\git.exe')
55+
#define PROD_VERSION GetStringFileInfo(SOURCE_DIR+'\'+MINGW_BITNESS
56+
+'\bin\git.exe', 'ProductVersion')
57+
5358
; Installer-related
5459
AllowNoIcons=yes
5560
AppName={#APP_NAME}
5661
AppPublisher=The Git Development Community
5762
AppPublisherURL={#APP_URL}
5863
AppSupportURL={#APP_CONTACT_URL}
59-
AppVersion={#APP_VERSION}
64+
AppVersion={#PROD_VERSION}
6065
ChangesAssociations=yes
6166
ChangesEnvironment=yes
6267
CloseApplications=no
@@ -73,11 +78,7 @@ PrivilegesRequired=none
7378
#endif
7479
UninstallDisplayIcon={app}\{#MINGW_BITNESS}\share\git\git-for-windows.ico
7580
#ifndef COMPILE_FROM_IDE
76-
#if Pos('-',APP_VERSION)>0
77-
VersionInfoVersion={#Copy(APP_VERSION,1,Pos('-',APP_VERSION)-1)}
78-
#else
79-
VersionInfoVersion={#APP_VERSION}
80-
#endif
81+
VersionInfoVersion={#FILE_VERSION}
8182
#endif
8283

8384
; Cosmetic

0 commit comments

Comments
 (0)