Skip to content

Building from Source

digdat0 edited this page Jul 24, 2026 · 1 revision

You only need this if you want to compile HaulNX yourself — most people should just grab HaulNX.nro from the latest release.

HaulNX is a graphical app built on the Plutonium UI library (SDL2), with the devkitPro toolchain (devkitA64 + libnx). Plutonium is included as a git submodule and built automatically.

Prerequisites

  1. Install devkitPro and the switch-dev group — see the Getting Started guide. Ensure DEVKITPRO is set (on Windows, use the MSYS2 shell that ships with devkitPro).
  2. Install the portlibs the app links against (codec deps are pulled in automatically):
    dkp-pacman -S switch-curl switch-libarchive switch-zlib \
                  switch-sdl2 switch-sdl2_ttf switch-sdl2_image \
                  switch-sdl2_gfx switch-sdl2_mixer

Build

git clone --recursive https://github.com/digdat0/HaulNX
cd HaulNX
make            # builds the Plutonium lib (submodule), then HaulNX.nro
make clean

If you cloned without --recursive, run git submodule update --init first. On Windows, build inside the devkitPro MSYS2 shell:

/c/devkitPro/msys2/usr/bin/bash.exe -lc "cd /c/path/to/HaulNX && make"

Output is HaulNX.nro. The version lives in VERSION (the single source of truth) and is baked into the build and include/version.h automatically. To publish a release, sh release.sh tags a GitHub release with that version, attaches the .nro, and uses the matching CHANGELOG.md section as the notes.

Networking only works on real hardware

devkitPro's libcurl uses the libnx ssl system-service backend, verifying against the console's own certificate store. This works on real hardware. Emulators that stub the ssl service (e.g. Ryujinx) will fail HTTPS regardless of the app, so metadata browsing and downloads must be tested on hardware. Every request's result is logged to debug.log.

Source layout

Path Responsibility
source/Main.cpp, source/MainApplication.cpp Plutonium GUI (screens, tabs, navigation, input)
include/MainApplication.hpp, include/TableList.hpp UI layout + custom table-list element
net.* libnx sockets + libcurl (downloads, HTTP GET, logging)
archive.c / iarchive.h archive.org metadata + download URLs
queue.* pipelined download + extract workers (resume, verify, persist, reorder)
extract.* libarchive zip/7z/rar/tar extraction
config.* dl_sources.json / credentials / prefs load + save
fsutil.* mkdir-p, move, recursive delete, free-space
update.* GitHub release check + in-app self-update
httpsrv.* tiny LAN HTTP receiver behind Import collection and update-over-Wi-Fi
md5.* MD5 for download verification
jsonutil.*, jsmn.* JSON parsing (vendored jsmn)
i18n.*, romfs/lang/, tools/gen_i18n.py translations — English strings are generated into the binary from romfs/lang/en.json; the other 24 languages load from romfs
tools/app-utility/ the App Utility — self-contained HTML collection editor + LAN push tool, attached to every release
Plutonium/ UI library (git submodule)

The backend (net/archive/queue/extract/config/fsutil/md5/json/ i18n) is plain C; only the UI layer is Plutonium C++.

Clone this wiki locally