diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c7a6430 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,78 @@ +FROM devkitpro/devkita64:latest AS build + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + build-essential \ + autoconf \ + meson \ + bison \ + flex \ + libtool \ + pkg-config \ + git \ + gimp \ + python3 \ + python3-pip \ + python3-mako + +RUN dkp-pacman -Syu --noconfirm \ + switch-bzip2 \ + switch-dav1d \ + switch-freetype \ + switch-glm \ + switch-harfbuzz \ + switch-libarchive \ + switch-libass \ + switch-libfribidi \ + switch-libjpeg-turbo \ + switch-libpng \ + switch-libwebp \ + switch-libssh2 \ + switch-mbedtls \ + switch-ntfs-3g \ + switch-lwext4 \ + switch-pkg-config \ + dkp-meson-scripts \ + dkp-toolchain-vars + +RUN git clone --recurse-submodules https://github.com/auggeythecat/SwitchWave.git + +WORKDIR /SwitchWave + +RUN git clone --recurse-submodules https://github.com/DarkMatterCore/libusbhsfs.git && \ + cd libusbhsfs && \ + make BUILD_TYPE=GPL install + +RUN git clone https://github.com/sahlberg/libsmb2.git && \ + cd libsmb2 && \ + make -f Makefile.platform switch_install + +RUN ls /opt/devkitpro + +RUN wget https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.2.tar.gz && \ + tar -xzf libnfs-5.0.2.tar.gz && \ + cd libnfs-libnfs-5.0.2 && \ + patch -Np1 -i ../misc/libnfs/switch.patch && \ + . /opt/devkitpro/switchvars.sh && \ + ./bootstrap && \ + ./configure --prefix="${PORTLIBS_PREFIX}" --host=aarch64-none-elf --without-libkrb5 \ + --disable-shared --enable-static --disable-werror --disable-utils --disable-examples && \ + make && \ + make install && \ + install -Dm644 COPYING "/opt/devkitpro/portlibs/switch/licenses/switch-libnfs/LICENSE" + +RUN make configure-ffmpeg && \ + make build-ffmpeg -j$(nproc) + +RUN make configure-uam && \ + make build-uam + +RUN make configure-mpv && \ + make build-mpv + +RUN make dist -j$(nproc) + +FROM scratch + +COPY --from=build /SwitchWave/build / diff --git a/Makefile b/Makefile index 8989d48..b295a7f 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ $(ROMFS)/shaders/%_fsh.dksh: $(SHADERS)/%_fsh.glsl $(ROMFS)/textures/%.bc: $(TEXTURES)/%.svg @echo "BCn " $@ @mkdir -p $(dir $@) - @misc/gimp-bcn-convert.sh $< $@ > /dev/null 2>&1 + @misc/gimp-bcn-convert.sh $< $@ run: $(OUTPUT) @nxlink -r 100 -s $(OUTPUT) -p SwitchWave/SwitchWave.nro diff --git a/misc/gimp-bcn-convert.sh b/misc/gimp-bcn-convert.sh index b4229b7..7fbe60e 100755 --- a/misc/gimp-bcn-convert.sh +++ b/misc/gimp-bcn-convert.sh @@ -1,3 +1,4 @@ +#!/bin/bash # file-in file-out if ! [ -x "$(command -v gimp)" ]; then diff --git a/src/main.cpp b/src/main.cpp index 41d26b1..3b3dc94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,6 +39,8 @@ using namespace std::chrono_literals; +extern "C" u32 __nx_applet_exit_mode, __nx_nv_service_type, __nx_nv_transfermem_size; + namespace { PadState g_pad; @@ -48,8 +50,6 @@ bool g_application_mode; FsFileSystem g_bis_user_fs; -extern "C" u32 __nx_applet_exit_mode, __nx_nv_service_type, __nx_nv_transfermem_size; - extern "C" void userAppInit(void) { // Keep the main thread above others so that the program stays responsive // when doing software decoding diff --git a/src/ui/ui_main_menu.cpp b/src/ui/ui_main_menu.cpp index 0cc8ead..6fd2429 100644 --- a/src/ui/ui_main_menu.cpp +++ b/src/ui/ui_main_menu.cpp @@ -49,9 +49,10 @@ namespace sw::ui { using namespace std::chrono_literals; +extern "C" const char mpv_version[]; + namespace { -extern "C" const char mpv_version[]; std::string_view app_version_str = "v" APP_VERSION, app_build_date_str = __DATE__ " " __TIME__;