The Free Software Media System - Server Backend & API
Begin to add setup type dialog
Anthony Lavado04c4ad731e36
diff --git a/deployment/windows/dialogs/setuptype.nsddef b/deployment/windows/dialogs/setuptype.nsddefnew file mode 100644index 0000000000..ff59f62152--- /dev/null+++ b/deployment/windows/dialogs/setuptype.nsddef@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="UTF-8"?>+<!--+This file was created by NSISDialogDesigner 1.4.4.0+http://coolsoft.altervista.org/nsisdialogdesigner+Do not edit manually!+-->+<Dialog Name="setuptype" Title="This controls how Jellyfin is installed." Subtitle="Setup Type">+ <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" />+ <RadioButton Name="BasicInstall" Location="12, 12" Size="426, 24" Text="Basic Install (Recommended)" Font="Microsoft Sans Serif, 8.25pt, style=Bold" Checked="True" TabIndex="3" />+</Dialog>\ No newline at end of filediff --git a/deployment/windows/dialogs/setuptype.nsdinc b/deployment/windows/dialogs/setuptype.nsdincnew file mode 100644index 0000000000..0b171da282--- /dev/null+++ b/deployment/windows/dialogs/setuptype.nsdinc@@ -0,0 +1,56 @@+; =========================================================+; This file was generated by NSISDialogDesigner 1.4.4.0+; http://coolsoft.altervista.org/nsisdialogdesigner+;+; Do not edit it manually, use NSISDialogDesigner instead!+; =========================================================++; handle variables+Var hCtl_setuptype+Var hCtl_setuptype_InstallasaServiceLabel+Var hCtl_setuptype_InstallasaService+Var hCtl_setuptype_BasicInstallLabel+Var hCtl_setuptype_BasicInstall+Var hCtl_setuptype_Font1+++; dialog create function+Function fnc_setuptype_Create++ ; custom font definitions+ 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 "This controls how Jellyfin is installed." "Setup Type"++ ; === 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)"+ Pop $hCtl_setuptype_InstallasaService+ ${NSD_AddStyle} $hCtl_setuptype_InstallasaService ${WS_GROUP}++ ; === BasicInstallLabel (type: Label) ===+ ${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."+ Pop $hCtl_setuptype_BasicInstallLabel++ ; === BasicInstall (type: RadioButton) ===+ ${NSD_CreateRadioButton} 8u 7u 280u 15u "Basic Install (Recommended)"+ Pop $hCtl_setuptype_BasicInstall+ SendMessage $hCtl_setuptype_BasicInstall ${WM_SETFONT} $hCtl_setuptype_Font1 0+ ${NSD_Check} $hCtl_setuptype_BasicInstall++FunctionEnd++; dialog show function+Function fnc_setuptype_Show+ Call fnc_setuptype_Create+ nsDialogs::Show+FunctionEnddiff --git a/deployment/windows/jellyfin.nsi b/deployment/windows/jellyfin.nsiindex 8b6c1e01e7..847666554e 100644--- a/deployment/windows/jellyfin.nsi+++ b/deployment/windows/jellyfin.nsi@@ -16,6 +16,7 @@ ShowUninstDetails show; Global variables that we'll useVar _JELLYFINVERSION_Var _JELLYFINDATADIR_+ Var _SETUPTYPE_Var _INSTALLSERVICE_Var _SERVICESTART_Var _SERVICEACCOUNTTYPE_@@ -86,6 +87,9 @@ ShowUninstDetails show!insertmacro MUI_PAGE_WELCOME; License Page!insertmacro MUI_PAGE_LICENSE "$%InstallLocation%\LICENSE" ; picking up generic GPL++; Setup Type Page+ Page custom ShowSetupTypePage SetupTypePage_Config; Components Page!insertmacro MUI_PAGE_COMPONENTS!define MUI_PAGE_CUSTOMFUNCTION_PRE HideInstallDirectoryPage ; Controls when to hide / show@@ -102,6 +106,7 @@ ShowUninstDetails show!insertmacro MUI_PAGE_DIRECTORY; Custom Dialogs+ !include "dialogs\setuptype.nsdinc"!include "dialogs\service-config.nsdinc"!include "dialogs\confirmation.nsdinc"@@ -170,7 +175,7 @@ Section "!Jellyfin Server (required)" InstallJellyfinServerWriteRegExpandStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayIcon" '"$INSTDIR\Uninstall.exe",0'WriteRegStr HKLM "${REG_UNINST_KEY}" "Publisher" "The Jellyfin Project"- WriteRegStr HKLM "${REG_UNINST_KEY}" "URLInfoAbout" "https://jellyfin.media/"+ WriteRegStr HKLM "${REG_UNINST_KEY}" "URLInfoAbout" "https://jellyfin.org/"WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayVersion" "$_JELLYFINVERSION_"WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoModify" 1WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoRepair" 1@@ -413,6 +418,19 @@ Function HideConfirmationPage${EndIf}FunctionEnd+Function HideSetupTypePage+ ${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for InstallFolder+ Abort+ ${EndIf}+FunctionEnd++; Setup Type dialog show function+Function ShowSetupTypePage+ Call HideSetupTypePage+ Call fnc_setuptype_Create+ nsDialogs::Show+FunctionEnd+; Service Config dialog show functionFunction ShowServiceConfigPageCall HideServiceConfigPage