22#define AppVersion "@CPACK_PACKAGE_VERSION@"
33#define AppPublisher "@CPACK_PACKAGE_VENDOR@"
44#define AppURL "@CPACK_PACKAGE_HOMEPAGE_URL@"
5- #define AppCopyright "Copyright (c) 2014-2023 Hyperion Project"
5+ #define AppCopyright "Copyright (c) 2014-2025 Hyperion Project"
66#define AppLicense "@CPACK_RESOURCE_FILE_LICENSE@"
77#define AppDescription "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@"
88#define OutputName "@CPACK_PACKAGE_FILE_NAME@"
99#define ComponentStagingDir "@CPACK_TEMPORARY_INSTALL_DIRECTORY@"
1010#define OutputDir "@CPACK_PACKAGE_DIRECTORY@"
11- #define VCRedist "vc_redist.@
[email protected] "
1211#define AppFile str(ComponentStagingDir)+str("\Hyperion\bin\hyperiond.exe")
12+ #define Arch "@CPACK_SYSTEM_PROCESSOR@"
13+ #define VCRedist "vc_redist." + Arch + ".exe"
14+ #define VCRedistVersion GetVersionNumbersString(str(ComponentStagingDir) + "\dependencies\bin\" + VCRedist)
15+ #define VCRedistVersionMajor
16+ #expr UnpackVersionComponents(StrToVersion(VCRedistVersion), VCRedistVersionMajor, null, null, null)
1317
1418[Setup]
1519; NOTE: The value of AppId uniquely identifies this application.
1620; Do not use the same AppId value in installers for other applications.
1721; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
1822
23+ SetupLogging=yes
24+
1925; App Information
2026AppId={{3546F644-587C-4690-B8DA-C84383B9ECFD}
2127AppMutex={#AppName}
@@ -50,6 +56,7 @@ PrivilegesRequired=lowest
5056PrivilegesRequiredOverridesAllowed=dialog
5157ArchitecturesAllowed=x64compatible
5258ArchitecturesInstallIn64BitMode=x64compatible
59+ RestartIfNeededByRun=no
5360ChangesEnvironment=true
5461CloseApplications=yes
5562ShowComponentSizes=no
@@ -144,7 +151,6 @@ Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType:
144151[Icons]
145152;menu icons
146153Name: "{group}\{#AppName}"; Filename: "{app}\bin\hyperiond.exe"
147- Name: "{group}\{#AppName} {cm:MenuIconConsole}"; Filename: "{app}\bin\hyperiond.exe"; Parameters: "-c -v"
148154
149155;uninstaller
150156Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
@@ -155,7 +161,7 @@ Name: "{commondesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: de
155161Name: "{userdesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: desktopicon\user; Components: runtime
156162
157163[Run]
158- Filename: "{tmp}\{#VCRedist}"; Parameters: "/install /quiet /norestart"; StatusMsg: "{cm:VCRedistInstall}"
164+ Filename: "{tmp}\{#VCRedist}"; Parameters: "/install /quiet /norestart"; StatusMsg: "{cm:VCRedistInstall}"; Check: VCRedistNeeded;
159165Filename: "{app}\bin\hyperiond.exe"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
160166
161167[Code]
168174
169175#include "modpath.iss"
170176
177+ function VCRedistNeeded(): boolean;
178+ var
179+ regVersion: String;
180+ begin
181+ Result := True;
182+ if (RegQueryStringValue(HKEY_LOCAL_MACHINE, ExpandConstant('SOFTWARE\Microsoft\VisualStudio\{#VCRedistVersionMajor}.0\VC\Runtimes\{#Arch}'), 'Version', regVersion)) then
183+ begin
184+ Result := (CompareStr(regVersion, ExpandConstant('{#VCRedistVersion}')) < 0);
185+ end;
186+ end;
187+
171188function GetUninstallString: String;
172189var
173190 UnInstPath: String;
0 commit comments