forked from jellyfin/jellyfin-ffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-windows-win64
executable file
·39 lines (34 loc) · 1.06 KB
/
build-windows-win64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
set -o xtrace
set -o errexit
# Check for dependencies
for dep in docker make; do
command -v ${dep} &>/dev/null || { echo "The command '${dep}' is required."; exit 1; }
done
# Use the latest distro for toolchains
distro="ubuntu:noble"
image_name="jellyfin-ffmpeg-build-windows-win64"
package_temporary_dir="$( mktemp -d )"
current_user="$( whoami )"
# Trap cleanup for latter sections
cleanup() {
# Clean up the Dockerfile
make -f Dockerfile.win64.make clean
# Remove tempdir
rm -rf "${package_temporary_dir}"
}
trap cleanup EXIT INT
# Generate Dockerfile
make -f Dockerfile.win64.make DISTRO=${distro}
# Set up the build environment docker image
docker build . -t "${image_name}"
# Build the APKs and copy out to ${package_temporary_dir}
docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
# If no 1st parameter was specified, move APKs to parent directory
if [[ -z ${1} ]]; then
path="../bin"
else
path="${1}"
fi
mkdir ${path} &>/dev/null || true
mv "${package_temporary_dir}"/zip/jellyfin-ffmpeg*.zip "${path}"