diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 0ad5feb..197bbc3 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -20,7 +20,7 @@ jobs: vc_redist_arch: x64 vcvars: vcvars64.bat machine: X64 - # ARM64 disabled - requires WiX 4+ for installer support + # ARM64 disabled - requires qt webengine builds # - artifact: windows-arm64 # qt_arch: win64_msvc2022_arm64 # mpv_arch: aarch64 @@ -38,11 +38,13 @@ jobs: version: "${{ env.QT_VERSION }}" arch: "${{ matrix.qt_arch }}" modules: "qtwebengine qtwebchannel qtpositioning" + - name: Install Inno Setup + run: | + choco install innosetup -y + shell: powershell - name: Install dependencies run: | mkdir build - curl -L https://aka.ms/vs/17/release/vc_redist.${{ matrix.vc_redist_arch }}.exe > vc_redist.${{ matrix.vc_redist_arch }}.exe - sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.${{ matrix.vc_redist_arch }}.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-${{ matrix.mpv_arch }}-${{ env.MPV_VERSION }}.7z/download > mpv.7z 7z x mpv.7z mkdir mpv @@ -57,12 +59,10 @@ jobs: run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ matrix.vcvars }}" cd build - set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD% + set PATH=%PATH%;C:\Program Files (x86)\Inno Setup 6;%CD% cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DQTROOT=%QT_ROOT_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON .. lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:${{ matrix.machine }} ninja - mkdir output 2>nul - copy ..\vc_redist.${{ matrix.vc_redist_arch }}.exe output\ ninja windows_package shell: cmd - name: Archive production artifacts diff --git a/CMakeModules/WindowsInstaller.cmake b/CMakeModules/WindowsInstaller.cmake index 05defea..abe5086 100644 --- a/CMakeModules/WindowsInstaller.cmake +++ b/CMakeModules/WindowsInstaller.cmake @@ -1,160 +1,62 @@ -find_program(WIX_HEAT heat) -find_program(WIX_CANDLE candle) -find_program(WIX_LIGHT light) -find_program(WIX_INSIGNIA insignia) - -get_filename_component(WIX_BIN_DIR ${WIX_CANDLE} DIRECTORY) - -configure_file(${PROJECT_SOURCE_DIR}/bundle/win/Version.wxi.in Version.wxi) - -set(WIX_VARIABLES -dDeploymentPath="${CMAKE_INSTALL_PREFIX}" -dOutputPath="${CMAKE_INSTALL_PREFIX}" -dBuildPath="${CMAKE_BINARY_DIR}") - -include(CMakeParseArguments) - -function(wix_harvest_directory dir fragment) - set(ARGS REFVARIABLE CGROUP DEPENDS) - cmake_parse_arguments(_WHD "" "${ARGS}" "" ${ARGN}) - - if(NOT _WHD_REFVARIABLE) - set(_WHD_REFVARIABLE INSTALLLOCATION) - endif() - - if(_WHD_CGROUP) - set(CGROUP -cg ${_WHD_CGROUP}) - endif() - - add_custom_command(OUTPUT ${fragment} - DEPENDS ${_WHD_DEPENDS} - COMMAND ${WIX_HEAT} dir "${dir}" -srd -nologo -sw5150 ${CGROUP} -dr ${_WHD_REFVARIABLE} -ag -out ${fragment} -var var.DeploymentPath - COMMENT "Harvesting dir ${dir} to ${fragment}") - add_custom_target(heat_${fragment} DEPENDS ${fragment}) - -endfunction() - -function(wix_get_extension VARIABLE) - foreach(f ${ARGN}) - find_file(${f}_PATH ${f}.dll PATHS ${WIX_BIN_DIR}) - set(EXTS ${EXTS} -ext ${${f}_PATH}) - endforeach() - - set(${VARIABLE} ${EXTS} PARENT_SCOPE) -endfunction() - -function(wix_candle wsxfile) - set(ARGS OUTPUT ARCH) - set(MARGS EXTENSIONS) - cmake_parse_arguments(_WC "" "${ARGS}" "${MARGS}" ${ARGN}) - - if(NOT _WC_OUTPUT) - get_filename_component(WC_BASENAME ${wsxfile} NAME_WE) - set(_WC_OUTPUT ${WC_BASENAME}.wixobj) - endif() - - if(NOT _WC_ARCH) - set(_WC_ARCH x64) - endif() - - if(_WC_EXTENSIONS) - wix_get_extension(WIX_EXTENSIONS ${_WC_EXTENSIONS}) - endif() - - add_custom_command(OUTPUT ${_WC_OUTPUT} - DEPENDS ${wsxfile} - COMMAND ${WIX_CANDLE} -nologo ${WIX_VARIABLES} -I${CMAKE_CURRENT_BINARY_DIR} -arch ${_WC_ARCH} ${wsxfile} ${WIX_EXTENSIONS} -out ${_WC_OUTPUT} - COMMENT "Candle file ${_WC_OUTPUT}" - ) -endfunction() - -function(wix_light) - set(MARGS OBJS DEPENDS EXTENSIONS) - set(ARGS OUTPUT BASEDIR TARGET) - cmake_parse_arguments(_WL "" "${ARGS}" "${MARGS}" ${ARGN}) - - if(NOT _WL_OUTPUT) - message(FATAL_ERROR "Need OUTPUT") - endif() - - if(_WL_EXTENSIONS) - wix_get_extension(WIX_EXTENSIONS ${_WL_EXTENSIONS}) - endif() - - if(_WL_BASEDIR) - set(_WL_BASEDIR -b ${_WL_BASEDIR}) - endif() - - if(NOT _WL_TARGET) - set(_WL_TARGET wix_${_WL_OUTPUT}) - endif() - - - add_custom_command(OUTPUT ${_WL_OUTPUT} - DEPENDS ${_WL_OBJS} ${_WL_DEPENDS} - COMMAND ${WIX_LIGHT} -nologo ${_WL_BASEDIR} ${_WL_OBJS} ${WIX_VARIABLES} ${WIX_EXTENSIONS} -out ${_WL_OUTPUT} - COMMENT "Light it up: ${_WL_OUTPUT}") - - - add_custom_target(${_WL_TARGET} DEPENDS ${_WL_OUTPUT}) - - if(CODE_SIGN) - if(_WL_OUTPUT MATCHES ".*exe") - add_custom_command(TARGET ${_WL_TARGET} POST_BUILD - COMMAND ${WIX_INSIGNIA} -ib ${_WL_OUTPUT} -o engine.exe - COMMAND ${CMAKE_SOURCE_DIR}/bundle/win/WindowsSign.cmd engine.exe - COMMAND ${WIX_INSIGNIA} -ab engine.exe ${_WL_OUTPUT} -o ${_WL_OUTPUT} - COMMENT "Doing insignia dance" - ) - endif() - add_custom_command(TARGET ${_WL_TARGET} POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/bundle/win/WindowsSign.cmd ${_WL_OUTPUT} - COMMENT Signing ${_WL_OUTPUT} - ) - endif() -endfunction() - -function(wix_create_installer output) - set(MARGS WXS_FILES EXTENSIONS DEPENDS) - set(ARGS ARCH BASEDIR TARGET) - cmake_parse_arguments(_WCI "" "${ARGS}" "${MARGS}" ${ARGN}) - - foreach(wxs ${_WCI_WXS_FILES}) - get_filename_component(WXSBASE ${wxs} NAME_WE) - wix_candle(${wxs} OUTPUT ${WXSBASE}.wixobj EXTENSIONS ${_WCI_EXTENSIONS} ARCH ${_WCI_ARCH}) - list(APPEND WIXOBJS ${WXSBASE}.wixobj) - endforeach() - - wix_light(OBJS ${WIXOBJS} - EXTENSIONS ${_WCI_EXTENSIONS} - OUTPUT ${output} - DEPENDS ${_WCI_DEPENDS} - BASEDIR ${_WCI_BASEDIR} - TARGET ${_WCI_TARGET}) -endfunction() - -add_custom_target(wix_install - COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake - COMMENT "Copying files..." - DEPENDS JellyfinDesktop) - -wix_harvest_directory("${CMAKE_INSTALL_PREFIX}" files.wxs CGROUP ProgramFilesComponentGroup DEPENDS wix_install) - -wix_create_installer(PMP.msi - WXS_FILES files.wxs "${PROJECT_SOURCE_DIR}/bundle/win/JMP.wxs" - EXTENSIONS WixUtilExtension WixFirewallExtension - BASEDIR "${PROJECT_SOURCE_DIR}/bundle/win" +# Find Inno Setup Compiler +find_program(ISCC iscc + PATHS + "$ENV{ProgramFiles\(x86\)}/Inno Setup 6" + "$ENV{ProgramFiles}/Inno Setup 6" + "C:/Program Files (x86)/Inno Setup 6" + "C:/Program Files/Inno Setup 6" + DOC "Inno Setup Compiler" ) -if (CMAKE_SIZEOF_VOID_P MATCHES 8) +if(NOT ISCC) + message(WARNING "Inno Setup Compiler (iscc) not found. Windows installer will not be built.") + return() +endif() + +message(STATUS "Found Inno Setup: ${ISCC}") + +# Configure the Inno Setup script with version and paths +configure_file( + ${PROJECT_SOURCE_DIR}/bundle/win/JellyfinDesktop.iss.in + ${CMAKE_CURRENT_BINARY_DIR}/JellyfinDesktop.iss + @ONLY +) + +# Create install target that copies files to CMAKE_INSTALL_PREFIX +add_custom_target(innosetup_install + COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake + COMMENT "Copying files for installer..." + DEPENDS JellyfinDesktop +) + +# Determine architecture string for output filename +if(CMAKE_SIZEOF_VOID_P MATCHES 8) set(INSTALLER_ARCH_STR windows-x64) else() set(INSTALLER_ARCH_STR windows-x86) endif() -wix_create_installer(JellyfinDesktop-${VERSION_STRING}-${INSTALLER_ARCH_STR}.exe - TARGET JellyfinDesktopInstaller - WXS_FILES "${PROJECT_SOURCE_DIR}/bundle/win/Bundle.wxs" - EXTENSIONS WixUtilExtension WixBalExtension - DEPENDS wix_PMP.msi - BASEDIR "${PROJECT_SOURCE_DIR}/bundle/win" +set(INSTALLER_BASE_NAME "JellyfinDesktop-${VERSION_STRING}-${INSTALLER_ARCH_STR}") +set(INSTALLER_OUTPUT_NAME "${INSTALLER_BASE_NAME}.exe") + +# Create the installer using Inno Setup +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${INSTALLER_OUTPUT_NAME} + DEPENDS innosetup_install ${CMAKE_CURRENT_BINARY_DIR}/JellyfinDesktop.iss + COMMAND ${ISCC} + /O${CMAKE_CURRENT_BINARY_DIR} + /F${INSTALLER_BASE_NAME} + ${CMAKE_CURRENT_BINARY_DIR}/JellyfinDesktop.iss + COMMENT "Building Inno Setup installer: ${INSTALLER_OUTPUT_NAME}" + VERBATIM ) +# Target to build the installer +add_custom_target(JellyfinDesktopInstaller + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${INSTALLER_OUTPUT_NAME} +) + +# Alias target for convenience add_custom_target(windows_package DEPENDS JellyfinDesktopInstaller) + +message(STATUS "Windows installer target configured: windows_package") diff --git a/bundle/win/Bundle.wxs b/bundle/win/Bundle.wxs deleted file mode 100644 index 8fa29ab..0000000 --- a/bundle/win/Bundle.wxs +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - = v6.1]]> - - - - - - - - - 112 AND KB2919355_amd64 <> 112))]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundle/win/ControlPanel.wxi b/bundle/win/ControlPanel.wxi deleted file mode 100644 index 5637bb7..0000000 --- a/bundle/win/ControlPanel.wxi +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/bundle/win/Global.wxi b/bundle/win/Global.wxi deleted file mode 100644 index 09686ce..0000000 --- a/bundle/win/Global.wxi +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/bundle/win/HyperlinkTheme.wxl b/bundle/win/HyperlinkTheme.wxl deleted file mode 100644 index 1c38768..0000000 --- a/bundle/win/HyperlinkTheme.wxl +++ /dev/null @@ -1,50 +0,0 @@ - - - [WixBundleName] Setup - [WixBundleName] - Welcome - Setup will install [WixBundleName] on your computer. Click Install to continue, Options to set the install directory or Close to exit. - Version [WixBundleTag] - Setup will repair or uninstall [WixBundleName] from your computer. - Are you sure you want to cancel? - Setup Help - - /install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default. - - /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed. - - /norestart - suppress any attempts to restart. By default UI will prompt before restart. - - /log log.txt - logs to a specific file. By default a log file is created in %TEMP%. - - &Close - [WixBundleName] <a href="#">license terms</a>. - I &agree to the license terms and conditions - &Options - &Install - &Close - Setup Options - Install location: - &Browse... - &OK - &Cancel - Setup Progress - Processing: - Initializing... - &Cancel - Modify Setup - &Repair - &Uninstall - &Close - Setup Successful - &Launch - You must restart your computer before you can use the software. - &Restart - &Close - Setup Failed - One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>. - You must restart your computer to complete the rollback of the software. - &Restart - &Close - Desktop Shortcut - \ No newline at end of file diff --git a/bundle/win/JMP.wxs b/bundle/win/JMP.wxs deleted file mode 100644 index 8b1a81b..0000000 --- a/bundle/win/JMP.wxs +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - = 601]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NEWERPRODUCTFOUND - - Installed AND NOT UPGRADINGPRODUCTCODE - PREVIOUSVERSIONINSTALLED - - - WINDOWSTYPE~="Server" - - - - - - - - - - - - - - - - - ADDDESKTOPSHORTCUT=1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundle/win/JellyfinDesktop.iss.in b/bundle/win/JellyfinDesktop.iss.in new file mode 100644 index 0000000..4e786b8 --- /dev/null +++ b/bundle/win/JellyfinDesktop.iss.in @@ -0,0 +1,193 @@ +; Jellyfin Desktop Installer Script for Inno Setup +; Based on WiX configuration from JMP.wxs and Bundle.wxs +; +; NOTE: Media Feature Pack downloads for Windows N editions are not included in this +; Inno Setup version as they require MSU package handling that was specific to WiX Bundle. +; Users on Windows N editions will need to install Media Feature Pack manually if needed. + +#define MyAppName "Jellyfin Desktop" +#define MyAppVersion "@VERSION_STRING@" +#define MyAppPublisher "jellyfin.org" +#define MyAppURL "https://jellyfin.org" +#define MyAppExeName "Jellyfin Desktop.exe" +#define MyAppGUID "{{a78bea4a-5bd0-4aa3-bdf3-579b4f58a921}" +#define DeployPath "@CMAKE_INSTALL_PREFIX@" +#define VCRedistURL "https://aka.ms/vs/17/release/vc_redist.x64.exe" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +AppId={#MyAppGUID} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +AppComments=Jellyfin desktop client +AppContact={#MyAppPublisher} +DefaultDirName={autopf}\Jellyfin Desktop +DisableProgramGroupPage=yes +; Require Windows 10 or newer +MinVersion=10.0 +ArchitecturesInstallIn64BitMode=x64compatible +ArchitecturesAllowed=x64compatible +PrivilegesRequired=admin +OutputDir=. +OutputBaseFilename=JellyfinDesktop-{#MyAppVersion}-windows-x64 +SetupIconFile=@PROJECT_SOURCE_DIR@/bundle/win/jellyfin.ico +UninstallDisplayIcon={app}\{#MyAppExeName} +Compression=lzma2/ultra64 +SolidCompression=yes +WizardStyle=modern +WizardImageFile=@PROJECT_SOURCE_DIR@/bundle/win/wizard-image.png +WizardSmallImageFile=@PROJECT_SOURCE_DIR@/bundle/win/wizard-small-image.png +DisableWelcomePage=no +LicenseFile= +DisableDirPage=no +DisableReadyPage=no +CloseApplications=yes +RestartApplications=no + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" + +[Files] +Source: "{#DeployPath}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{autoprograms}\Jellyfin Desktop"; Filename: "{app}\{#MyAppExeName}"; Comment: "Jellyfin desktop client"; WorkingDir: "{app}" +Name: "{autodesktop}\Jellyfin Desktop"; Filename: "{app}\{#MyAppExeName}"; Comment: "Jellyfin desktop client"; WorkingDir: "{app}"; Tasks: desktopicon + +[Run] +; Install VCRedist - will be downloaded if needed +Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/install /passive /norestart"; StatusMsg: "Installing Visual C++ Redistributable..."; Flags: waituntilterminated; Check: VCRedistNeedsInstall +; Launch app after install +Filename: "{app}\{#MyAppExeName}"; Description: "Launch Jellyfin Desktop"; Flags: nowait postinstall skipifsilent + +[Code] +const + PF_AVX2_INSTRUCTIONS_AVAILABLE = 40; + +var + VCRedistNeedsInstallFlag: Boolean; + +function IsProcessorFeaturePresent(ProcessorFeature: DWORD): BOOL; + external 'IsProcessorFeaturePresent@kernel32.dll stdcall'; + +function VCRedistNeedsInstall: Boolean; +begin + Result := VCRedistNeedsInstallFlag; +end; + +function CheckVCRedist(): Boolean; +var + UCRTBasePath: String; + MSVCPPath: String; +begin + UCRTBasePath := ExpandConstant('{sys}\ucrtbase.dll'); + MSVCPPath := ExpandConstant('{sys}\msvcp140.dll'); + + // Good if ucrtbase.dll exists + if FileExists(UCRTBasePath) then + begin + Result := True; + Log('VCRedist OK: ucrtbase.dll found'); + end + // Bad if msvcp140.dll exists but ucrtbase.dll doesn't (corrupted install) + else if FileExists(MSVCPPath) then + begin + Result := False; + Log('Bad VCRedist: msvcp140.dll exists but ucrtbase.dll missing'); + end + else + begin + Result := False; + Log('VCRedist not installed'); + end; +end; + + +function InitializeSetup(): Boolean; +begin + Result := True; + + // Check for AVX2 support (required for x86_64-v3 build) + if not IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE) then + begin + MsgBox('Jellyfin Desktop requires a CPU with AVX2 support.' + #13#10 + #13#10 + + 'Your processor does not support AVX2 instructions.', mbError, MB_OK); + Result := False; + Exit; + end; + + // Check VCRedist and set flag for download + VCRedistNeedsInstallFlag := not CheckVCRedist(); + + if VCRedistNeedsInstallFlag then + Log('VCRedist will be installed during setup'); +end; + +function PrepareToInstall(var NeedsRestart: Boolean): String; +var + DownloadPage: TDownloadWizardPage; + VCRedistPath: String; +begin + Result := ''; + NeedsRestart := False; + + // Download VCRedist if needed + if VCRedistNeedsInstallFlag then + begin + VCRedistPath := ExpandConstant('{tmp}\vcredist_x64.exe'); + + if not FileExists(VCRedistPath) then + begin + DownloadPage := CreateDownloadPage('Downloading Dependencies', 'Downloading required dependencies...', nil); + DownloadPage.Clear; + DownloadPage.Add('{#VCRedistURL}', 'vcredist_x64.exe', ''); + DownloadPage.Show; + try + DownloadPage.Download; + except + Result := 'Failed to download Visual C++ Redistributable.' + #13#10 + + 'Please check your internet connection and try again.'; + Exit; + finally + DownloadPage.Hide; + end; + end; + end; +end; + +var + RemoveUserData: Boolean; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +var + DataDir: String; + CacheDir: String; +begin + if CurUninstallStep = usUninstall then + begin + DataDir := ExpandConstant('{localappdata}\Jellyfin Desktop'); + CacheDir := ExpandConstant('{localappdata}\cache\Jellyfin Desktop'); + + if DirExists(DataDir) or DirExists(CacheDir) then + RemoveUserData := MsgBox('Do you want to remove your Jellyfin Desktop user data?', + mbConfirmation, MB_YESNO) = IDYES; + end + else if CurUninstallStep = usPostUninstall then + begin + if RemoveUserData then + begin + DataDir := ExpandConstant('{localappdata}\Jellyfin Desktop'); + CacheDir := ExpandConstant('{localappdata}\cache\Jellyfin Desktop'); + DelTree(DataDir, True, True, True); + DelTree(CacheDir, True, True, True); + end; + end; +end; diff --git a/bundle/win/Version.wxi.in b/bundle/win/Version.wxi.in deleted file mode 100644 index b10dcc5..0000000 --- a/bundle/win/Version.wxi.in +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/bundle/win/WindowsSign.cmd b/bundle/win/WindowsSign.cmd deleted file mode 100644 index db37e99..0000000 --- a/bundle/win/WindowsSign.cmd +++ /dev/null @@ -1,105 +0,0 @@ -@echo off - -rem -rem Usage - Sign.cmd -rem - -setlocal - -echo --- BEGIN: sign.bat ------------------------------------- - -set TargetFile=%~1 -if not exist "%TargetFile%" ( - echo FATAL ERROR - %TargetFile% does not exist and cannot be signed - echo --- END: sign.bat ------------------------------------- - exit /b 1 -) -for %%i in ("%TargetFile%") do set TargetFileExtension="%%~xi" - -if "%SigningCertSha256%" == "" ( - set SigningCertSha256=%~dp0PlexOfficialSPC_sha256.pfx -) -if not exist "%SigningCertSha256%" ( - set SigningCertSha256=%~dp0PlexTestSPC.pfx -) -echo Signing with %SigningCertSha256% -set TimestampErrors=0 - -rem Create timestamp server lists... All servers on this list support both RFC 3161 and non-RFC variants -set ServerListRfc3161=(http://timestamp.digicert.com,http://timestamp.globalsign.com/scripts/timestamp.dll,http://timestamp.comodoca.com) - -rem Signing files SHA256 with the SHA256 cert -echo Adding SHA256 signature to %TargetFile%... -call :SignFile "%SigningCertSha256%" "%SigningCertPasswordSha256%" sha256 0 "%TargetFile%" "%ServerListRfc3161%" sha256 -if errorlevel 1 goto SignFailed - -echo Verifying signature... -signtool.exe verify /pa "%TargetFile%" -if errorlevel 1 ( - echo FATAL ERROR - could not verify signature for %TargetFile%. There were %TimestampErrors% timestamping errors. - echo --- END: sign.bat ------------------------------------------------------------ - exit /b 1 -) else ( - echo --- END: sign.bat ------------------------------------------------------------ - exit /b 0 -) - -:SignFailed - REM return an error code... - echo FAILED: FATAL ERROR - signing %TargetFile% failed. There were %TimestampErrors% timestamping errors. - echo --- END: sign.bat ------------------------------------------------------------- - exit /b 1 - -rem When timestamping a file, signtool will fail when the timestamp server doesn't respond. So we retry in a loop, in an attempt to reduce spurious failures. -rem When running signtool, we redirect output to null because signtool.exe may inadvertently output the word "error", causing msbuild to fail the build. -:SignFile - - setlocal - set CertFilePath=%1 - set CertPassword=%~2 - set SignatureHashAlgorithm=%3 - set AppendSignature=%4 - set TargetFilePath=%5 - set TimestampServerList=%~6 - set Rfc3161HashAlgorithm=%7 - - rem Compute password args - if "%CertPassword%" neq "" ( - set PasswordArgs=/p %CertPassword% - ) else ( - set PasswordArgs= - ) - - rem Compute append args - if "%AppendSignature%" == "1" ( - set AppendSignatureArgs=/as - ) else ( - set AppendSignatureArgs= - ) - - rem Compute timestamp server args - set TimestampArg1=/tr - set TimestampArg2=/td %Rfc3161HashAlgorithm% - - for /L %%a in (1,1,300) do ( - for %%s in %TimestampServerList% do ( - - rem echo signtool.exe sign %AppendSignatureArgs% /fd %SignatureHashAlgorithm% %TimestampArg1% %%s %TimestampArg2% /f %CertFilePath% %PasswordArgs% %TargetFilePath% - signtool.exe sign %AppendSignatureArgs% /fd %SignatureHashAlgorithm% %TimestampArg1% %%s %TimestampArg2% /f %CertFilePath% %PasswordArgs% %TargetFilePath% > NUL 2>&1 - if errorlevel 0 if not errorlevel 1 goto SignFileSuccess - - echo Signing attempt %%a failed. Probably cannot find the timestamp server at %%s - set /a TimestampErrors+=1 - ) - - echo Waiting 1 second... - choice /N /T:1 /D:Y >NUL - ) - - endlocal - exit /b 1 - -:SignFileSuccess - echo Signing succeeded - endlocal - exit /b 0 diff --git a/bundle/win/jellyfin-chevron-85.png b/bundle/win/jellyfin-chevron-85.png deleted file mode 100644 index a238119..0000000 Binary files a/bundle/win/jellyfin-chevron-85.png and /dev/null differ diff --git a/bundle/win/pmstheme.xml b/bundle/win/pmstheme.xml deleted file mode 100644 index 202bd4d..0000000 --- a/bundle/win/pmstheme.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - - #(loc.Title) - - - - #(loc.HelpHeader) - #(loc.HelpText) - - - - #(loc.InstallHeader) - #(loc.InstallMessage) - - #(loc.InstallLicenseLinkText) - #(loc.InstallVersion) - #(loc.InstallAcceptCheckbox) - - - - - #(loc.DesktopShortcutCheckbox) - - - #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - - - - - - #(loc.ProgressHeader) - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - - - - #(loc.ModifyHeader) - #(loc.ModifyMessage) - - - - - - #(loc.SuccessHeader) - - #(loc.SuccessRestartText) - - - - - #(loc.FailureHeader) - One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>. - #(loc.FailureRestartText) - - - - \ No newline at end of file diff --git a/bundle/win/progress-bar.png b/bundle/win/progress-bar.png deleted file mode 100644 index cc3ea0d..0000000 Binary files a/bundle/win/progress-bar.png and /dev/null differ diff --git a/bundle/win/wizard-image.png b/bundle/win/wizard-image.png new file mode 100644 index 0000000..b76a0cf Binary files /dev/null and b/bundle/win/wizard-image.png differ diff --git a/bundle/win/wizard-small-image.png b/bundle/win/wizard-small-image.png new file mode 100644 index 0000000..15471c3 Binary files /dev/null and b/bundle/win/wizard-small-image.png differ