From bdf820108d619d3f374d39d759de23b33a1d325d Mon Sep 17 00:00:00 2001 From: Phallacy Date: Tue, 11 Dec 2018 11:25:17 -0800 Subject: [PATCH 1/3] Added windows build instructions --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 59b99e4bc1..0ddafd394c 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,21 @@ Debian build facilities are integrated into the repo at `debian/`. 3. Install the resulting `jellyfin*.deb` file on your system. A huge thanks to Carlos Hernandez who created the Debian build configuration for Emby 3.1.1. + +### Windows (64 bit) +A pre-built windows installer will be available at [The JellyFin Repository](https://repo.jellyfin.org/). + +1. Install the dotnet core SDK 2.1 from [Microsoft's Webpage](https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-2.1.500-windows-x64-installer) +2. Clone Jellyfin into a directory of your choice. From that directory run in powershell `dotnet publish -c Release -r win10-x64 MediaBrowser.sln -o $Env:APPDATA\Jellyfin-Server` or in CMD `dotnet publish -c Release -r win10-x64 MediaBrowser.sln -o %APPDATA%\Jellyfin-Server` +3. (Optional) Copy the ffmpeg binaries into the Jellyfin directory: +``` +Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.1-win64-static.zip -UseBasicParsing -OutFile $env:TEMP\fmmpeg.zip +Expand-Archive $env:TEMP\fmmpeg.zip -DestinationPath $env:TEMP\ffmpeg\ +Get-ChildItem "$env:temp\ffmpeg\ffmpeg-4.1-win64-static\bin" | ForEach-Object { + Copy-Item $_ -Destination $Env:AppData\JellyFin-Server\ +} +Remove-Item $env:TEMP\ffmpeg\ -Recurse -Force +Remove-Item $env:TEMP\fmmpeg.zip -Force +``` +4. (Optional) Use [NSSM](https://nssm.cc/) to configure JellyFin to run as a service +5. Jellyfin is now available in your Appdata\Roaming directory. To start it from a powershell window, `&"$env:APPDATA\Jellyfin-Server\EmbyServer.exe"` \ No newline at end of file From f529d8700b818db77ff252e73fa7188b82ac99a2 Mon Sep 17 00:00:00 2001 From: Phallacy Date: Tue, 11 Dec 2018 13:45:24 -0800 Subject: [PATCH 2/3] Added build script for Windows Builds --- Build-JellyFin.ps1 | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Build-JellyFin.ps1 diff --git a/Build-JellyFin.ps1 b/Build-JellyFin.ps1 new file mode 100644 index 0000000000..b0f5279544 --- /dev/null +++ b/Build-JellyFin.ps1 @@ -0,0 +1,64 @@ +[CmdletBinding()] +param( + [switch]$InstallFFMPEG, + [string]$InstallLocation = "$Env:AppData\JellyFin-Server\", + [ValidateSet('Debug','Release')][string]$BuildType = 'Release', + [ValidateSet('Quiet','Minimal', 'Normal')][string]$DotNetVerbosity = 'Minimal', + [ValidateSet('win','win7', 'win8','win81','win10')][string]$WindowsVersion = 'win', + [ValidateSet('x64','x86', 'arm', 'arm64')][string]$Architecture = 'x64' +) +function Build-JellyFin { + if($Architecture -eq 'arm64'){ + if($WindowsVersion -ne 'win10'){ + Write-Error "arm64 only supported with Windows10 Version" + exit + } + } + if($Architecture -eq 'arm'){ + if($WindowsVersion -notin @('win10','win81','win8')){ + Write-Error "arm only supported with Windows 8 or higher" + exit + } + } + dotnet publish -c $BuildType -r "$windowsversion-$Architecture" .\MediaBrowser.sln -o $InstallLocation -v $DotNetVerbosity +} + +function Install-FFMPEG { + param( + [string]$InstallLocation, + [string]$Architecture + ) + Write-Verbose "Checking Architecture" + if($Architecture -notin @('x86','x64')){ + Write-Warning "No builds available for your selected architecture of $Architecture" + Write-Warning "FFMPEG will not be installed" + }elseif($Architecture -eq 'x64'){ + Write-Verbose "Downloading 64 bit FFMPEG" + Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.1-win64-static.zip -UseBasicParsing -OutFile $env:TEMP\fmmpeg.zip | Write-Verbose + }else{ + Write-Verbose "Downloading 32 bit FFMPEG" + Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-4.1-win32-static.zip -UseBasicParsing -OutFile $env:TEMP\fmmpeg.zip | Write-Verbose + } + + Expand-Archive $env:TEMP\fmmpeg.zip -DestinationPath $env:TEMP\ffmpeg\ | Write-Verbose + if($Architecture -eq 'x64'){ + Write-Verbose "Copying Binaries to Jellyfin location" + Get-ChildItem "$env:temp\ffmpeg\ffmpeg-4.1-win64-static\bin" | ForEach-Object { + Copy-Item $_.FullName -Destination $installLocation | Write-Verbose + } + }else{ + Write-Verbose "Copying Binaries to Jellyfin location" + Get-ChildItem "$env:temp\ffmpeg\ffmpeg-4.1-win32-static\bin" | ForEach-Object { + Copy-Item $_.FullName -Destination $installLocation | Write-Verbose + } + } + Remove-Item $env:TEMP\ffmpeg\ -Recurse -Force -ErrorAction Continue | Write-Verbose + Remove-Item $env:TEMP\fmmpeg.zip -Force -ErrorAction Continue | Write-Verbose +} +Write-Verbose "Starting Build Process: Selected Environment is $WindowsVersion-$Architecture" +Build-JellyFin +if($InstallFFMPEG.IsPresent -or ($InstallFFMPEG -eq $true)){ + Write-Verbose "Starting FFMPEG Install" + Install-FFMPEG $InstallLocation $Architecture +} +Write-Verbose "Finished" \ No newline at end of file From 7ded4dee08b5ddcf14f2e8767bf86ec5da9d6a39 Mon Sep 17 00:00:00 2001 From: Phallacy Date: Tue, 11 Dec 2018 14:52:40 -0800 Subject: [PATCH 3/3] Added doc for windows build script --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index e635506a2d..1b7ec512bf 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,12 @@ Debian build facilities are integrated into the repo at `debian/`. 3. Install the resulting `jellyfin_*.deb` file on your system. A huge thanks to Carlos Hernandez who created the original Debian build configuration for Emby 3.1.1. + +### Windows (64 bit) +A pre-built windows installer will be available soon. Until then it isn't too hard to install Jellyfin from Source. + +1. Install the dotnet core SDK 2.1 from [Microsoft's Webpage](https://dotnet.microsoft.com/download/dotnet-core/2.1) and [install Git for Windows](https://gitforwindows.org/) +2. Clone Jellyfin into a directory of your choice. `git clone https://github.com/jellyfin/jellyfin.git C:\Jellyfin` +3. From the Jellyfin directory you can use our Jellyfin build script. Call `Build-Jellyfin.ps1 -InstallFFMPEG` from inside the directory in a powershell window. Make sure you've set your executionpolicy to unsrestricted. If you want to optimize for your environment you can use the -WindowsVersion and -Architecture flags to do so, default is generic windows x64. The -InstallLocation flag lets you select where the compiled binaries go, default is `$Env:AppData\JellyFin-Server\` . The -InstallFFMPEG flag will automatically pull the stable FFMPEG binaries appropriate to your architecture (x86/x64 only for now) from [Zeranoe](https://ffmpeg.zeranoe.com/builds/), and then place them in your emby directory. +4. (Optional) Use [NSSM](https://nssm.cc/) to configure JellyFin to run as a service +5. Jellyfin is now available in the default directory (or the directory you chose). Assuming you kept the default directory, to start it from a powershell window run, `&"$env:APPDATA\Jellyfin-Server\EmbyServer.exe"`. To start it from CMD run, `%APPDATA%\Jellyfin-Server\EmbyServer.exe` \ No newline at end of file