Skip to content

Commit 55cff3a

Browse files
INNO Setup fixes
1 parent 625ec03 commit 55cff3a

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

cmake/Packaging.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ endif()
108108
if(WIN32)
109109
set(CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR}/cmake/windows/inno/innosetup.cmake)
110110
set(CPACK_EXTERNAL_ENABLE_STAGING ON)
111-
set(CPACK_BUILD_CONFIG "${CMAKE_BUILD_TYPE}")
111+
set(CPACK_BUILD_CONFIG ${CMAKE_BUILD_TYPE})
112+
set(CPACK_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
112113
endif()
113114

114115
# Define the install components

cmake/windows/inno/i18n/de.isl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SetupTypeFull=Komplette Installation (Hyperion und standalone tools)
88
SetupTypeCustom=Benutzerdefinierte Installation
99

1010
StartMenuEntry=&Startmenüeintrag erstellen
11+
MenuIconConsole=(Konsole)
1112

1213
DesktopIcon=&Desktop-Symbol erstellen
1314
DesktopIconAllUsers=Für alle Benutzer
@@ -20,3 +21,5 @@ AddToSystemAllUsers=Für alle Benutzer
2021

2122
Autostart_Group=Autostart
2223
Autostart_Description=Hyperion beim Windows start automatisch ausführen
24+
25+
VCRedistInstall=VC++ Laufzeitkomponenten werden installiert...

cmake/windows/inno/i18n/en.isl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SetupTypeFull=Full installation (Hyperion and standalone tools)
88
SetupTypeCustom=Custom installation
99

1010
StartMenuEntry=Create a &start menu entry
11+
MenuIconConsole=(Console)
1112

1213
DesktopIcon=Create a &desktop icon
1314
DesktopIconAllUsers=For all users
@@ -20,3 +21,5 @@ AddToSystemAllUsers=For all users
2021

2122
Autostart_Group=Autostart
2223
Autostart_Description=Start Hyperion automatically on Windows startup
24+
25+
VCRedistInstall=Installing VC++ Redistributables...

cmake/windows/inno/windows.iss.in

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
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]"
1112
#define AppFile str(ComponentStagingDir)+str("\Hyperion\bin\hyperiond.exe")
1213

1314
[Setup]
@@ -17,6 +18,7 @@
1718

1819
; App Information
1920
AppId={{3546F644-587C-4690-B8DA-C84383B9ECFD}
21+
AppMutex={#AppName}
2022
AppName={#AppName}
2123
AppVersion={#AppVersion}
2224
AppPublisher={#AppPublisher}
@@ -45,7 +47,7 @@ OutputBaseFilename={#OutputName}
4547
DirExistsWarning=no
4648
AlwaysShowComponentsList=true
4749
PrivilegesRequired=lowest
48-
PrivilegesRequiredOverridesAllowed=commandline
50+
PrivilegesRequiredOverridesAllowed=dialog
4951
ArchitecturesAllowed=x64compatible
5052
ArchitecturesInstallIn64BitMode=x64compatible
5153
ChangesEnvironment=true
@@ -131,21 +133,29 @@ Source: "{#ComponentStagingDir}\hyperion_qt\*"; DestDir: "{app}"; Flags: ignorev
131133
#endif
132134

133135
;dependencies
134-
Source: "{#ComponentStagingDir}\dependencies\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs;
136+
Source: "{#ComponentStagingDir}\dependencies\*"; DestDir: "{app}"; Excludes: "\bin\{#VCRedist}"; Flags: ignoreversion recursesubdirs;
137+
138+
;vc_redist
139+
Source: "{#ComponentStagingDir}\dependencies\bin\{#VCRedist}"; DestDir: {tmp}; Flags: deleteafterinstall
135140

136141
[Registry]
137142
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Hyperion"; ValueData: "{app}\hyperiond.exe"; Flags:uninsdeletevalue; Tasks: autostart
138143

139144
[Icons]
140145
;menu icons
141146
Name: "{group}\{#AppName}"; Filename: "{app}\bin\hyperiond.exe"
147+
Name: "{group}\{#AppName} {cm:MenuIconConsole}"; Filename: "{app}\bin\hyperiond.exe"; Parameters: "-c"
148+
149+
;uninstaller
142150
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
143151

144-
;desktop icon
145-
Name: "{commondesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: desktopicon; Components: runtime
146-
Name: "{userdesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: desktopicon\common; Components: runtime
152+
;common desktop icon
153+
Name: "{commondesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: desktopicon\common; Components: runtime
154+
;user desktop icon
155+
Name: "{userdesktop}\Hyperion"; Filename: "{app}\bin\hyperiond.exe"; Tasks: desktopicon\user; Components: runtime
147156

148157
[Run]
158+
Filename: "{tmp}\{#VCRedist}"; Parameters: "/install /quiet /norestart"; StatusMsg: "{cm:VCRedistInstall}"
149159
Filename: "{app}\bin\hyperiond.exe"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
150160

151161
[Code]

src/hyperiond/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ int main(int argc, char** argv)
123123
QString processName = QCoreApplication::applicationName();
124124
#ifdef _WIN32
125125
processName.append(".exe");
126+
127+
// This prevents INNO Setup from being (un)installed while Hyperion is running!
128+
CreateMutexA(0, FALSE, "Hyperion");
126129
#endif
127130

128131
QObject::connect(&errorManager, &ErrorManager::errorOccurred, [&](const QString& error) {

0 commit comments

Comments
 (0)