2013-11-26 08:34:53 +03:00
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
2015-01-29 21:11:01 +02:00
#define AppName "Sonarr"
#define AppPublisher "Team Sonarr"
2014-12-05 03:54:37 +02:00
#define AppURL "https://sonarr.tv/"
#define ForumsURL "https://forums.sonarr.tv/"
2017-09-18 05:25:28 +02:00
#define AppExeName "Sonarr.exe"
2023-06-02 02:46:03 +02:00
#define BuildNumber "4.0"
2022-08-23 07:11:34 +02:00
#define BuildNumber GetEnv('SONARR_VERSION')
2023-06-02 02:46:03 +02:00
#define MajorVersion GetEnv('SONARR_MAJOR_VERSION')
2017-09-18 05:25:28 +02:00
#define BranchName GetEnv('BRANCH')
2021-07-30 06:47:53 +02:00
#define Framework GetEnv('FRAMEWORK')
#define Runtime GetEnv('RUNTIME')
2013-11-26 08:34:53 +03:00
[Setup]
2022-08-23 07:11:34 +02:00
; NOTE: The value of AppId uniquely identifies this appl ication.
2013-11-26 08:34:53 +03:00
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
2013-11-26 23:19:26 +03:00
AppId={{56C1065D-3523-4025-B76D-6F73F67F7F71}
2013-11-26 08:34:53 +03:00
AppName={#AppName}
2023-06-02 02:46:03 +02:00
AppVersion={#MajorVersion}
2013-11-26 08:34:53 +03:00
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
2013-11-26 23:17:16 +03:00
AppSupportURL={#ForumsURL}
2013-11-26 08:34:53 +03:00
AppUpdatesURL={#AppURL}
2017-09-18 05:25:28 +02:00
UsePreviousAppDir=no
DefaultDirName={commonappdata}\Sonarr\bin
2013-11-26 08:34:53 +03:00
DisableDirPage=yes
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
2022-08-12 16:42:07 +02:00
OutputBaseFilename=Sonarr.{#BranchName}.{#BuildNumber}.{#Runtime}-installer
2013-11-26 08:34:53 +03:00
SolidCompression=yes
AppCopyright=Creative Commons 3.0 License
AllowUNCPath=False
2017-09-18 05:25:28 +02:00
UninstallDisplayIcon={app}\Sonarr.exe
2013-11-26 08:34:53 +03:00
DisableReadyPage=True
CompressionThreads=2
Compression=lzma2/normal
2013-11-26 23:17:16 +03:00
AppContact={#ForumsURL}
2023-06-02 02:46:03 +02:00
VersionInfoVersion={#MajorVersion}
2019-07-28 18:52:34 +02:00
SetupLogging=yes
2023-11-26 06:23:10 +02:00
OutputDir="..\..\..\_artifacts"
2023-06-02 02:46:03 +02:00
AppverName={#AppName}
2013-11-26 08:34:53 +03:00
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
2020-04-21 02:57:09 +02:00
Name: "desktopIcon"; Description: "{cm:CreateDesktopIcon}"
2020-10-09 16:36:34 +02: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 unchecked
2019-07-12 02:43:52 +02:00
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive
2017-08-23 04:59:47 +02:00
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
2013-11-26 08:34:53 +03:00
[Files]
2023-11-26 06:23:10 +02:00
Source: "..\..\..\_output\{#Runtime}\{#Framework}\Sonarr\Sonarr.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\..\_output\{#Runtime}\{#Framework}\Sonarr\*"; Excludes: "Sonarr.Update"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
2013-11-26 08:34:53 +03:00
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
2013-11-27 02:59:17 +03:00
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
2020-04-21 02:57:09 +02:00
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"; Tasks: desktopIcon
2017-09-18 05:25:28 +02:00
Name: "{userstartup}\{#AppName}"; Filename: "{app}\Sonarr.exe"; WorkingDir: "{app}"; Tasks: startupShortcut
[InstallDelete]
Name: "{commonappdata}\NzbDrone\bin"; Type: filesandordirs
2020-10-12 20:03:47 +02:00
Name: "{app}"; Type: filesandordirs
2013-11-26 08:34:53 +03:00
[Run]
2021-02-23 04:41:58 +02:00
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Removing previous Windows Service"; Parameters: "/u /exitimmediately"; Flags: runhidden waituntilterminated;
Filename: "{app}\Sonarr.Console.exe"; Description: "Enable Access from Other Devices"; StatusMsg: "Enabling Remote access"; Parameters: "/registerurl /exitimmediately"; Flags: postinstall runascurrentuser runhidden waituntilterminated; Tasks: startupShortcut none;
Filename: "{app}\Sonarr.Console.exe"; StatusMsg: "Installing Windows Service"; Parameters: "/i /exitimmediately"; Flags: runhidden waituntilterminated; Tasks: windowsService
2017-09-18 05:25:28 +02:00
Filename: "{app}\Sonarr.exe"; Description: "Open Sonarr Web UI"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
Filename: "{app}\Sonarr.exe"; Description: "Start Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
2013-11-26 08:34:53 +03:00
[UninstallRun]
2017-09-18 05:25:28 +02:00
Filename: "{app}\Sonarr.Console.exe"; Parameters: "/u"; Flags: runhidden waituntilterminated skipifdoesntexist
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ResultCode: Integer;
begin
2020-10-09 16:36:34 +02:00
Exec('net', 'stop nzbdrone', '', 0, ewWaitUntilTerminated, ResultCode)
Exec('sc', 'delete nzbdrone', '', 0, ewWaitUntilTerminated, ResultCode)
2017-09-18 05:25:28 +02:00
end;