Skip to content

Commit

Permalink
Merge pull request #178 from carstene1ns/add-freeimage
Browse files Browse the repository at this point in the history
Add freeimage and workflow
  • Loading branch information
Ghabry authored Sep 22, 2024
2 parents 5e84c8c + 9614755 commit 990e522
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 18 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/stable-compilation.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions linux-static/1_download_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linux-static/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions macos/1_download_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion macos/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
12 changes: 5 additions & 7 deletions shared/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
7 changes: 3 additions & 4 deletions shared/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

4 changes: 2 additions & 2 deletions windows/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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^
libpng[core] expat[core] pixman[core] freetype[core,zlib] harfbuzz[freetype]^
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]
13 changes: 13 additions & 0 deletions windows/build_tools.cmd
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 990e522

Please sign in to comment.