From 4eaeee7be24a35e697731da1403c12df8f4f753a Mon Sep 17 00:00:00 2001 From: Phallacy Date: Tue, 1 Jan 2019 20:28:29 -0800 Subject: [PATCH 1/5] minor: copy install.bat for rename --- build-jellyfin.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-jellyfin.ps1 b/build-jellyfin.ps1 index 5544df88af..2247166211 100644 --- a/build-jellyfin.ps1 +++ b/build-jellyfin.ps1 @@ -103,7 +103,7 @@ if($InstallNSSM.IsPresent -or ($InstallNSSM -eq $true)){ Install-NSSM $InstallLocation $Architecture } Copy-Item .\install-jellyfin.ps1 $InstallLocation\install-jellyfin.ps1 -Copy-Item .\installjellyfin.bat $InstallLocation\installjellyfin.bat +Copy-Item .\install.bat $InstallLocation\install.bat if($GenerateZip.IsPresent -or ($GenerateZip -eq $true)){ Compress-Archive -Path $InstallLocation -DestinationPath "$InstallLocation/jellyfin.zip" -Force } From a30687a15ae216f027d21813a32aab41b987eea8 Mon Sep 17 00:00:00 2001 From: Phallacy Date: Wed, 23 Jan 2019 00:41:38 -0800 Subject: [PATCH 2/5] Quick fix to erroring build scripts and pulling the supported ffmpeg --- deployment/win-generic/build-jellyfin.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/win-generic/build-jellyfin.ps1 b/deployment/win-generic/build-jellyfin.ps1 index 7807a46c38..1121c33983 100644 --- a/deployment/win-generic/build-jellyfin.ps1 +++ b/deployment/win-generic/build-jellyfin.ps1 @@ -40,21 +40,21 @@ function Install-FFMPEG { 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 "$tempdir/fmmpeg.zip" | Write-Verbose + Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0.2-win64-static.zip -UseBasicParsing -OutFile "$tempdir/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 "$tempdir/fmmpeg.zip" | Write-Verbose + Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-4.0.2-win32-static.zip -UseBasicParsing -OutFile "$tempdir/fmmpeg.zip" | Write-Verbose } Expand-Archive "$tempdir/fmmpeg.zip" -DestinationPath "$tempdir/ffmpeg/" | Write-Verbose if($Architecture -eq 'x64'){ Write-Verbose "Copying Binaries to Jellyfin location" - Get-ChildItem "$tempdir/ffmpeg/ffmpeg-4.1-win64-static/bin" | ForEach-Object { + Get-ChildItem "$tempdir/ffmpeg/ffmpeg-4.0.2-win64-static/bin" | ForEach-Object { Copy-Item $_.FullName -Destination $installLocation | Write-Verbose } }else{ Write-Verbose "Copying Binaries to Jellyfin location" - Get-ChildItem "$tempdir/ffmpeg/ffmpeg-4.1-win32-static/bin" | ForEach-Object { + Get-ChildItem "$tempdir/ffmpeg/ffmpeg-4.0.2-win32-static/bin" | ForEach-Object { Copy-Item $_.FullName -Destination $installLocation | Write-Verbose } } @@ -102,8 +102,8 @@ if($InstallNSSM.IsPresent -or ($InstallNSSM -eq $true)){ Write-Verbose "Starting NSSM Install" Install-NSSM $InstallLocation $Architecture } -Copy-Item .\install-jellyfin.ps1 $InstallLocation\install-jellyfin.ps1 -Copy-Item .\install.bat $InstallLocation\install.bat +Copy-Item .\deployment\win-generic\install-jellyfin.ps1 $InstallLocation\install-jellyfin.ps1 +Copy-Item .\deployment\win-generic\install.bat $InstallLocation\install.bat if($GenerateZip.IsPresent -or ($GenerateZip -eq $true)){ Compress-Archive -Path $InstallLocation -DestinationPath "$InstallLocation/jellyfin.zip" -Force } From 4e7675e78f31efa92329ae8858bfe79510f6723a Mon Sep 17 00:00:00 2001 From: Phallacy Date: Thu, 24 Jan 2019 01:42:34 -0800 Subject: [PATCH 3/5] Updated Packaging Windows from Linux for parity --- deployment/win-x64/package.sh | 37 +++++++++++++++++++++++++++++++++- deployment/win-x86/package.sh | 38 +++++++++++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/deployment/win-x64/package.sh b/deployment/win-x64/package.sh index e8410e8c23..cce8a8ef6a 100755 --- a/deployment/win-x64/package.sh +++ b/deployment/win-x64/package.sh @@ -1,9 +1,44 @@ #!/usr/bin/env bash +package_win64() ( + local NSSM_URL="https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip" + local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0.2-win64-static.zip" + local ROOT=${1-$DEFAULT_ROOT} + local OUTPUT_DIR=${2-$DEFAULT_OUTPUT_DIR} + local PKG_DIR=${3-$DEFAULT_PKG_DIR} + local ARCHIVE_CMD="zip -r" + # Package portable build result + if [ -d ${OUTPUT_DIR} ]; then + echo -e "${CYAN}Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}'.${NC}" + local TEMP_DIR="$(mktemp -d)" + wget ${NSSM_URL} -O ${TEMP_DIR}/nssm.zip + wget ${FFMPEG_URL} -O ${TEMP_DIR}/ffmpeg.zip + unzip ${TEMP_DIR}/nssm.zip -d $TEMP_DIR + cp ${TEMP_DIR}/nssm-2.24-101-g897c7ad/win64/nssm.exe ${OUTPUT_DIR}/nssm.exe + unzip ${TEMP_DIR}/ffmpeg.zip -d $TEMP_DIR + cp ${TEMP_DIR}/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe + cp ${TEMP_DIR}/ffmpeg-4.0.2-win64-static/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe + rm -r ${TEMP_DIR} + cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 + cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat + mkdir -p ${PKG_DIR} + pushd ${OUTPUT_DIR} + ${ARCHIVE_CMD} ${ROOT}/${PKG_DIR}/`basename "${OUTPUT_DIR}"`.zip . + popd + local EXIT_CODE=$? + if [ $EXIT_CODE -eq 0 ]; then + echo -e "${GREEN}[DONE] Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}' complete.${NC}" + else + echo -e "${RED}[FAIL] Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}' FAILED.${NC}" + fi + else + echo -e "${RED}[FAIL] Build artifacts do not exist for ${OUTPUT_DIR}. Run build.sh first.${NC}" + fi +) source ../common.build.sh VERSION=`get_version ../..` -package_portable ../.. `pwd`/dist/jellyfin_${VERSION} +package_win64 ../.. `pwd`/dist/jellyfin_${VERSION} #TODO setup and maybe change above code to produce the Windows native zip format. diff --git a/deployment/win-x86/package.sh b/deployment/win-x86/package.sh index e8410e8c23..ad5245827b 100755 --- a/deployment/win-x86/package.sh +++ b/deployment/win-x86/package.sh @@ -1,9 +1,43 @@ #!/usr/bin/env bash - +package_win32() ( + local NSSM_URL="https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip" + local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0.2-win32-static.zip" + local ROOT=${1-$DEFAULT_ROOT} + local OUTPUT_DIR=${2-$DEFAULT_OUTPUT_DIR} + local PKG_DIR=${3-$DEFAULT_PKG_DIR} + local ARCHIVE_CMD="zip -r" + # Package portable build result + if [ -d ${OUTPUT_DIR} ]; then + echo -e "${CYAN}Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}'.${NC}" + local TEMP_DIR="$(mktemp -d)" + wget ${NSSM_URL} -O ${TEMP_DIR}/nssm.zip + wget ${FFMPEG_URL} -O ${TEMP_DIR}/ffmpeg.zip + unzip ${TEMP_DIR}/nssm.zip -d $TEMP_DIR + cp ${TEMP_DIR}/nssm-2.24-101-g897c7ad/win32/nssm.exe ${OUTPUT_DIR}/nssm.exe + unzip ${TEMP_DIR}/ffmpeg.zip -d $TEMP_DIR + cp ${TEMP_DIR}/ffmpeg-4.0.2-win32-static/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe + cp ${TEMP_DIR}/ffmpeg-4.0.2-win32-static/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe + rm -r ${TEMP_DIR} + cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 + cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat + mkdir -p ${PKG_DIR} + pushd ${OUTPUT_DIR} + ${ARCHIVE_CMD} ${ROOT}/${PKG_DIR}/`basename "${OUTPUT_DIR}"`.zip . + popd + local EXIT_CODE=$? + if [ $EXIT_CODE -eq 0 ]; then + echo -e "${GREEN}[DONE] Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}' complete.${NC}" + else + echo -e "${RED}[FAIL] Packaging build in '${OUTPUT_DIR}' for `basename "${OUTPUT_DIR}"` to '${PKG_DIR}' with root '${ROOT}' FAILED.${NC}" + fi + else + echo -e "${RED}[FAIL] Build artifacts do not exist for ${OUTPUT_DIR}. Run build.sh first.${NC}" + fi +) source ../common.build.sh VERSION=`get_version ../..` -package_portable ../.. `pwd`/dist/jellyfin_${VERSION} +package_win32 ../.. `pwd`/dist/jellyfin_${VERSION} #TODO setup and maybe change above code to produce the Windows native zip format. From d6a729c119891fbea3cba719a7e27af114c94a09 Mon Sep 17 00:00:00 2001 From: Phallacy Date: Thu, 24 Jan 2019 01:56:56 -0800 Subject: [PATCH 4/5] parameterized ffmpeg and nssm stuff --- deployment/win-x64/package.sh | 12 +++++++----- deployment/win-x86/package.sh | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/deployment/win-x64/package.sh b/deployment/win-x64/package.sh index cce8a8ef6a..befddb2e76 100755 --- a/deployment/win-x64/package.sh +++ b/deployment/win-x64/package.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash package_win64() ( - local NSSM_URL="https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip" - local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0.2-win64-static.zip" + local NSSM_VERSION="nssm-2.24-101-g897c7ad" + local NSSM_URL="https://nssm.cc/ci/${NSSM_VERSION}.zip" + local FFMPEG_VERSION="ffmpeg-4.0.2-win64-static" + local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/${FFMPEG_VERSION}.zip" local ROOT=${1-$DEFAULT_ROOT} local OUTPUT_DIR=${2-$DEFAULT_OUTPUT_DIR} local PKG_DIR=${3-$DEFAULT_PKG_DIR} @@ -13,10 +15,10 @@ package_win64() ( wget ${NSSM_URL} -O ${TEMP_DIR}/nssm.zip wget ${FFMPEG_URL} -O ${TEMP_DIR}/ffmpeg.zip unzip ${TEMP_DIR}/nssm.zip -d $TEMP_DIR - cp ${TEMP_DIR}/nssm-2.24-101-g897c7ad/win64/nssm.exe ${OUTPUT_DIR}/nssm.exe + cp ${TEMP_DIR}/${NSSM_VERSION}}/win64/nssm.exe ${OUTPUT_DIR}/nssm.exe unzip ${TEMP_DIR}/ffmpeg.zip -d $TEMP_DIR - cp ${TEMP_DIR}/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe - cp ${TEMP_DIR}/ffmpeg-4.0.2-win64-static/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe + cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe + cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe rm -r ${TEMP_DIR} cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat diff --git a/deployment/win-x86/package.sh b/deployment/win-x86/package.sh index ad5245827b..3cc4eb6239 100755 --- a/deployment/win-x86/package.sh +++ b/deployment/win-x86/package.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash package_win32() ( - local NSSM_URL="https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip" - local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0.2-win32-static.zip" + local NSSM_VERSION="nssm-2.24-101-g897c7ad" + local NSSM_URL="https://nssm.cc/ci/${NSSM_VERSION}.zip" + local FFMPEG_VERSION="ffmpeg-4.0.2-win32-static" + local FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win32/static/${FFMPEG_VERSION}.zip" local ROOT=${1-$DEFAULT_ROOT} local OUTPUT_DIR=${2-$DEFAULT_OUTPUT_DIR} local PKG_DIR=${3-$DEFAULT_PKG_DIR} @@ -13,10 +15,10 @@ package_win32() ( wget ${NSSM_URL} -O ${TEMP_DIR}/nssm.zip wget ${FFMPEG_URL} -O ${TEMP_DIR}/ffmpeg.zip unzip ${TEMP_DIR}/nssm.zip -d $TEMP_DIR - cp ${TEMP_DIR}/nssm-2.24-101-g897c7ad/win32/nssm.exe ${OUTPUT_DIR}/nssm.exe + cp ${TEMP_DIR}/${NSSM_VERSION}/win32/nssm.exe ${OUTPUT_DIR}/nssm.exe unzip ${TEMP_DIR}/ffmpeg.zip -d $TEMP_DIR - cp ${TEMP_DIR}/ffmpeg-4.0.2-win32-static/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe - cp ${TEMP_DIR}/ffmpeg-4.0.2-win32-static/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe + cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe + cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe rm -r ${TEMP_DIR} cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat From cab7fa26714c10f26df179ac768427d0a561095a Mon Sep 17 00:00:00 2001 From: Phallacy Date: Thu, 24 Jan 2019 07:36:45 -0800 Subject: [PATCH 5/5] added self to contributors list --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8ae6c81a88..d918b7b95a 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -15,6 +15,7 @@ - [cvium](https://github.com/cvium) - [wtayl0r](https://github.com/wtayl0r) - [TtheCreator](https://github.com/Tthecreator) + - [LogicalPhallacy](https://github.com/LogicalPhallacy/) # Emby Contributors