From a6819ffd1d7ed36f88316d7bfe82cf2e1979bd68 Mon Sep 17 00:00:00 2001 From: crankdoofus <52436708+crankdoofus@users.noreply.github.com> Date: Sat, 6 Jul 2019 12:19:57 +1000 Subject: [PATCH] Cleaned up code --- deployment/windows/jellyfin.nsi | 118 ++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 53 deletions(-) diff --git a/deployment/windows/jellyfin.nsi b/deployment/windows/jellyfin.nsi index b4a927610a..6187cf9fdd 100644 --- a/deployment/windows/jellyfin.nsi +++ b/deployment/windows/jellyfin.nsi @@ -1,25 +1,30 @@ +; Shows a lot of debug information while compiling +; This can be removed once stable. !verbose 4 ;-------------------------------- ;Include Modern UI !include "MUI2.nsh" - Var JellyfinVersion - Var defaultEmbyDataDir - Var JELLYFINDATADIR - Var ServiceInstalled + Var _JELLYFINVERSION_ + Var _DEFAULTEMBYDATADIR_ + Var _JELLYFINDATADIR_ + Var _SERVICEINSTALLED_ ;-------------------------------- ;General - ;Name and file - !getdllversion "$%InstallLocation%\jellyfin.dll" expv_ - !echo "jellyfin.dll version is ${expv_1}.${expv_2}.${expv_3}.${expv_4}" - Name "Jellyfin ${expv_1}.${expv_2}.${expv_3}.${expv_4}" - OutFile "Jellyfin.Installer.${expv_1}.${expv_2}.${expv_3}.${expv_4}.exe" - BrandingText "Jellyfin ${expv_1}.${expv_2}.${expv_3}.${expv_4} Installer" - VIProductVersion "${expv_1}.${expv_2}.${expv_3}.${expv_4}" - VIFileVersion "${expv_1}.${expv_2}.${expv_3}.${expv_4}" +; Align installer version with jellyfin.dll version + !getdllversion "$%InstallLocation%\jellyfin.dll" ver_ + !echo "jellyfin.dll version is ${ver_1}.${ver_2}.${ver_3}.${ver_4}" ;!echo will print it while building + + Name "Jellyfin ${ver_1}.${ver_2}.${ver_3}.${ver_4}" + OutFile "Jellyfin.Installer.${ver_1}.${ver_2}.${ver_3}.${ver_4}.exe" + BrandingText "Jellyfin ${ver_1}.${ver_2}.${ver_3}.${ver_4} Installer" + +; installer attributes + VIProductVersion "${ver_1}.${ver_2}.${ver_3}.${ver_4}" + VIFileVersion "${ver_1}.${ver_2}.${ver_3}.${ver_4}" VIAddVersionKey "ProductName" "Jellyfin" - VIAddVersionKey "FileVersion" "${expv_1}.${expv_2}.${expv_3}.${expv_4}" + VIAddVersionKey "FileVersion" "${ver_1}.${ver_2}.${ver_3}.${ver_4}" ;Default installation folder InstallDir "$APPDATA\Jellyfin" @@ -35,19 +40,21 @@ ;-------------------------------- ;Pages -; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt" +;TODO +;find a license to displayed before installer is started +; !insertmacro MUI_PAGE_LICENSE "