barrier/dist/inno/barrier.iss.in

81 lines
3.4 KiB
Plaintext
Raw Normal View History

2018-02-11 00:46:50 +03:00
#define MyAppName "Barrier"
2018-03-01 18:57:13 +03:00
#define MyAppVersion "@BARRIER_VERSION@"
2018-02-11 00:46:50 +03:00
#define MyAppPublisher "Debauchee Open Source Group"
#define MyAppURL "https://github.com/debauchee/barrier/wiki"
#define MyAppExeName "barrier.exe"
#define MyAppServiceName "Barrier"
#define MyAppServiceExe "barrierd.exe"
#define MyAppServiceDesc "Manages the Barrier background processes."
#define MyAppListenerDesc "Barrier Listener"
2018-02-11 00:46:50 +03:00
[Setup]
AppId={{41036EA6-3F7A-4803-8AE0-469E5E91EFCC}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
2018-03-01 18:57:13 +03:00
LicenseFile=@CMAKE_CURRENT_SOURCE_DIR@/res/License.rtf
OutputDir=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/../installer-inno/bin
OutputBaseFilename=BarrierSetup-{#MyAppVersion}
SetupIconFile=@CMAKE_CURRENT_SOURCE_DIR@/res/barrier.ico
2018-02-11 00:46:50 +03:00
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64 ia64
#include "scripts\lang\english.iss"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
2018-03-01 18:57:13 +03:00
Source: "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/Release/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
2018-02-11 00:46:50 +03: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
2018-02-11 00:46:50 +03:00
Filename: {sys}\sc.exe; Parameters: "create {#MyAppServiceName} start= auto binPath= ""{app}\{#MyAppServiceExe}"""; Flags: runhidden
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]
Type: files; Name: "{app}\barrierd.log"
[UninstallRun]
Filename: {sys}\sc.exe; Parameters: "stop {#MyAppServiceName}"; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "delete {#MyAppServiceName}"; Flags: runhidden
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall delete rule name=""{#MyAppListenerDesc}"""; Flags: runhidden
2018-02-11 00:46:50 +03: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-11 00:46:50 +03:00
Result := true;
end;