2015-07-19 13:22:50 +00:00
|
|
|
; Script generated by the Inno Setup Script Wizard.
|
|
|
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
|
|
|
|
|
|
#define MyAppName "Jackett"
|
2018-06-23 01:38:32 +00:00
|
|
|
#define MyAppVersion GetFileVersion(MyFileForVersion)
|
|
|
|
#define MyAppPublisher "Jackett"
|
2015-11-07 03:50:49 +00:00
|
|
|
#define MyAppURL "https://github.com/Jackett/Jackett"
|
2015-07-19 13:22:50 +00:00
|
|
|
#define MyAppExeName "JackettTray.exe"
|
|
|
|
|
|
|
|
[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.)
|
|
|
|
AppId={{C2A9FC00-AA48-4F17-9A72-62FBCEE2785B}
|
|
|
|
AppName={#MyAppName}
|
|
|
|
AppVersion={#MyAppVersion}
|
|
|
|
;AppVerName={#MyAppName} {#MyAppVersion}
|
|
|
|
AppPublisher={#MyAppPublisher}
|
|
|
|
AppPublisherURL={#MyAppURL}
|
|
|
|
AppSupportURL={#MyAppURL}
|
|
|
|
AppUpdatesURL={#MyAppURL}
|
2020-01-09 18:18:27 +00:00
|
|
|
DefaultDirName={commonappdata}\{#MyAppName}
|
2015-07-19 13:22:50 +00:00
|
|
|
DefaultGroupName={#MyAppName}
|
|
|
|
DisableProgramGroupPage=yes
|
2018-06-23 01:38:32 +00:00
|
|
|
OutputBaseFilename={#MyOutputFilename}
|
2018-06-30 12:49:11 +00:00
|
|
|
SetupIconFile=src\Jackett.Tray\jackett.ico
|
|
|
|
UninstallDisplayIcon={commonappdata}\Jackett\{#MyAppExeName}
|
2018-06-23 01:38:32 +00:00
|
|
|
VersionInfoVersion={#MyAppVersion}
|
2018-06-24 01:32:22 +00:00
|
|
|
UninstallDisplayName={#MyAppName}
|
2015-07-19 13:22:50 +00:00
|
|
|
Compression=lzma
|
|
|
|
SolidCompression=yes
|
2015-11-09 21:59:16 +00:00
|
|
|
DisableDirPage=yes
|
2022-01-17 01:35:45 +00:00
|
|
|
WizardStyle=modern
|
2015-07-19 13:22:50 +00:00
|
|
|
|
|
|
|
[Languages]
|
|
|
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
|
|
|
|
|
|
[Tasks]
|
|
|
|
Name: "windowsService"; Description: "Install as a Windows Service"
|
|
|
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
|
|
|
2022-01-22 23:23:49 +00:00
|
|
|
[Dirs]
|
|
|
|
Name: "{commonappdata}\Jackett"; Permissions: everyone-modify
|
|
|
|
|
2015-07-19 13:22:50 +00:00
|
|
|
[Files]
|
2022-01-22 23:23:49 +00:00
|
|
|
Source: "{#MySourceFolder}\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-modify
|
2015-07-19 13:22:50 +00:00
|
|
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
|
|
|
|
|
|
|
[Icons]
|
2015-11-10 22:02:02 +00:00
|
|
|
Name: "{group}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"
|
2015-07-19 13:22:50 +00:00
|
|
|
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
2015-11-10 22:02:02 +00:00
|
|
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Tasks: desktopicon
|
2015-07-19 13:22:50 +00:00
|
|
|
|
2022-01-17 01:35:45 +00:00
|
|
|
[Code]
|
2022-01-18 15:56:18 +00:00
|
|
|
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
|
|
|
var
|
|
|
|
ErrorCode: Integer;
|
|
|
|
begin
|
|
|
|
ShellExec('open', 'taskkill.exe', '/f /im {#MyAppExeName}', '', SW_HIDE, ewNoWait, ErrorCode);
|
|
|
|
ShellExec('open', 'taskkill.exe', '/f /im JackettConsole.exe', '', SW_HIDE, ewNoWait, ErrorCode);
|
|
|
|
end;
|
2022-01-17 01:35:45 +00:00
|
|
|
|
2015-07-19 13:22:50 +00:00
|
|
|
[Run]
|
2018-06-24 01:32:22 +00:00
|
|
|
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated runhidden;
|
|
|
|
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated runhidden;
|
|
|
|
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
|
|
|
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
2018-06-30 12:49:11 +00:00
|
|
|
Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
2015-07-19 13:22:50 +00:00
|
|
|
|
|
|
|
[UninstallRun]
|
2018-06-24 01:32:22 +00:00
|
|
|
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist runhidden
|
2018-06-30 12:49:11 +00:00
|
|
|
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im {#MyAppExeName}"; Flags: waituntilterminated skipifdoesntexist runhidden
|
|
|
|
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im JackettConsole.exe"; Flags: waituntilterminated skipifdoesntexist runhidden
|
2015-07-19 13:22:50 +00:00
|
|
|
|
|
|
|
|