Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 /
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions misc/gimp-bcn-convert.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# file-in file-out

if ! [ -x "$(command -v gimp)" ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/ui/ui_main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__;

Expand Down