2017-09-11 10:49:25 +00:00
|
|
|
|
2021-01-03 12:24:56 +00:00
|
|
|
#define SRC_PATH AddBackslash(SourcePath) + "..\src"
|
|
|
|
|
2021-02-08 09:09:22 +00:00
|
|
|
#include SRC_PATH + "\version\fort_version.h"
|
2017-09-11 10:49:25 +00:00
|
|
|
|
2021-03-31 12:42:36 +00:00
|
|
|
#define APP_EXE_NAME APP_BASE + ".exe"
|
|
|
|
#define APP_ICO_NAME APP_BASE + ".ico"
|
2021-03-31 12:53:03 +00:00
|
|
|
#define APP_SVC_NAME APP_BASE + "Svc"
|
2017-09-11 10:49:25 +00:00
|
|
|
|
2021-03-24 14:05:30 +00:00
|
|
|
#define APP_EXE StringChange("{app}\%exe%", "%exe%", APP_EXE_NAME)
|
|
|
|
|
2017-09-11 10:49:25 +00:00
|
|
|
[Setup]
|
|
|
|
; NOTE: The value of AppId uniquely identifies this application.
|
|
|
|
; Do not use the same AppId value in installers for other applications.
|
|
|
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
2021-04-01 08:50:58 +00:00
|
|
|
SetupMutex=Global\{#APP_BASE}Setup
|
2021-03-31 12:53:03 +00:00
|
|
|
; TODO: Remove {#APP_NAME} from AppMutex after v4.1.0
|
2021-03-31 12:42:36 +00:00
|
|
|
AppMutex={#APP_NAME},{#APP_BASE},Global\{#APP_BASE}
|
2017-09-11 10:49:25 +00:00
|
|
|
AppName={#APP_NAME}
|
|
|
|
AppVersion={#APP_VERSION_STR}
|
2019-04-24 17:41:11 +00:00
|
|
|
VersionInfoVersion={#APP_VERSION_STR}
|
2017-09-11 10:49:25 +00:00
|
|
|
AppVerName={#APP_NAME}
|
2019-04-24 17:41:11 +00:00
|
|
|
AppCopyright={#APP_LEGALCOPYRIGHT}
|
2017-09-11 10:49:25 +00:00
|
|
|
AppPublisher={#APP_PUBLISHER}
|
|
|
|
AppPublisherURL={#APP_URL}
|
|
|
|
AppSupportURL={#APP_URL}
|
|
|
|
AppUpdatesURL={#APP_UPDATES_URL}
|
|
|
|
DefaultGroupName={#APP_NAME}
|
|
|
|
DefaultDirName={pf32}\{#APP_NAME}
|
|
|
|
AlwaysShowDirOnReadyPage=yes
|
|
|
|
AlwaysShowGroupOnReadyPage=yes
|
|
|
|
AllowNoIcons=yes
|
2021-03-31 12:42:36 +00:00
|
|
|
OutputBaseFilename={#APP_BASE}-{#APP_VERSION_STR}
|
2019-03-10 18:03:59 +00:00
|
|
|
Uninstallable=not IsTaskSelected('portable')
|
2017-09-11 10:49:25 +00:00
|
|
|
UninstallFilesDir={app}\uninst
|
2021-01-03 12:24:56 +00:00
|
|
|
UninstallDisplayIcon={uninstallexe}
|
|
|
|
SetupIconFile={#SRC_PATH}\ui\{#APP_ICO_NAME}
|
2017-09-11 10:49:25 +00:00
|
|
|
ArchitecturesInstallIn64BitMode=x64
|
|
|
|
Compression=lzma2/ultra
|
|
|
|
SolidCompression=yes
|
|
|
|
|
|
|
|
[Languages]
|
2017-09-14 04:33:29 +00:00
|
|
|
Name: en; MessagesFile: "compiler:Default.isl"
|
|
|
|
Name: ru; MessagesFile: "compiler:Languages\Russian.isl"
|
2021-04-22 11:45:45 +00:00
|
|
|
Name: fr; MessagesFile: "compiler:Languages\French.isl"
|
|
|
|
Name: ko; MessagesFile: "compiler:Languages\Korean.isl"
|
2017-09-14 04:33:29 +00:00
|
|
|
|
2019-03-10 18:03:59 +00:00
|
|
|
[Tasks]
|
2019-03-14 02:50:05 +00:00
|
|
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; Flags: unchecked
|
2021-04-22 11:45:45 +00:00
|
|
|
Name: "explorer"; Description: "File Explorer integration"; Flags: unchecked
|
2019-03-10 18:03:59 +00:00
|
|
|
Name: "portable"; Description: "Portable"; Flags: unchecked
|
|
|
|
|
2017-09-11 10:49:25 +00:00
|
|
|
[Files]
|
2019-04-08 11:39:00 +00:00
|
|
|
Source: "build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
2021-03-31 12:42:36 +00:00
|
|
|
Source: "{#APP_EXE_NAME}.example.ini"; DestDir: "{app}"
|
2021-03-26 11:48:11 +00:00
|
|
|
Source: "README.portable"; DestDir: "{app}"; Tasks: portable
|
2017-09-11 10:49:25 +00:00
|
|
|
|
2021-03-24 14:05:30 +00:00
|
|
|
[Registry]
|
|
|
|
; Explorer's Context Menu
|
2021-03-27 15:27:55 +00:00
|
|
|
#define REG_SHELL "SystemFileAssociations\.exe\Shell"
|
|
|
|
#define REG_SHELL_MENU REG_SHELL + "\Fort Firewall"
|
|
|
|
Root: HKCR; Subkey: "{#REG_SHELL}"; Flags: uninsdeletekeyifempty; Tasks: explorer
|
2021-03-24 14:05:30 +00:00
|
|
|
Root: HKCR; Subkey: "{#REG_SHELL_MENU}"; Flags: deletekey uninsdeletekey
|
2021-03-26 11:48:11 +00:00
|
|
|
Root: HKCR; Subkey: "{#REG_SHELL_MENU}"; ValueType: string; ValueName: "icon"; ValueData: "{#APP_EXE}"; Tasks: explorer
|
|
|
|
Root: HKCR; Subkey: "{#REG_SHELL_MENU}"; ValueType: string; ValueName: "MUIVerb"; ValueData: "Fort Firewall ..."; Tasks: explorer
|
2021-03-31 10:29:19 +00:00
|
|
|
Root: HKCR; Subkey: "{#REG_SHELL_MENU}\command"; ValueType: string; ValueData: """{#APP_EXE}"" -w -c prog add ""%1"""; Tasks: explorer
|
2021-03-24 14:05:30 +00:00
|
|
|
|
2017-09-11 10:49:25 +00:00
|
|
|
[Icons]
|
|
|
|
; Start menu shortcut
|
2021-03-24 14:05:30 +00:00
|
|
|
Name: "{group}\{#APP_NAME}"; Filename: "{#APP_EXE}"; WorkingDir: "{app}"; Parameters: "--lang {code:LanguageName}"
|
2017-09-13 11:08:27 +00:00
|
|
|
; Uninstaller shortcut
|
2019-04-11 04:58:43 +00:00
|
|
|
Name: "{group}\{cm:UninstallProgram,{#APP_NAME}}"; Filename: "{uninstallexe}"
|
2019-03-14 02:50:05 +00:00
|
|
|
; Desktop shortcut
|
2021-03-24 14:05:30 +00:00
|
|
|
Name: "{commondesktop}\{#APP_NAME}"; Filename: "{#APP_EXE}"; WorkingDir: "{app}"; \
|
|
|
|
Parameters: "--lang {code:LanguageName}"; Tasks: desktopicon
|
2017-09-11 10:49:25 +00:00
|
|
|
|
|
|
|
[Run]
|
2019-03-10 18:03:59 +00:00
|
|
|
Filename: "{app}\driver\scripts\reinstall.bat"; Description: "Re-install driver"; Flags: runascurrentuser
|
2021-03-31 12:53:03 +00:00
|
|
|
Filename: "sc.exe"; Parameters: "start {#APP_SVC_NAME}"; Description: "Start service"; Flags: runascurrentuser nowait
|
2020-10-30 16:25:30 +00:00
|
|
|
Filename: "https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads"; \
|
2021-04-22 11:45:45 +00:00
|
|
|
Description: "Visual C++ x86 redistributable"; Flags: shellexec postinstall
|
2017-09-11 10:49:25 +00:00
|
|
|
|
|
|
|
[UninstallRun]
|
2021-03-27 10:40:13 +00:00
|
|
|
Filename: "{#APP_EXE}"; Parameters: "-u"; RunOnceId: "DelProvider"; Flags: runascurrentuser
|
2021-03-29 11:00:37 +00:00
|
|
|
Filename: "{app}\driver\scripts\uninstall.bat"; RunOnceId: "DelDriver"; Flags: runascurrentuser
|
2017-09-11 10:49:25 +00:00
|
|
|
|
2018-02-19 15:02:13 +00:00
|
|
|
[InstallDelete]
|
2021-03-26 11:48:11 +00:00
|
|
|
Type: filesandordirs; Name: "{app}\driver"
|
|
|
|
Type: filesandordirs; Name: "{app}\i18n"
|
|
|
|
Type: filesandordirs; Name: "{app}\plugins"
|
|
|
|
Type: files; Name: "{app}\curl*.*"
|
|
|
|
Type: files; Name: "{app}\qt*.*"
|
|
|
|
Type: files; Name: "{app}\README*.*"
|
2018-02-19 15:02:13 +00:00
|
|
|
|
2020-01-25 05:54:25 +00:00
|
|
|
[Code]
|
2021-03-31 12:53:03 +00:00
|
|
|
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
|
|
|
var
|
|
|
|
ResultCode: Integer;
|
|
|
|
begin
|
|
|
|
Exec('sc.exe', ExpandConstant('stop {#APP_SVC_NAME}'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
|
|
|
Result := '';
|
|
|
|
end;
|
|
|
|
|
2020-01-25 05:54:25 +00:00
|
|
|
function LanguageName(Param: String): String;
|
|
|
|
begin
|
|
|
|
Result := ActiveLanguage;
|
|
|
|
end;
|