From d6a729c119891fbea3cba719a7e27af114c94a09 Mon Sep 17 00:00:00 2001 From: Phallacy Date: Thu, 24 Jan 2019 01:56:56 -0800 Subject: [PATCH] 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 cce8a8ef6..befddb2e7 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 ad5245827..3cc4eb623 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