barrier/dist/inno/barrier.iss.in

91 lines
3.9 KiB
Plaintext
Raw Permalink Normal View History

2018-02-10 21:46:50 +00:00
#define MyAppName "Barrier"
#define MyAppVersion "@BARRIER_VERSION_MAJOR@.@BARRIER_VERSION_MINOR@.@BARRIER_VERSION_PATCH@.@BARRIER_BUILD_NUMBER@"
#define MyAppTextVersion "@BARRIER_VERSION@"
2018-02-10 21:46:50 +00:00
#define MyAppPublisher "Debauchee Open Source Group"
#define MyAppURL "https://github.com/debauchee/barrier/wiki"
#define MyAppCopyright "Copyright (C) 2018 Debauchee Open Source Group"
2018-02-10 21:46:50 +00:00
#define MyAppExeName "barrier.exe"
#define MyAppServiceName "Barrier"
#define MyAppServiceExe "barrierd.exe"
#define MyAppServiceDesc "Manages the Barrier background processes."
#define MyAppListenerDesc "Barrier Listener"
2018-02-10 21:46:50 +00:00
[Setup]
AppId={{41036EA6-3F7A-4803-8AE0-469E5E91EFCC}
AppName={#MyAppName}
AppVersion={#MyAppTextVersion}
AppVerName={#MyAppName} {#MyAppTextVersion}
2018-02-10 21:46:50 +00:00
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
2018-03-01 15:57:13 +00:00
LicenseFile=@CMAKE_CURRENT_SOURCE_DIR@/res/License.rtf
OutputDir=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/../installer-inno/bin
OutputBaseFilename=BarrierSetup-{#MyAppTextVersion}
2018-03-01 15:57:13 +00:00
SetupIconFile=@CMAKE_CURRENT_SOURCE_DIR@/res/barrier.ico
VersionInfoProductTextVersion={#MyAppTextVersion}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppTextVersion}
VersionInfoVersion={#MyAppVersion}
VersionInfoCopyright={#MyAppCopyright}
2018-02-10 21:46:50 +00:00
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64 ia64
UninstallDisplayIcon={app}\{#MyAppExeName}
2018-02-10 21:46:50 +00:00
#include "scripts\lang\english.iss"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
2018-03-01 15:57:13 +00:00
Source: "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/Release/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
2018-02-10 21:46:50 +00:00
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
; there's no "check if exists" or "insert if not exists" for netsh's firewall commands
; to avoid duplicate entries remove the existing rule (fails if it doesn't exist) before adding
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall delete rule name=""{#MyAppListenerDesc}"""; Flags: runhidden
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall add rule name=""{#MyAppListenerDesc}"" protocol=TCP dir=in localport=24800 action=allow"; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "create {#MyAppServiceName} start= auto binPath= ""\""{app}\{#MyAppServiceExe}\"""""; Flags: runhidden
2018-02-10 21:46:50 +00:00
Filename: {sys}\sc.exe; Parameters: "description {#MyAppServiceName} ""{#MyAppServiceDesc}"""; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "start {#MyAppServiceName}"; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[UninstallDelete]
2020-12-11 17:38:51 +00:00
Type: filesandordirs; Name: "{commonappdata}\Barrier"
2018-02-10 21:46:50 +00:00
[UninstallRun]
2020-12-11 17:38:51 +00:00
Filename: {sys}\taskkill; Parameters: "/im {#MyAppExeName} /f /t"; Flags: runhidden
Filename: {sys}\net.exe; Parameters: "stop {#MyAppServiceName}"; Flags: runhidden
2018-02-10 21:46:50 +00:00
Filename: {sys}\sc.exe; Parameters: "delete {#MyAppServiceName}"; Flags: runhidden
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall delete rule name=""{#MyAppListenerDesc}"""; Flags: runhidden
2018-02-10 21:46:50 +00:00
[CustomMessages]
DependenciesDir="redist"
; shared code for installing the products
#include "scripts\products.iss"
#include "scripts\products\stringversion.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\msiproduct.iss"
#include "scripts\products\vcredist2017.iss"
[Code]
function InitializeSetup(): boolean;
begin
// initialize windows version
initwinversion();
vcredist2017('14'); // min allowed version is 14.0
2018-02-10 21:46:50 +00:00
Result := true;
end;