From 1fbafcd702ad0171598343abff1f1c3ba2d43956 Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Mon, 16 Sep 2024 23:33:10 +0200 Subject: [PATCH 1/2] lmu2png: Migrate from SDL2_image to freeimage --- linux-static/1_download_library.sh | 6 +++--- linux-static/2_build_toolchain.sh | 2 +- macos/1_download_library.sh | 4 ++++ macos/2_build_toolchain.sh | 3 ++- shared/packages.ini | 12 +++++------- shared/packages.sh | 7 +++---- windows/build.cmd | 4 ++-- windows/build_tools.cmd | 13 +++++++++++++ 8 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 windows/build_tools.cmd diff --git a/linux-static/1_download_library.sh b/linux-static/1_download_library.sh index 8fa9a600..86ea9428 100755 --- a/linux-static/1_download_library.sh +++ b/linux-static/1_download_library.sh @@ -102,9 +102,9 @@ download_and_extract $ICUDATA_URL rm -rf $SDL2_DIR download_and_extract $SDL2_URL -# SDL2_image (only needed for lmu2png tool!) -rm -rf $SDL2_IMAGE_DIR -download_and_extract $SDL2_IMAGE_URL +# freeimage (only needed for lmu2png tool!) +rm -rf $FREEIMAGE_DIR +download_and_extract $FREEIMAGE_URL # liblcf rm -rf liblcf diff --git a/linux-static/2_build_toolchain.sh b/linux-static/2_build_toolchain.sh index b7ed6e96..8aeefee3 100755 --- a/linux-static/2_build_toolchain.sh +++ b/linux-static/2_build_toolchain.sh @@ -67,4 +67,4 @@ install_lib_cmake $FMT_DIR $FMT_ARGS install_lib $ICU_DIR/source $ICU_ARGS install_lib_liblcf install_lib $SDL2_DIR $SDL2_ARGS PULSEAUDIO_CFLAGS=-Ixxxdir PULSEAUDIO_LIBS=-lxxxlib -install_lib $SDL2_IMAGE_DIR $SDL2_IMAGE_ARGS +install_lib_cmake $FREEIMAGE_DIR $FREEIMAGE_ARGS diff --git a/macos/1_download_library.sh b/macos/1_download_library.sh index 28e466fd..f225ec93 100755 --- a/macos/1_download_library.sh +++ b/macos/1_download_library.sh @@ -104,6 +104,10 @@ msg " [3] Downloading platform libraries" rm -rf $SDL2_DIR download_and_extract $SDL2_URL +# freeimage (only needed for lmu2png tool!) +rm -rf $FREEIMAGE_DIR +download_and_extract $FREEIMAGE_URL + # liblcf rm -rf liblcf download_liblcf diff --git a/macos/2_build_toolchain.sh b/macos/2_build_toolchain.sh index 2edfdee0..690f225d 100755 --- a/macos/2_build_toolchain.sh +++ b/macos/2_build_toolchain.sh @@ -83,8 +83,9 @@ function build() { install_lib_cmake $FMT_DIR $FMT_ARGS install_lib_icu_cross icu_force_data_install - install_lib_liblcf install_lib $SDL2_DIR $SDL2_ARGS --disable-assembly + install_lib_cmake $FREEIMAGE_DIR $FREEIMAGE_ARGS + install_lib_liblcf } export MAKEFLAGS="-j${nproc:-2}" diff --git a/shared/packages.ini b/shared/packages.ini index 9d7d42b2..a248746a 100644 --- a/shared/packages.ini +++ b/shared/packages.ini @@ -164,10 +164,8 @@ version = 2.30.6 url = "https://libsdl.org/release/SDL2-${version}.tar.gz" anitya_id = 4779 -[SDL2_image] -comment = only needed for lmu2png tool -version = 2.8.0 -url = "https://libsdl.org/projects/SDL_image/release/SDL2_image-${version}.tar.gz" -arguments = "--disable-jpg --disable-png-shared --disable-tif --disable-webp" -anitya_id = 4782 - +[freeimage] +comment = 3.18.0, only needed for lmu2png tool +version = d82954e4adcb6c1b223bd3cb2e953b6bbf54dfcd +url = "https://github.com/carstene1ns/freeimage-easyrpg/archive/${version}.zip" +directory = "freeimage-easyrpg-${version}" diff --git a/shared/packages.sh b/shared/packages.sh index 199c9895..fffbb84c 100644 --- a/shared/packages.sh +++ b/shared/packages.sh @@ -106,8 +106,7 @@ ICUDATA_FILES="icudt*.dat" SDL2_URL="https://libsdl.org/release/SDL2-2.30.6.tar.gz" SDL2_DIR="SDL2-2.30.6" -# only needed for lmu2png tool -SDL2_IMAGE_URL="https://libsdl.org/projects/SDL_image/release/SDL2_image-2.8.0.tar.gz" -SDL2_IMAGE_ARGS="--disable-jpg --disable-png-shared --disable-tif --disable-webp" -SDL2_IMAGE_DIR="SDL2_image-2.8.0" +# 3.18.0, only needed for lmu2png tool +FREEIMAGE_URL="https://github.com/carstene1ns/freeimage-easyrpg/archive/d82954e4adcb6c1b223bd3cb2e953b6bbf54dfcd.zip" +FREEIMAGE_DIR="freeimage-easyrpg-d82954e4adcb6c1b223bd3cb2e953b6bbf54dfcd" diff --git a/windows/build.cmd b/windows/build.cmd index d810e804..dfc11ee6 100644 --- a/windows/build.cmd +++ b/windows/build.cmd @@ -10,7 +10,7 @@ vcpkg install --triplet x86-windows-static --recurse^ libvorbis[core] libsndfile[core] wildmidi[core] libxmp[core]^ speexdsp[core] mpg123[core] opusfile[core] fluidsynth-easyrpg[core]^ inih[cpp] lhasa-easyrpg[core]^ - sdl2-image[core] icu-easyrpg[core] nlohmann-json[core] fmt[core] + sdl2[core] icu-easyrpg[core] nlohmann-json[core] fmt[core] :: Build 64-bit libraries vcpkg install --triplet x64-windows-static --recurse^ @@ -18,4 +18,4 @@ vcpkg install --triplet x64-windows-static --recurse^ libvorbis[core] libsndfile[core] wildmidi[core] libxmp[core]^ speexdsp[core] mpg123[core] opusfile[core] fluidsynth-easyrpg[core]^ inih[cpp] lhasa-easyrpg[core]^ - sdl2-image[core] icu-easyrpg[core] nlohmann-json[core] fmt[core] + sdl2[core] icu-easyrpg[core] nlohmann-json[core] fmt[core] diff --git a/windows/build_tools.cmd b/windows/build_tools.cmd new file mode 100644 index 00000000..23213e29 --- /dev/null +++ b/windows/build_tools.cmd @@ -0,0 +1,13 @@ +:: Builds the dependencies for EasyRPG Tools + +call helper\prepare.cmd + +:: Build 32-bit libraries +:: Using [core] everywhere to prevent surprises when new default-features are +:: added to libraries. +vcpkg install --triplet x86-windows-static --recurse^ + jasper[core] libwebp[core] freeimage[core] + +:: Build 64-bit libraries +vcpkg install --triplet x64-windows-static --recurse^ + jasper[core] libwebp[core] freeimage[core] From 96147555c48fb8b729c166ed01c89203587c3666 Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Tue, 11 Jun 2024 22:47:17 +0200 Subject: [PATCH 2/2] Add stable compilation workflow --- .github/workflows/stable-compilation.yml | 68 ++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/stable-compilation.yml diff --git a/.github/workflows/stable-compilation.yml b/.github/workflows/stable-compilation.yml new file mode 100644 index 00000000..6916298f --- /dev/null +++ b/.github/workflows/stable-compilation.yml @@ -0,0 +1,68 @@ +name: Stable Compilation + +on: + push: + pull_request: + workflow_dispatch: + inputs: + git-ref: + description: Git Ref (Optional) + required: false + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + docker: + name: ${{ matrix.image }} + runs-on: ubuntu-latest + container: + image: ${{ matrix.image }} + + strategy: + fail-fast: false + matrix: + image: + # version of: # gcc/g++ | support end # + # -------------------------------------------- + - ubuntu:22.04 # 11.2.0 | LTS (6/27) # + - debian:12 # 12.2.0 | stable (6/26) # + + steps: + - name: Install dependencies + run: | + export DEBIAN_FRONTEND="noninteractive" + apt-get update + apt-get install -yqq --no-install-recommends --no-install-suggests \ + ca-certificates build-essential cmake ninja-build meson git \ + autoconf autoconf-archive automake autotools-dev libtool \ + sed gawk patch perl pkg-config curl unzip libpulse-dev + + - name: Clone Repository + uses: actions/checkout@v4 + if: github.event.inputs.git-ref == '' + - name: Clone Repository (with custom ref) + uses: actions/checkout@v4 + if: github.event.inputs.git-ref != '' + with: + ref: ${{ github.event.inputs.git-ref }} + + - name: Download + run: | + cd linux-static + ./1_download_library.sh + + - name: Build and Install + run: | + cd linux-static + ./2_build_toolchain.sh + + - name: Cleanup + run: | + cd linux-static + ./3_cleanup.sh