2013-11-26 05:34:53 +00:00
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
2017-04-10 12:24:06 +00:00
#define AppName "Radarr"
#define AppPublisher "Team Radarr"
#define AppURL "https://radarr.video/"
2019-09-02 21:03:41 +00:00
#define ForumsURL "https://forums.radarr.video/"
2017-04-10 12:24:06 +00:00
#define AppExeName "Radarr.exe"
2019-12-03 01:36:18 +00:00
#define BaseVersion GetEnv('MAJORVERSION')
2019-09-02 21:03:41 +00:00
#define BuildNumber GetEnv('MINORVERSION')
#define BuildVersion GetEnv('RADARRVERSION')
#define BranchName GetEnv('BUILD_SOURCEBRANCHNAME')
2013-11-26 05:34:53 +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.)
2017-04-10 12:24:06 +00:00
AppId={{56C1065D-3523-4025-B76D-6F73F67F7F82}
2013-11-26 05:34:53 +00:00
AppName={#AppName}
2019-09-02 21:03:41 +00:00
AppVersion={#BaseVersion}
2013-11-26 05:34:53 +00:00
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
2013-11-26 20:17:16 +00:00
AppSupportURL={#ForumsURL}
2013-11-26 05:34:53 +00:00
AppUpdatesURL={#AppURL}
2017-04-10 12:24:06 +00:00
DefaultDirName={commonappdata}\Radarr\bin
2013-11-26 05:34:53 +00:00
DisableDirPage=yes
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
2019-10-14 20:21:00 +00:00
OutputBaseFilename=Radarr.{#BranchName}.{#BuildVersion}.windows.{#Framework}
2013-11-26 05:34:53 +00:00
SolidCompression=yes
AppCopyright=Creative Commons 3.0 License
AllowUNCPath=False
2017-04-10 12:24:06 +00:00
UninstallDisplayIcon={app}\Radarr.exe
2013-11-26 05:34:53 +00:00
DisableReadyPage=True
CompressionThreads=2
Compression=lzma2/normal
2013-11-26 20:17:16 +00:00
AppContact={#ForumsURL}
2019-09-02 21:03:41 +00:00
VersionInfoVersion={#BaseVersion}.{#BuildNumber}
2019-10-14 20:21:00 +00:00
SetupLogging=yes
2020-10-17 03:33:03 +00:00
OutputDir=output
2013-11-26 05:34:53 +00:00
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
2020-05-04 00:59:54 +00:00
Name: "desktopIcon"; Description: "{cm:CreateDesktopIcon}"
2020-10-12 02:43:08 +00:00
Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts as the LocalService user, you will need to change the user to access network shares)"; GroupDescription: "Start automatically"; Flags: exclusive
2019-09-02 21:03:41 +00:00
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
2019-07-27 02:38:00 +00:00
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
2013-11-26 05:34:53 +00:00
[Files]
2020-11-11 03:56:47 +00:00
Source: "..\_artifacts\{#Runtime}\{#Framework}\Radarr\Radarr.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\_artifacts\{#Runtime}\{#Framework}\Radarr\*"; Excludes: "Radarr.Update"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
2013-11-26 05:34:53 +00:00
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
2013-11-26 23:59:17 +00:00
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
2020-05-04 00:59:54 +00:00
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"; Tasks: desktopIcon
2019-07-27 02:38:00 +00:00
Name: "{userstartup}\{#AppName}"; Filename: "{app}\Radarr.exe"; WorkingDir: "{app}"; Tasks: startupShortcut
2013-11-26 05:34:53 +00:00
2020-10-17 03:33:03 +00:00
[InstallDelete]
Name: "{app}"; Type: filesandordirs
2013-11-26 05:34:53 +00:00
[Run]
2019-07-27 02:38:00 +00:00
Filename: "{app}\Radarr.Console.exe"; StatusMsg: "Removing previous Windows Service"; Parameters: "/u"; Flags: runhidden waituntilterminated;
Filename: "{app}\Radarr.Console.exe"; Description: "Enable Access from Other Devices"; StatusMsg: "Enabling Remote access"; Parameters: "/registerurl"; Flags: postinstall runascurrentuser runhidden waituntilterminated; Tasks: startupShortcut none;
Filename: "{app}\Radarr.Console.exe"; StatusMsg: "Installing Windows Service"; Parameters: "/i"; Flags: runhidden waituntilterminated; Tasks: windowsService
Filename: "{app}\Radarr.exe"; Description: "Open Radarr Web UI"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
Filename: "{app}\Radarr.exe"; Description: "Start Radarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
2013-11-26 05:34:53 +00:00
[UninstallRun]
2019-09-02 21:03:41 +00:00
Filename: "{app}\radarr.console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ResultCode: Integer;
begin
2020-10-12 02:43:08 +00:00
Exec('net', 'stop radarr', '', 0, ewWaitUntilTerminated, ResultCode)
Exec('sc', 'delete radarr', '', 0, ewWaitUntilTerminated, ResultCode)
2019-09-02 21:03:41 +00:00
end;