11
22#define MyAppName "darktable"
33#define MyAppVersion "${PROJECT_VERSION}"
4+ #define MyAppVersionLength Len(MyAppVersion)
45#define MyAppCopyright "Copyright © 2009-2025 darktable developers"
56#define MyAppPublisher "darktable team"
67#define MyAppURL "https://darktable.org/"
78#define MyAppExeName "darktable.exe"
89#define MyAppCliExeName "darktable-cli.exe"
910
1011[Setup]
11- ; The value of AppId uniquely identifies the application. We also realize that
12- ; some users install more than one darktable version (e.g. stable and nightly
13- ; snapshot), so having the app name plus version as the AppId makes sense.
14- AppId={#MyAppName}{#MyAppVersion}
12+ ; The value of AppId uniquely identifies the application. Some users install
13+ ; both a darktable release and a development snapshot (as a daily driver and
14+ ; for testing, respectively), so it makes sense to use the application name
15+ ; along with the release/non-release discriminator as the AppId.
16+ AppId={#MyAppName}{code:SuffixIfNotRelease}
1517AppName={#MyAppName}
1618AppVersion={#MyAppVersion}
1719
@@ -25,7 +27,7 @@ AppPublisher={#MyAppPublisher}
2527AppPublisherURL={#MyAppURL}
2628AppSupportURL={#MyAppURL}
2729AppUpdatesURL={#MyAppURL}
28- DefaultDirName={autopf}\{#MyAppName}
30+ DefaultDirName={autopf}\{#MyAppName}{code:SuffixIfNotRelease}
2931UninstallDisplayIcon={app}\bin\{#MyAppExeName}
3032
3133; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
@@ -39,7 +41,7 @@ ArchitecturesAllowed=x64compatible
3941ArchitecturesInstallIn64BitMode=x64compatible
4042
4143ChangesAssociations=yes
42- DefaultGroupName={#MyAppName}
44+ DefaultGroupName={#MyAppName}{code:SuffixIfNotRelease}
4345AllowNoIcons=yes
4446LicenseFile=share\doc\darktable\LICENSE
4547
@@ -60,6 +62,14 @@ OutputBaseFilename=darktable-{#MyAppVersion}-${ARCH_STRING}-innosetup-experiment
6062SolidCompression=yes
6163WizardStyle=modern
6264
65+ ; These parameters must be set to "no" if the AppId contains constants. We use
66+ ; scripted constant to have different AppIds for release and nightly snapshot.
67+ ; However, the behavior for "no" values seems logical, so these values are what
68+ ; would make sense to set even if we weren't forced to.
69+ UsePreviousLanguage=no
70+ UsePreviousPrivileges=no
71+
72+
6373[Tasks]
6474Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
6575
@@ -121,3 +131,16 @@ begin
121131 else
122132 Result := 'Environment'
123133end;
134+
135+ function SuffixIfNotRelease(Param: String): String;
136+ begin
137+ (*
138+ The length of the release version string is 5, but let's add some safety
139+ margin (the major and minor numbers may become double digits someday),
140+ the git snapshot version is _much_ longer anyway.
141+ *)
142+ if {#MyAppVersionLength} > 7 then
143+ Result := '-dev'
144+ else
145+ Result := ''
146+ end;
0 commit comments