From bf09d1cdca1c4360124f4f7fa5dba090dbfb893d Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 13 Feb 2024 16:06:26 +0100 Subject: [PATCH] CI: add sountfont, not download The size is only some 90 kB when compressed so it is perhaps not worth downloading from external source and depend on it. It could be even bundled directly, not by CI. Now it is actually the case in Linux (create-appimage.sh) but it is also possible for other platforms. --- .github/scripts/Linux/prepare.sh | 5 ----- .github/scripts/Windows/prepare_msys.sh | 3 +-- .github/scripts/defs.sh | 1 - .github/scripts/macOS/install_others.sh | 3 +-- data/README.md | 4 +++- data/scripts/Linux-AppImage/create-appimage.sh | 5 +++-- 6 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 .github/scripts/defs.sh diff --git a/.github/scripts/Linux/prepare.sh b/.github/scripts/Linux/prepare.sh index d9ef4bbaf..1233f765a 100755 --- a/.github/scripts/Linux/prepare.sh +++ b/.github/scripts/Linux/prepare.sh @@ -53,11 +53,6 @@ sudo apt --no-install-recommends install asciidoc xmlto sudo apt install qtbase5-dev -. "$GITHUB_WORKSPACE/.github/scripts/defs.sh" -sf=$(basename "$DEFAULT_SF_URL") -curl -L "$DEFAULT_SF_URL" -o "$HOME/$sf" -printf '%b' "SDL_SOUNDFONTS=$HOME/$sf\n" >> "$GITHUB_ENV" - # Install cross-platform deps "$GITHUB_WORKSPACE/.github/scripts/install-common-deps.sh" diff --git a/.github/scripts/Windows/prepare_msys.sh b/.github/scripts/Windows/prepare_msys.sh index 6be62c51f..1c35b7ea5 100644 --- a/.github/scripts/Windows/prepare_msys.sh +++ b/.github/scripts/Windows/prepare_msys.sh @@ -100,10 +100,9 @@ https://github.com/CESNET/GPUJPEG/releases/download/continuous/GPUJPEG.zip )} install_soundfont() { - . "$GITHUB_WORKSPACE/.github/scripts/defs.sh" sf_dir="$GITHUB_WORKSPACE/data/Windows/share/soundfonts" mkdir -p "$sf_dir" - curl -L "$DEFAULT_SF_URL" -o "$sf_dir/default.${DEFAULT_SF_URL##*.}" + cp "$GITHUB_WORKSPACE/data/default.sf3" "$sf_dir" } # Install cross-platform deps diff --git a/.github/scripts/defs.sh b/.github/scripts/defs.sh deleted file mode 100644 index 98b272e67..000000000 --- a/.github/scripts/defs.sh +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_SF_URL=http://frakira.fi.muni.cz/~xpulec/TimGM6mb_but_fixed__piano_.sf3 # https://musical-artifacts.com/artifacts/2642 diff --git a/.github/scripts/macOS/install_others.sh b/.github/scripts/macOS/install_others.sh index 69d0728cd..95221050b 100755 --- a/.github/scripts/macOS/install_others.sh +++ b/.github/scripts/macOS/install_others.sh @@ -98,10 +98,9 @@ install_live555() {( )} install_soundfont() {( - . "$srcroot/.github/scripts/defs.sh" sf_dir="$srcroot/data/MacOS-bundle-template/Contents/share/soundfonts" mkdir -p "$sf_dir" - curl -L "$DEFAULT_SF_URL" -o "$sf_dir/default.${DEFAULT_SF_URL##*.}" + cp "$GITHUB_WORKSPACE/data/default.sf3" "$sf_dir" )} install_syphon() { diff --git a/data/README.md b/data/README.md index 5f4f34bf5..171f2a0b9 100644 --- a/data/README.md +++ b/data/README.md @@ -1 +1,3 @@ -screen-capture-recorder-x64.dll is taken from https://sourceforge.net/projects/screencapturer/ +- screen-capture-recorder-x64.dll is taken from https://sourceforge.net/projects/screencapturer/ +- default.sf3 - https://musical-artifacts.com/artifacts/2642, but compressed +with diff --git a/data/scripts/Linux-AppImage/create-appimage.sh b/data/scripts/Linux-AppImage/create-appimage.sh index d5dea201c..ddd607c1b 100755 --- a/data/scripts/Linux-AppImage/create-appimage.sh +++ b/data/scripts/Linux-AppImage/create-appimage.sh @@ -64,9 +64,10 @@ add_fonts() { # for GUI+testcard2 cp "$FONT_PATH" $APPPREFIX/share/fonts done done - if ls $APPPREFIX/lib/*mixer* >/dev/null 2>&1 && [ -f "${SDL_SOUNDFONTS-nonexistent}" ]; then + if ls $APPPREFIX/lib/*mixer* >/dev/null 2>&1; then mkdir -p $APPPREFIX/share/soundfonts - cp "$SDL_SOUNDFONTS" $APPPREFIX/share/soundfonts/default.${SDL_SOUNDFONTS##*.} + sf=${SDL_SOUNDFONTS:-$srcdir/data/default.sf3} + cp "$sf" $APPPREFIX/share/soundfonts/default."${sf##*.}" fi }