* Much better, but still broken
It crashes with two custom pages after one another. (So when the service should be installed).
* Fixed the problems and finished the NSIS installer.
Also ignored some of the artifacts.
* Added changes to CI for setup building.
Consolidate building and fixed git error.
Small CI fixes.
Move UX repo to SourcesDirectory
Fix stupid checkout <> clone error.
Fix typo in PowerShell command.
Artifact publish tasks can not have wildcards.
pull/1731/head
Erwin de Haan6 years agocommitted byAnthony Lavado
This file was created by NSISDialogDesigner 1.4.4.0
http://coolsoft.altervista.org/nsisdialogdesigner
Do not edit manually!
-->
<Dialog Name="confirmation" Title="Confirmation Page" Subtitle="Please confirm your choices for Jellyfin Server installation" GenerateShowFunction="False">
This file was created by NSISDialogDesigner 1.4.4.0
http://coolsoft.altervista.org/nsisdialogdesigner
Do not edit manually!
-->
<Dialog Name="service_config" Title="CoOnfigure the service" Subtitle="This controls what type of access the server gets to this system." GenerateShowFunction="False">
<CheckBox Name="StartServiceAfterInstall" Location="12, 192" Size="426, 24" Text="Start Service after Install" Checked="True" TabIndex="0" />
<Label Name="LocalSystemAccountLabel" Location="12, 115" Size="426, 46" Text="The Local System account has full access to every resource and file on the system. This can have very real security implications, do not use unless absolutely neseccary." TabIndex="1" />
<Label Name="NetworkServiceAccountLabel" Location="12, 39" Size="426, 46" Text="The NetworkService account is a predefined local account used by the service control manager. It is the recommended way to install the Jellyfin Server service." TabIndex="2" />
<RadioButton Name="UseLocalSystemAccount" Location="12, 88" Size="426, 24" Text="Use Local System account" TabIndex="3" />
<RadioButton Name="UseNetworkServiceAccount" Location="12, 12" Size="426, 24" Text="Use Network Service account (Recommended)" Font="Microsoft Sans Serif, 8.25pt, style=Bold" Checked="True" TabIndex="4" />
${NSD_CreateLabel} 8u 71u 280u 28u "The Local System account has full access to every resource and file on the system. This can have very real security implications, do not use unless absolutely neseccary."
${NSD_CreateLabel} 8u 24u 280u 28u "The NetworkService account is a predefined local account used by the service control manager. It is the recommended way to install the Jellyfin Server service."
Pop $hCtl_service_config_NetworkServiceAccountLabel
!define MUI_WELCOMEPAGE_TEXT "The installer will ask for details to install Jellyfin Server.$\r$\n$\r$\n$\r$\n\
!define MUI_WELCOMEPAGE_TEXT "The installer will ask for details to install Jellyfin Server."
ADVANCED:$\r$\n\
!insertmacro MUI_PAGE_WELCOME
The default service install uses Network Service account and is sufficient for most users. $\r$\n$\r$\n\
You can choose to install using Local System account under Advanced options. This also affects where Jellyfin Server and Jellyfin data can be installed. The installer will NOT check this, you should know what you are doing.$\r$\n$\r$\n\
You can choose the folder for Jellyfin Metadata under advanced options based on your needs."
!insertmacro MUI_PAGE_WELCOME
; License Page
; License Page
!insertmacro MUI_PAGE_LICENSE "$%InstallLocation%\LICENSE" ; picking up generic GPL
!insertmacro MUI_PAGE_LICENSE "$%InstallLocation%\LICENSE" ; picking up generic GPL
; Components Page
; Components Page
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideInstallDirectoryPage ; Controls when to hide / show
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideInstallDirectoryPage ; Controls when to hide / show
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Install folder" ; shows just above the folder selection dialog
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Install folder" ; shows just above the folder selection dialog
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_DIRECTORY
; Metadata folder Page
; Data folder Page
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideDataDirectoryPage ; Controls when to hide / show
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideDataDirectoryPage ; Controls when to hide / show
!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install the Jellyfin Server metadata."
!define MUI_PAGE_HEADER_TEXT "Choose Data Location"
!define MUI_DIRECTORYPAGE_TEXT_TOP "The installer will set the following folder for Jellyfin Server metadata. To install in a differenct folder, click Browse and select another folder. Please make sure the folder exists. Click Next to continue."
!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install the Jellyfin Server data."
!define MUI_DIRECTORYPAGE_TEXT_TOP "The installer will set the following folder for Jellyfin Server data. To install in a different folder, click Browse and select another folder. Please make sure the folder exists and is accessible. Click Next to continue."
DetailPrint "Jellyfin data folder : $_JELLYFINDATADIR_"
DetailPrint "Jellyfin Data folder: $_JELLYFINDATADIR_"
MessageBox MB_YESNO|MB_ICONINFORMATION "Do you want to retain Jellyfin metadata folder? The media will not be touched. $\r$\nIf unsure choose YES." /SD IDYES IDYES PreserveData
MessageBox MB_YESNO|MB_ICONINFORMATION "Do you want to retain the Jellyfin Server data folder? The media will not be touched. $\r$\nIf unsure choose YES." /SD IDYES IDYES PreserveData
DetailPrint "Jellyfin Server service statuscode, $0"
IntCmp $0 0 NoService ; service doesn't exist, may be run from desktop shortcut
IntCmp $0 0 NoService ; service doesn't exist, may be run from desktop shortcut
; if service was detected, set defaults going forward.
; if service was detected, set defaults going forward.
StrCpy $_EXISTINGSERVICE_ "YES"
StrCpy $_EXISTINGSERVICE_ "Yes"
StrCpy $_INSTALLSERVICE_ "YES"
StrCpy $_INSTALLSERVICE_ "Yes"
StrCpy $_SERVICESTART_ "YES"
StrCpy $_SERVICESTART_ "Yes"
; check if service was run using Network Service account
; check if service was run using Network Service account
ClearErrors
ClearErrors
ReadRegStr "$_LOCALSYSTEMACCOUNT_" HKLM "Software\Jellyfin" "LocalSystemAccount" ; in case of error _LOCALSYSTEMACCOUNT_ will be NO as default
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; in case of error _SERVICEACCOUNTTYPE_ will be NetworkService as default
ClearErrors
ClearErrors
ReadRegStr $_JELLYFINDATADIR_ HKLM "Software\Jellyfin" "DataFolder" ; in case of error, the default holds
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
; Hide sections which will not be needed in case of previous install
SectionSetText ${InstallService} ""
; SectionSetText ${InstallService} ""
SectionSetText ${StartService} ""
SectionSetText ${LocalSystemAccount} ""
NoService: ; existing install was present but no service was detected
SectionSetText ${CustomDataFolder} ""
SectionSetText ${Advanced} ""
NoService: ; existing install was present but no service was detected
; Let the user know that we'll upgrade and provide an option to quit.
; Let the user know that we'll upgrade and provide an option to quit.
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Existing installation of Jellyfin was detected, it'll be upgraded, settings will be retained. \
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Existing installation of Jellyfin Server was detected, it'll be upgraded, settings will be retained. \
$\r$\nClick OK to proceed, Cancel to exit installer." /SD IDOK IDOK ProceedWithUpgrade
$\r$\nClick OK to proceed, Cancel to exit installer." /SD IDOK IDOK ProceedWithUpgrade
Quit ; Quit if the user is not sure about upgrade
Quit ; Quit if the user is not sure about upgrade
ProceedWithUpgrade:
ProceedWithUpgrade:
NoExisitingInstall:
NoExisitingInstall:
; by this time, the variables have been correctly set to reflect previous install details
; by this time, the variables have been correctly set to reflect previous install details
FunctionEnd
FunctionEnd
Function HideInstallDirectoryPage
Function HideInstallDirectoryPage
${If} $_EXISTINGINSTALLATION_ == "YES" ; Existing installation detected, so don't ask for InstallFolder
${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for InstallFolder
Abort
Abort
${EndIf}
${EndIf}
FunctionEnd
FunctionEnd
; Don't show custom folder option in case it wasn't chosen
Function HideDataDirectoryPage
Function HideDataDirectoryPage
${If} $_CUSTOMDATAFOLDER_ == "NO"
${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for InstallFolder
Abort
Abort
${EndIf}
${EndIf}
FunctionEnd
FunctionEnd
; This function handles the choices during component selection
Function HideServiceConfigPage
Function .onSelChange
${If} $_INSTALLSERVICE_ == "No" ; Not running as a service, don't ask for service type
SectionGetFlags ${CustomDataFolder} $0
${OrIf} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for InstallFolder
${If} $0 = ${SF_SELECTED}
Abort
StrCpy $_CUSTOMDATAFOLDER_ "YES"
${EndIf}
${Else}
FunctionEnd
StrCpy $_CUSTOMDATAFOLDER_ "NO"
${EndIf}
Function HideConfirmationPage
${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for InstallFolder
; If we are not installing service, we don't need to set the NetworkService account or StartService
Abort
SectionGetFlags ${InstallService} $0
${EndIf}
${If} $0 = ${SF_SELECTED}
FunctionEnd
StrCpy $_INSTALLSERVICE_ "YES"
SectionGetFlags ${LocalSystemAccount} $0
; Service Config dialog show function
IntOp $0 $0 | ${SF_RO}
Function ShowServiceConfigPage
IntOp $0 $0 ^ ${SF_RO}
Call HideServiceConfigPage
SectionSetFlags ${LocalSystemAccount} $0
Call fnc_service_config_Create
SectionGetFlags ${StartService} $0
nsDialogs::Show
IntOp $0 $0 | ${SF_RO}
FunctionEnd
IntOp $0 $0 ^ ${SF_RO}
SectionSetFlags ${StartService} $0
; Confirmation dialog show function
${Else}
Function ShowConfirmationPage
StrCpy $_INSTALLSERVICE_ "NO"
Call HideConfirmationPage
IntOp $0 ${SF_USELECTED} | ${SF_RO}
Call fnc_confirmation_Create
SectionSetFlags ${LocalSystemAccount} $0
nsDialogs::Show
SectionSetFlags ${StartService} $0
${EndIf}
SectionGetFlags ${StartService} $0
${If} $0 = ${SF_SELECTED}
StrCpy $_SERVICESTART_ "YES"
${Else}
StrCpy $_SERVICESTART_ "NO"
${EndIf}
SectionGetFlags ${LocalSystemAccount} $0
${If} $0 = ${SF_SELECTED}
StrCpy $_LOCALSYSTEMACCOUNT_ "YES"
${Else}
StrCpy $_LOCALSYSTEMACCOUNT_ "NO"
${EndIf}
FunctionEnd
FunctionEnd
Function ConfirmationPage
; Declare temp variables to read the options from the custom page.
!insertmacro MUI_HEADER_TEXT "Confirmation Page" "Please confirm your choices for Jellyfin Server installation"