This file was created by NSISDialogDesigner 1.4.4.0
http://coolsoft.altervista.org/nsisdialogdesigner
Do not edit manually!
-->
<Dialog Name="setuptype" Title="Setup Type" Subtitle="Control how Jellyfin is installed.">
<Label Name="InstallasaServiceLabel" Location="12, 115" Size="426, 46" Text="Install Jellyfin as a service. This method is recommended for Advanced Users. Additional setup is required to access network shares." TabIndex="0" />
<RadioButton Name="InstallasaService" Location="12, 88" Size="426, 24" Text="Install as a Service (Advanced Users)" TabIndex="1" />
<Label Name="BasicInstallLabel" Location="12, 39" Size="426, 46" Text="The basic install will run Jellyfin in your current user account.$\nThis is recommended for new users and those with existing Jellyfin installs older than 10.4." TabIndex="2" />
CreateFont $hCtl_setuptype_Font1 "Microsoft Sans Serif" "8.25" "700"
; === setuptype (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_setuptype
${If} $hCtl_setuptype == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Setup Type" "Control how Jellyfin is installed."
; === InstallasaServiceLabel (type: Label) ===
${NSD_CreateLabel} 8u 71u 280u 28u "Install Jellyfin as a service. This method is recommended for Advanced Users. Additional setup is required to access network shares."
Pop $hCtl_setuptype_InstallasaServiceLabel
; === InstallasaService (type: RadioButton) ===
${NSD_CreateRadioButton} 8u 54u 280u 15u "Install as a Service (Advanced Users)"
${NSD_CreateLabel} 8u 24u 280u 28u "The basic install will run Jellyfin in your current user account.$\nThis is recommended for new users and those with existing Jellyfin installs older than 10.4."
StrCpy $_EXISTINGINSTALLATION_ "Yes" ; Set our flag to be used later
SectionSetText ${InstallJellyfinServer} "Upgrade Jellyfin Server (required)" ; Change install text to "Upgrade"
; check if service was run using Network Service account
ClearErrors
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; in case of error _SERVICEACCOUNTTYPE_ will be NetworkService as default
ClearErrors
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; in case of error, the default holds
; Hide sections which will not be needed in case of previous install
; SectionSetText ${InstallService} ""
; check if there is a service called Jellyfin, there should be
; hack : nssm statuscode Jellyfin will return non zero return code in case it exists
; check if service was run using Network Service account
ClearErrors
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; in case of error _SERVICEACCOUNTTYPE_ will be NetworkService as default
ClearErrors
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; in case of error, the default holds
; Hide sections which will not be needed in case of previous install
; SectionSetText ${InstallService} ""
NoService: ; existing install was present but no service was detected
${If} $_SERVICEACCOUNTTYPE_ == "None"
StrCpy $_SETUPTYPE_ "Basic"
StrCpy $_INSTALLSERVICE_ "No"
StrCpy $_SERVICESTART_ "No"
StrCpy $_MAKESHORTCUTS_ "Yes"
${EndIf}
; Let the user know that we'll upgrade and provide an option to quit.
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Existing installation of Jellyfin Server was detected, it'll be upgraded, settings will be retained. \
@ -383,8 +429,7 @@ Function .onInit
ProceedWithUpgrade:
NoExisitingInstall:
; by this time, the variables have been correctly set to reflect previous install details
NoExisitingInstall: ; by this time, the variables have been correctly set to reflect previous install details
FunctionEnd
@ -413,6 +458,25 @@ Function HideConfirmationPage
${EndIf}
FunctionEnd
Function HideSetupTypePage
${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for SetupType