mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Add the tray app download to the build script, use it in the installer shortcuts
Adds the tray app download to build-jellyfin, adjusts the shortcuts in the installer, and adds the switch to the pipeline configuration.
This commit is contained in:
		
							parent
							
								
									aca4f83333
								
							
						
					
					
						commit
						bde1af5def
					
				@ -245,7 +245,7 @@ jobs:
 | 
				
			|||||||
      inputs:
 | 
					      inputs:
 | 
				
			||||||
        targetType: 'filePath' # Optional. Options: filePath, inline
 | 
					        targetType: 'filePath' # Optional. Options: filePath, inline
 | 
				
			||||||
        filePath: ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
 | 
					        filePath: ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
 | 
				
			||||||
        arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
 | 
					        arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -InstallTrayApp -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
 | 
				
			||||||
        #script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
 | 
					        #script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
 | 
				
			||||||
        errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
 | 
					        errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
 | 
				
			||||||
        #failOnStderr: false # Optional
 | 
					        #failOnStderr: false # Optional
 | 
				
			||||||
 | 
				
			|||||||
@ -8,6 +8,7 @@ param(
 | 
				
			|||||||
    [switch]$GenerateZip,
 | 
					    [switch]$GenerateZip,
 | 
				
			||||||
    [string]$InstallLocation = "./dist/jellyfin-win-nsis",
 | 
					    [string]$InstallLocation = "./dist/jellyfin-win-nsis",
 | 
				
			||||||
    [string]$UXLocation = "../jellyfin-ux",
 | 
					    [string]$UXLocation = "../jellyfin-ux",
 | 
				
			||||||
 | 
					    [string]$InstallTrayApp,
 | 
				
			||||||
    [ValidateSet('Debug','Release')][string]$BuildType = 'Release',
 | 
					    [ValidateSet('Debug','Release')][string]$BuildType = 'Release',
 | 
				
			||||||
    [ValidateSet('Quiet','Minimal', 'Normal')][string]$DotNetVerbosity = 'Minimal',
 | 
					    [ValidateSet('Quiet','Minimal', 'Normal')][string]$DotNetVerbosity = 'Minimal',
 | 
				
			||||||
    [ValidateSet('win','win7', 'win8','win81','win10')][string]$WindowsVersion = 'win',
 | 
					    [ValidateSet('win','win7', 'win8','win81','win10')][string]$WindowsVersion = 'win',
 | 
				
			||||||
@ -131,6 +132,23 @@ function Cleanup-NSIS {
 | 
				
			|||||||
    Remove-Item "$tempdir/nsis/" -Recurse -Force -ErrorAction Continue | Write-Verbose
 | 
					    Remove-Item "$tempdir/nsis/" -Recurse -Force -ErrorAction Continue | Write-Verbose
 | 
				
			||||||
    Remove-Item "$tempdir/nsis.zip" -Force -ErrorAction Continue | Write-Verbose
 | 
					    Remove-Item "$tempdir/nsis.zip" -Force -ErrorAction Continue | Write-Verbose
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function Install-TrayApp {
 | 
				
			||||||
 | 
					    param(
 | 
				
			||||||
 | 
					        [string]$ResolvedInstallLocation,
 | 
				
			||||||
 | 
					        [string]$Architecture
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    Write-Verbose "Checking Architecture"
 | 
				
			||||||
 | 
					    if($Architecture -ne 'x64'){
 | 
				
			||||||
 | 
					        Write-Warning "No builds available for your selected architecture of $Architecture"
 | 
				
			||||||
 | 
					        Write-Warning "The tray app will not be available."
 | 
				
			||||||
 | 
					    }else{
 | 
				
			||||||
 | 
					        Write-Verbose "Downloading Tray App and copying to Jellyfin location"
 | 
				
			||||||
 | 
					        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
 | 
				
			||||||
 | 
					        Invoke-WebRequest -Uri https://github.com/jellyfin/jellyfin-windows-tray/releases/download/v1.0/JellyfinTray.exe -UseBasicParsing -OutFile "$installLocation/JellyfinTray.exe" | Write-Verbose
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(-not $SkipJellyfinBuild.IsPresent -and -not ($InstallNSIS -eq $true)){
 | 
					if(-not $SkipJellyfinBuild.IsPresent -and -not ($InstallNSIS -eq $true)){
 | 
				
			||||||
    Write-Verbose "Starting Build Process: Selected Environment is $WindowsVersion-$Architecture"
 | 
					    Write-Verbose "Starting Build Process: Selected Environment is $WindowsVersion-$Architecture"
 | 
				
			||||||
    Build-JellyFin
 | 
					    Build-JellyFin
 | 
				
			||||||
@ -143,6 +161,10 @@ if($InstallNSSM.IsPresent -or ($InstallNSSM -eq $true)){
 | 
				
			|||||||
    Write-Verbose "Starting NSSM Install"
 | 
					    Write-Verbose "Starting NSSM Install"
 | 
				
			||||||
    Install-NSSM $ResolvedInstallLocation $Architecture
 | 
					    Install-NSSM $ResolvedInstallLocation $Architecture
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					if($InstallTrayApp.IsPresent -or ($InstallTrayApp -eq $true)){
 | 
				
			||||||
 | 
					    Write-Verbose "Downloading Windows Tray App"
 | 
				
			||||||
 | 
					    Install-TrayApp $ResolvedInstallLocation $Architecture
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
#Copy-Item .\deployment\windows\install-jellyfin.ps1 $ResolvedInstallLocation\install-jellyfin.ps1
 | 
					#Copy-Item .\deployment\windows\install-jellyfin.ps1 $ResolvedInstallLocation\install-jellyfin.ps1
 | 
				
			||||||
#Copy-Item .\deployment\windows\install.bat $ResolvedInstallLocation\install.bat
 | 
					#Copy-Item .\deployment\windows\install.bat $ResolvedInstallLocation\install.bat
 | 
				
			||||||
Copy-Item .\LICENSE $ResolvedInstallLocation\LICENSE
 | 
					Copy-Item .\LICENSE $ResolvedInstallLocation\LICENSE
 | 
				
			||||||
 | 
				
			|||||||
@ -279,9 +279,9 @@ Section "Create Shortcuts" CreateWinShortcuts
 | 
				
			|||||||
    ${If} $_MAKESHORTCUTS_ == "Yes"
 | 
					    ${If} $_MAKESHORTCUTS_ == "Yes"
 | 
				
			||||||
        CreateDirectory "$SMPROGRAMS\Jellyfin Server"
 | 
					        CreateDirectory "$SMPROGRAMS\Jellyfin Server"
 | 
				
			||||||
        CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin (View Console).lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMAXIMIZED
 | 
					        CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin (View Console).lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMAXIMIZED
 | 
				
			||||||
        ;CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin Tray App.lnk" "$INSTDIR\jellyfin-tray.exe" "" "$INSTDIR\icon.ico" 0
 | 
					        CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin Tray App.lnk" "$INSTDIR\jellyfintray.exe" "" "$INSTDIR\icon.ico" 0
 | 
				
			||||||
        CreateShortCut "$DESKTOP\Jellyfin Server.lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMINIMIZED
 | 
					        ;CreateShortCut "$DESKTOP\Jellyfin Server.lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMINIMIZED
 | 
				
			||||||
        ;CreateShortCut "$DESKTOP\Jellyfin Server\Jellyfin Server.lnk" "$INSTDIR\jellyfin-tray.exe" "" "$INSTDIR\icon.ico" 0
 | 
					        CreateShortCut "$DESKTOP\Jellyfin Server\Jellyfin Server.lnk" "$INSTDIR\jellyfintray.exe" "" "$INSTDIR\icon.ico" 0
 | 
				
			||||||
    ${EndIf}
 | 
					    ${EndIf}
 | 
				
			||||||
SectionEnd
 | 
					SectionEnd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user