NSIS improvements (#1692)

* 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.
This commit is contained in:
Erwin de Haan
2019-09-09 23:40:51 +02:00
committed by Anthony Lavado
parent e6a1407786
commit 2f2010ce59
13 changed files with 646 additions and 291 deletions

View File

@@ -0,0 +1,24 @@
<?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="confirmation" Title="Confirmation Page" Subtitle="Please confirm your choices for Jellyfin Server installation" GenerateShowFunction="False">
<HeaderCustomScript>!include "helpers\StrSlash.nsh"</HeaderCustomScript>
<CreateFunctionCustomScript>${StrSlash} '$0' $INSTDIR
${StrSlash} '$1' $_JELLYFINDATADIR_
${NSD_SetText} $hCtl_confirmation_ConfirmRichText "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043\viewkind4\uc1 \
\pard\widctlpar\sa160\sl252\slmult1\b The installer will proceed based on the following inputs gathered on earlier screens.\par \
Installation Folder:\b0 $0\line\b \
Service install:\b0 $_INSTALLSERVICE_\line\b \
Service start:\b0 $_SERVICESTART_\line\b \
Service account:\b0 $_SERVICEACCOUNTTYPE_\line\b \
Jellyfin Data Folder:\b0 $1\par \
\
\pard\sa200\sl276\slmult1\f1\lang1043\par \
}"</CreateFunctionCustomScript>
<RichText Name="ConfirmRichText" Location="12, 12" Size="426, 204" TabIndex="0" ExStyle="WS_EX_STATICEDGE" />
</Dialog>

View File

@@ -0,0 +1,61 @@
; =========================================================
; This file was generated by NSISDialogDesigner 1.4.4.0
; http://coolsoft.altervista.org/nsisdialogdesigner
;
; Do not edit it manually, use NSISDialogDesigner instead!
; Modified by EraYaN (2019-09-01)
; =========================================================
; handle variables
Var hCtl_confirmation
Var hCtl_confirmation_ConfirmRichText
; HeaderCustomScript
!include "helpers\StrSlash.nsh"
; dialog create function
Function fnc_confirmation_Create
; === confirmation (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_confirmation
${If} $hCtl_confirmation == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Confirmation Page" "Please confirm your choices for Jellyfin Server installation"
; === ConfirmRichText (type: RichText) ===
nsDialogs::CreateControl /NOUNLOAD "RichEdit20A" ${ES_READONLY}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN} ${WS_EX_STATICEDGE} 8u 7u 280u 126u ""
Pop $hCtl_confirmation_ConfirmRichText
${NSD_AddExStyle} $hCtl_confirmation_ConfirmRichText ${WS_EX_STATICEDGE}
; CreateFunctionCustomScript
${StrSlash} '$0' $INSTDIR
${StrSlash} '$1' $_JELLYFINDATADIR_
${If} $_INSTALLSERVICE_ == "Yes"
${NSD_SetText} $hCtl_confirmation_ConfirmRichText "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043\viewkind4\uc1 \
\pard\widctlpar\sa160\sl252\slmult1\b The installer will proceed based on the following inputs gathered on earlier screens.\par \
Installation Folder:\b0 $0\line\b \
Service install:\b0 $_INSTALLSERVICE_\line\b \
Service start:\b0 $_SERVICESTART_\line\b \
Service account:\b0 $_SERVICEACCOUNTTYPE_\line\b \
Jellyfin Data Folder:\b0 $1\par \
\
\pard\sa200\sl276\slmult1\f1\lang1043\par \
}"
${Else}
${NSD_SetText} $hCtl_confirmation_ConfirmRichText "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043\viewkind4\uc1 \
\pard\widctlpar\sa160\sl252\slmult1\b The installer will proceed based on the following inputs gathered on earlier screens.\par \
Installation Folder:\b0 $0\line\b \
Service install:\b0 $_INSTALLSERVICE_\line\b \
Jellyfin Data Folder:\b0 $1\par \
\
\pard\sa200\sl276\slmult1\f1\lang1043\par \
}"
${EndIf}
FunctionEnd

View File

@@ -0,0 +1,13 @@
<?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="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" />
</Dialog>

View File

@@ -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_service_config
Var hCtl_service_config_StartServiceAfterInstall
Var hCtl_service_config_LocalSystemAccountLabel
Var hCtl_service_config_NetworkServiceAccountLabel
Var hCtl_service_config_UseLocalSystemAccount
Var hCtl_service_config_UseNetworkServiceAccount
Var hCtl_service_config_Font1
; dialog create function
Function fnc_service_config_Create
; custom font definitions
CreateFont $hCtl_service_config_Font1 "Microsoft Sans Serif" "8.25" "700"
; === service_config (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_service_config
${If} $hCtl_service_config == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Configure the service" "This controls what type of access the server gets to this system."
; === StartServiceAfterInstall (type: Checkbox) ===
${NSD_CreateCheckbox} 8u 118u 280u 15u "Start Service after Install"
Pop $hCtl_service_config_StartServiceAfterInstall
${NSD_Check} $hCtl_service_config_StartServiceAfterInstall
; === LocalSystemAccountLabel (type: Label) ===
${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."
Pop $hCtl_service_config_LocalSystemAccountLabel
; === NetworkServiceAccountLabel (type: Label) ===
${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
; === UseLocalSystemAccount (type: RadioButton) ===
${NSD_CreateRadioButton} 8u 54u 280u 15u "Use Local System account"
Pop $hCtl_service_config_UseLocalSystemAccount
${NSD_AddStyle} $hCtl_service_config_UseLocalSystemAccount ${WS_GROUP}
; === UseNetworkServiceAccount (type: RadioButton) ===
${NSD_CreateRadioButton} 8u 7u 280u 15u "Use Network Service account (Recommended)"
Pop $hCtl_service_config_UseNetworkServiceAccount
SendMessage $hCtl_service_config_UseNetworkServiceAccount ${WM_SETFONT} $hCtl_service_config_Font1 0
${NSD_Check} $hCtl_service_config_UseNetworkServiceAccount
FunctionEnd