Skip to content

Commit ea4054e

Browse files
committed
fix(windows): strip pre-release suffix from VersionInfoVersion in Inno Setup
VersionInfoVersion only accepts numeric X.X.X.X format. Pre-release tags like "1.3.3-beta.78" caused the installer build to fail. The full version string is preserved in AppVersion and the output filename.
1 parent 9a5b760 commit ea4054e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

windows/installer/submersion.iss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
#define APP_VERSION_CODE "0"
1212
#endif
1313

14+
; Strip pre-release suffix (e.g. "1.3.3-beta.78" -> "1.3.3") for
15+
; VersionInfoVersion, which only accepts numeric X.X.X.X format.
16+
#define POS Pos("-", APP_VERSION)
17+
#if POS > 0
18+
#define APP_VERSION_NUMERIC Copy(APP_VERSION, 1, POS - 1)
19+
#else
20+
#define APP_VERSION_NUMERIC APP_VERSION
21+
#endif
22+
1423
[Setup]
1524
AppId={{B8F4E9A2-7C3D-4E1F-9A5B-2D6E8F0C1A3B}
1625
AppName=Submersion
@@ -32,7 +41,7 @@ SolidCompression=yes
3241
ArchitecturesAllowed=x64compatible
3342
PrivilegesRequired=admin
3443
WizardStyle=modern
35-
VersionInfoVersion={#APP_VERSION}.{#APP_VERSION_CODE}
44+
VersionInfoVersion={#APP_VERSION_NUMERIC}.{#APP_VERSION_CODE}
3645

3746
[Languages]
3847
Name: "english"; MessagesFile: "compiler:Default.isl"

0 commit comments

Comments
 (0)