diff --git a/README.md b/README.md index c122e06..9d6ae60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # sealeo -A docker image to facilitate building homebrew apps across multi-platforms. Based on [Spheal](https://gitlab.com/4tu/spheal), but has support for both amd64 and arm64 architectures. +A docker image to facilitate building homebrew apps across multi-platforms. Based on [Spheal](https://gitlab.com/4tu/spheal), but has support for both arm64 and amd64 architectures. baby @@ -11,7 +11,7 @@ Building is deterministic since the deps are locked into the image, and also pot Can be executed from the root of your [chesto](https://github.com/fortheusers/chesto) git project. Export the PLATFORM env variable to point to the target that you want to build for. ``` -export PLATFORM=switch # or wiiu, 3ds, wii, pc, pc-sdl1 +export PLATFORM=switch # or wiiu, 3ds, wii, pc docker run -v $(pwd):/code -it ghcr.io/fortheusers/sealeo "make $PLATFORM" ``` @@ -26,12 +26,10 @@ This can be useful for non-Chesto projects or to debug code interactively. ## what's inside The image is based on `debian`, inside is the following: -- sdl1 deps/portlibs for PC, 3ds, wii -- sdl2 deps/portlibs for PC, wiiu, switch -- dkp-pacman configured with dkP's repos +- sdl2 and curl for PC, wiiu, switch, wii, 3ds - dkP toolchains: devkitA64, devkitARM, devkitPPC -- platform libs: libnx, libctru, libogc, wut +- platform libs: wut, libnx, libogc, libctru -If you don't need all of the above in one image, you're better off trying out one of [dkP's own containers](https://hub.docker.com/u/devkitpro/) and using that as a base. Sealeo does not use this approach in favor of working across multiple architectures, having all toolchains in one image, and being able to control more about what makes it into the image in the future. +If you don't need all of the above in one image, you're better off trying out one of [dkP's own containers](https://hub.docker.com/u/devkitpro/) and using that as a base. Sealeo does not use this approach in favor of working across multiple architectures, having all toolchains in one image, and being able to control which versions make it into the image. The homebrew targets are only possible thanks to dkP's toolchains, you can [support them on Patreon](https://www.patreon.com/devkitPro) for their efforts. diff --git a/dependency_helper.sh b/dependency_helper.sh index e4faea3..2c1512f 100755 --- a/dependency_helper.sh +++ b/dependency_helper.sh @@ -5,7 +5,7 @@ # but is also useful when setting up a new env # Before running it, you should export the desired PLATFORM environment -# variable ( one of pc, pc-sdl1, switch, 3ds, wii, wiiu, all ) +# variable ( one of pc, switch, 3ds, wii, wiiu, all ) # eg. PLATFORM=switch ./dependency_helper.sh # It may be easier to follow the README.md instructions for the @@ -18,16 +18,17 @@ main_platform_logic () { pc) setup_deb_sdl_deps ;; - pc-sdl1) - setup_deb_sdl_deps - ;; + # html5) + # apt-get -y install emscripten + # ;; switch) # uses libnx setup_dkp_repo ${DKP}pacman --noconfirm -S devkitA64 libnx switch-tools switch-curl switch-bzip2 switch-freetype switch-libjpeg-turbo switch-libwebp switch-sdl2 switch-sdl2_gfx switch-sdl2_image switch-sdl2_ttf switch-zlib switch-libpng switch-mesa switch-sdl2_mixer ;; 3ds) # uses libctru setup_dkp_repo - ${DKP}pacman --noconfirm -S devkitARM 3ds-sdl 3ds-sdl_image 3ds-sdl_mixer 3ds-sdl_gfx 3ds-sdl_ttf libctru citro3d 3dstools 3ds-curl 3ds-mbedtls + ${DKP}pacman --noconfirm -S devkitARM libctru citro3d 3dstools 3ds-curl 3ds-mbedtls 3ds-cmake 3ds-mpg123 3ds-opusfile 3ds-libogg 3ds-libopus + install_3ds_sdl2 ;; wii) # uses libogc setup_dkp_repo @@ -71,6 +72,23 @@ install_wii_curl () { rm -rf wii-packages } +install_3ds_sdl2 () { + # https://wiki.libsdl.org/SDL2/README/n3ds + + libs=("SDL" "SDL_ttf" "SDL_image") + export DEVKITPRO=/opt/devkitpro + export DEVKITARM=/opt/devkitpro/devkitARM + + for lib in "${libs[@]}"; do + git clone --recursive https://github.com/libsdl-org/${lib}.git -b SDL2 + cd ${lib} + cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release + cmake --build build + cmake --install build + cd .. + done +} + install_container_deps () { apt-get update && apt-get -y install wget libxml2 xz-utils lzma build-essential haveged curl libbz2-dev haveged & @@ -78,11 +96,10 @@ install_container_deps () { } setup_deb_sdl_deps () { - # Sets up both sdl1 and sdl2 requirements for ubuntu - apt-get -y install libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev zlib1g-dev gcc g++ libcurl4-openssl-dev wget git libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libfreetype-dev libsdl-mixer1.2-dev libmpg123-dev + apt-get -y install libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev zlib1g-dev gcc g++ libcurl4-openssl-dev wget git # FYI for archlinux systems: - # pacman --noconfirm -S sdl2 sdl2_image sdl2_gfx sdl2_ttf sdl sdl_image sdl_gfx sdl_ttf + # pacman --noconfirm -S sdl2 sdl2_image sdl2_gfx sdl2_ttf } export DKP="" @@ -118,7 +135,7 @@ install_container_deps main_platform_logic # handle the "all" target by looping through all platforms -all_plats=( pc pc-sdl1 wiiu switch 3ds wii ) +all_plats=( pc wiiu switch 3ds wii ) if [[ $PLATFORM == "all" ]]; then for plat in "${all_plats[@]}" do