Skip to content

Commit

Permalink
Merge pull request #161 from carstene1ns/feature/wiiu
Browse files Browse the repository at this point in the history
WiiU support
  • Loading branch information
Ghabry authored Dec 4, 2023
2 parents d5f788e + 0c20dcc commit 094b21f
Show file tree
Hide file tree
Showing 22 changed files with 280 additions and 35 deletions.
2 changes: 1 addition & 1 deletion 3ds/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $TREMOR_DIR $TREMOR_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
Expand Down
2 changes: 1 addition & 1 deletion 3ds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Prequisites:

- Install devkitARM, libctru, citro3d, citro2d, tex3ds and 3dstools.
- Install devkitARM, libctru, citro3d, citro2d, tex3ds, 3dstools and 3ds-cmake.
(Environment variables `DEVKITPRO` and `DEVKITARM` need to be set)

### Local build process:
Expand Down
2 changes: 1 addition & 1 deletion android/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function build() {
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
Expand Down
2 changes: 1 addition & 1 deletion emscripten/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
Expand Down
2 changes: 1 addition & 1 deletion ios/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
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 @@ -49,7 +49,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
Expand Down
2 changes: 1 addition & 1 deletion macos/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function build() {
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
Expand Down
28 changes: 7 additions & 21 deletions shared/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function install_lib_cmake {
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS $CPPFLAGS" \
-DCMAKE_INSTALL_LIBDIR=lib $CMAKE_AR $CMAKE_NM $CMAKE_RANLIB \
-DCMAKE_INSTALL_PREFIX=$PLATFORM_PREFIX -DCMAKE_SYSTEM_NAME=$CMAKE_SYSTEM_NAME \
-DCMAKE_PREFIX_PATH=$PLATFORM_PREFIX $@
-DCMAKE_PREFIX_PATH=$PLATFORM_PREFIX $CMAKE_EXTRA_ARGS $@
cmake --build build --target clean
cmake --build build --target install
)
Expand Down Expand Up @@ -168,26 +168,6 @@ function install_lib_zlib {
)
}

function install_lib_mpg123 {
msg "**** Building libmpg123 ****"

(cd $MPG123_DIR
$CONFIGURE_WRAPPER ./configure --prefix=$PLATFORM_PREFIX --disable-shared --enable-static \
--disable-dependency-tracking --enable-silent-rules \
--host=$TARGET_HOST --cache-file="$PLATFORM_PREFIX/config.cache" \
--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network \
--disable-int-quality --with-default-audio=dummy --with-optimization=2 $@
make clean
# only build libmpg123
make src/libmpg123/libmpg123.la
# custom installation
mkdir -p $PLATFORM_PREFIX/include $PLATFORM_PREFIX/lib/pkgconfig
install -m644 src/libmpg123/{fmt,mpg}123.h $PLATFORM_PREFIX/include
install -m644 libmpg123.pc $PLATFORM_PREFIX/lib/pkgconfig
./libtool --mode=install install src/libmpg123/libmpg123.la $PLATFORM_PREFIX/lib
)
}

function install_lib_liblcf {
if [ "$BUILD_LIBLCF" == "1" ]; then
install_lib liblcf --disable-update-mimedb --disable-tools
Expand Down Expand Up @@ -332,6 +312,12 @@ function patches_common {
)
fi

# lhasa: disable binary and tests
(cd $LHASA_DIR
perl -pi -e 's/ src test//' Makefile.am
autoreconf -fi
)

cp icudt*.dat $ICU_DIR/source/data/in
(cd $ICU_DIR/source
chmod u+x configure
Expand Down
3 changes: 3 additions & 0 deletions shared/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ url = "https://gitlab.xiph.org/xiph/tremor/-/archive/${version}/tremor-${version
[mpg123]
version = 1.32.3
url = "https://www.mpg123.de/download/mpg123-${version}.tar.bz2"
arguments = "--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network
--disable-int-quality --with-default-audio=dummy --with-optimization=2
--disable-components --enable-libmpg123"
anitya_id = 12413

[libsndfile]
Expand Down
3 changes: 3 additions & 0 deletions shared/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ TREMOR_URL="https://gitlab.xiph.org/xiph/tremor/-/archive/7c30a66346199f3f09017a
TREMOR_DIR="tremor-7c30a66346199f3f09017a09567c6c8a3a0eedc8"

MPG123_URL="https://www.mpg123.de/download/mpg123-1.32.3.tar.bz2"
MPG123_ARGS="--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network \
--disable-int-quality --with-default-audio=dummy --with-optimization=2 \
--disable-components --enable-libmpg123"
MPG123_DIR="mpg123-1.32.3"

LIBSNDFILE_URL="https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion switch/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $TREMOR_DIR $TREMOR_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $LIBSAMPLERATE_DIR $LIBSAMPLERATE_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
Expand Down
2 changes: 1 addition & 1 deletion switch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Prequisites:

- Install devkitA64, libnx and switch-tools.
- Install devkitA64, libnx, switch-tools, switch-cmake.
(Environment variables `DEVKITPRO` needs to be set)

### Local build process:
Expand Down
2 changes: 1 addition & 1 deletion vita/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
Expand Down
2 changes: 1 addition & 1 deletion wii/1_download_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export WORKSPACE=$PWD
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/../shared/import.sh

# Override ICU version to 58.1, custom SDL
# Override ICU version to 58.1
source $SCRIPT_DIR/packages.sh

msg " [1] Checking devkitPPC"
Expand Down
4 changes: 2 additions & 2 deletions wii/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export WORKSPACE=$PWD
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/../shared/import.sh

# Override ICU version to 58.1, custom SDL
# Override ICU version to 58.1
source $SCRIPT_DIR/packages.sh

# Number of CPU
Expand Down Expand Up @@ -96,7 +96,7 @@ install_lib $PIXMAN_DIR $PIXMAN_ARGS --disable-vmx
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $TREMOR_DIR $TREMOR_ARGS
install_lib_mpg123
install_lib $MPG123_DIR $MPG123_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
Expand Down
2 changes: 1 addition & 1 deletion wii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Prequisites:

- Install devkitPPC, libogc, libfat-ogc and gamecube-tools.
- Install devkitPPC, libogc, libfat-ogc, gamecube-tools and wii-cmake.
(Environment variables `DEVKITPRO` and `DEVKITPPC` need to be set)

### Local build process:
Expand Down
5 changes: 5 additions & 0 deletions wiiu/0_build_everything.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

./1_download_library.sh \
&& ./2_build_toolchain.sh \
&& ./3_cleanup.sh
100 changes: 100 additions & 0 deletions wiiu/1_download_library.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

# abort on errors
set -e

export WORKSPACE=$PWD

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/../shared/import.sh

msg " [1] Checking devkitPPC"

if [[ -z $DEVKITPRO || -z $DEVKITPPC ]]; then
echo "Setup devkitPPC properly. \$DEVKITPRO and \$DEVKITPPC need to be set."
exit 1
fi

msg " [2] Downloading generic libraries"

# zlib
rm -rf $ZLIB_DIR
download_and_extract $ZLIB_URL

# libpng
rm -rf $LIBPNG_DIR
download_and_extract $LIBPNG_URL

# freetype
rm -rf $FREETYPE_DIR
download_and_extract $FREETYPE_URL

# harfbuzz
#rm -rf $HARFBUZZ_DIR
#download_and_extract $HARFBUZZ_URL

# pixman
rm -rf $PIXMAN_DIR
download_and_extract $PIXMAN_URL

# expat
rm -rf $EXPAT_DIR
download_and_extract $EXPAT_URL

# libogg
rm -rf $LIBOGG_DIR
download_and_extract $LIBOGG_URL

# tremor
rm -rf $LIBVORBIS_DIR
download_and_extract $LIBVORBIS_URL

# mpg123
rm -rf $MPG123_DIR
download_and_extract $MPG123_URL

# libxmp-lite
rm -rf $LIBXMP_LITE_DIR
download_and_extract $LIBXMP_LITE_URL

# speexdsp
rm -rf $SPEEXDSP_DIR
download_and_extract $SPEEXDSP_URL

# opus
rm -rf $OPUS_DIR
download_and_extract $OPUS_URL

# opusfile
rm -rf $OPUSFILE_DIR
download_and_extract $OPUSFILE_URL

# FluidLite
rm -rf $FLUIDLITE_DIR
download_and_extract $FLUIDLITE_URL

# inih
rm -rf $INIH_DIR
download_and_extract $INIH_URL

# lhasa
rm -rf $LHASA_DIR
download_and_extract $LHASA_URL

# fmt
rm -rf $FMT_DIR
download_and_extract $FMT_URL

# ICU
rm -rf $ICU_DIR
download_and_extract $ICU_URL

# icudata
rm -f $ICUDATA_FILES
download_and_extract $ICUDATA_URL

msg " [3] Downloading platform libraries"

# liblcf
rm -rf liblcf
download_liblcf
Loading

0 comments on commit 094b21f

Please sign in to comment.