### retcomm CLI quick start commands Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/README.md Run these commands in order to set up and use the retcomm CLI. The first two list and update the catalog. Then copy the example config to ~/.config/retcomm/config.json and edit library_root, bios_root, saves_root, and platform_folders. After that, scan the library, scan BIOS, view the library, install, launch, and uninstall a title. Uninstall keeps saves by default. ```sh ./build/retcomm list ./build/retcomm catalog update mkdir -p ~/.config/retcomm cp config.example.json ~/.config/retcomm/config.json # edit library_root / bios_root / saves_root / platform_folders ./build/retcomm scan ./build/retcomm bios scan ./build/retcomm library ./build/retcomm install masters-of-teras-kasi-psx ./build/retcomm launch masters-of-teras-kasi-psx ./build/retcomm uninstall masters-of-teras-kasi-psx # keeps saves by default ``` -------------------------------- ### Install FreeType with vcpkg Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Install FreeType binaries using vcpkg on Windows. Run 'vcpkg integrate install' after installation to make the library available to your project. ```shell vcpkg install freetype --triplet=x64-windows ``` ```shell vcpkg integrate install ``` -------------------------------- ### Install lunasvg with vcpkg Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Install lunasvg binaries using vcpkg on Windows. ```shell vcpkg install lunasvg --triplet=x64-windows ``` -------------------------------- ### Manual CI-style Linux Build and Package Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Manual build steps for CI-style packaging: configure with CMake, build, install, then create an AppImage. build-appimage.sh downloads linuxdeploy into dist/tools/ once; set RETRO_HUB_LINUXDEPLOY to use a local copy. ```sh cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$PWD/out" cmake --build build -j && cmake --install build ./packaging/linux/build-appimage.sh "$PWD/out" 0.1.1 x86_64 ``` -------------------------------- ### index.json structure example Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/CATALOG.md Example of the index.json file that the catalog provides. It includes schema version, name, catalog date, release tag, platform defaults for BIOS identity, and a list of title identifiers. ```json { "schema_version": 1, "name": "Retro supported titles", "catalog_date": "2026-07-29T18:41:00Z", "release_tag": "v2026.07.29.184100.12", "platform_defaults": { "gba": { "bios_identity": { "required": true, "crc32": ["81977335"], "…": "…" } }, "psx": { "bios_identity": { "required": true, "crc32": ["37157331"], "…": "…" } } }, "titles": ["metal-warriors-snes", "..."] } ``` -------------------------------- ### Fetch runtime: python3 scripts/fetch_runtime.py --platform --prefix out Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Fetch the latest Retro-Runtime release (including prereleases) into the install prefix. The command validates the runner against the submodule, rejects unavailable platforms, mismatched archives, and unlisted files. On success it overwrites out/bin/retro-core-runner, installs licenses, and writes runtime-baked.json. Use RETRO_RUNTIME_MANIFEST_URL or --manifest to pin a specific release. ```sh python3 scripts/fetch_runtime.py --platform --prefix out ``` -------------------------------- ### Install layout directory tree Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/ARCHITECTURE.md Shows the directory structure under ~/.local/share/retcomm/ for apps, toolchains, sdks, engines, and library index. Used to understand where installs, toolchains, and shared engine sources are stored. ```text ~/.local/share/retcomm/ apps// install.json # method zip|build, tag, binary, pack pins current -> releases// # symlink (or current.path / junction on Windows) releases// src/current/ # game source when method=build psxrecomp -> ../../engines/… # shared engine link (after promote) recomp-ui -> ../../engines/… toolchains/// # managed C/cmake packs sdks/// # snesrecomp / psxrecomp tools packs engines/// # shared psxrecomp / recomp-ui source (by pin) library-index.json state.json # reserved (hub-wide prefs / last launch) ``` -------------------------------- ### Install plutosvg with vcpkg Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Install plutosvg binaries using vcpkg on Windows. Alternatively, enable the plutosvg feature when building imgui from vcpkg. ```shell vcpkg install plutosvg --triplet=x64-windows ``` ```shell vcpkg install imgui[plutosvg] --triplet=x64-windows ``` -------------------------------- ### Retro Hub Direct mode invocation Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/RELEASES.md Launches the hub in Direct mode, playing one title in its window without library pages or setup wizard. Available on all operating systems; since revision 3 it opens on the title's home page (with Play, System, Gamepads, Mods, Quit, and since updates 1 also Update, cover art, and the activity console). Use flags like --run-core, --rom, --package, and --boot; without --rom the hub exits with code 2 before the window opens. Options: --no-gl skips lending GL to the core, --opt sets a core option (overriding stored values), and --boot plays immediately and exits when the game closes. ```shell retro-hub --run-core [--package ] --rom [--title-dir ] \ [--tpak1-rom ] [--tpak1-save ] [--no-gl] [--opt key=value]... [--boot] ``` -------------------------------- ### Build Local Linux AppImage Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Builds a local AppImage for Linux. Optionally override the version by passing it as an argument (e.g., 0.1.2). Builds icons, SDL3 (cached under .cache/sdl3 if not already installed), Retro, and writes dist/Retro-Launcher-linux-.AppImage. ```sh ./packaging/linux/build-local-appimage.sh # optional version override: ./packaging/linux/build-local-appimage.sh 0.1.2 ``` -------------------------------- ### One-command debug build script Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/ANDROID.md Builds a debug APK for arm64-v8a by default. Use --abi x86_64 and --install emulator-5554 to build for an emulator and install it. The script finds the SDK with the pinned NDK, picks JDK 17 if needed, and runs the APK verifier. ```sh tools/build-android-debug.sh # arm64-v8a tools/build-android-debug.sh --abi x86_64 --install emulator-5554 ``` -------------------------------- ### Build and package Windows release: package.ps1 workflow Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Commands to build and package a Windows release. Requires a Release build with retcomm, retro-hub, and retcomm-portable; optional Inno Setup 6 on PATH or -InnoSetup. The packaging script signs executables and DLLs when a certificate is configured. ```powershell ./packaging/make-icons.sh # from Git Bash / WSL, for assets/retcomm.ico cmake --build build --config Release cmake --install build --config Release --prefix out ./packaging/windows/package.ps1 -Prefix out -Version 0.1.1 -VcpkgBin path\to\vcpkg\bin -Arch x64 ``` -------------------------------- ### macOS linker options for install name rewriting Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/CMakeLists.txt Adds linker option to increase Mach-O header padding on macOS, allowing packaging to rewrite Homebrew install names to @rpath/@loader_path without install_name_tool failing. ```cmake if(APPLE) add_link_options(-Wl,-headerpad_max_install_names) endif() ``` -------------------------------- ### retro-hub --version output Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/RELEASES.md Output of `retro-hub --version` printed before SDL starts. Each line is a `key value` pair, exit code 0. The `title_app` line indicates the title-app mode revision; `updates` is the Update page's revision; `build` is `release` for CI releases and `local` otherwise; a build without the hub-runner link prints only the first three lines and `direct_mode 0`. ```text retro-hub 0.1.2 version 0.1.2 commit 8f538f7218855e94cdcba437a23245a4e1be22f8 build release link_protocol 1.0 rcore_abi_major 0 rcore_draft_revision 5 direct_mode 4 direct_mode_flags --run-core --package --rom --title-dir --tpak1-rom --tpak1-save --no-gl --opt --boot --title --core --runner --hub --check-title title_app 1 updates 1 runner_lookup RETRO_CORE_RUNNER exe_dir/retro-core-runner data_dir/runtime//retro-core-runner ``` -------------------------------- ### Manual build steps Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/ANDROID.md Manual steps to build a release APK: clone the pinned SDL, set environment variables, run the build script, and invoke Gradle with version properties. Requires ANDROID_HOME and ANDROID_SDK_ROOT to point to the same SDK. ```sh git clone --branch release-3.2.16 --depth 1 https://github.com/libsdl-org/SDL.git .cache/android/SDL export ANDROID_HOME="$HOME/Android/Sdk" export RETCOMM_RUNTIME_DIR="$HOME/Documents/GitHub/Retro-Runtime" bash scripts/build-android.sh cd android ./gradlew :app:assembleRelease -PretroVersion=0.1.1 -PretroVersionCode=1001 ``` -------------------------------- ### Compilation hints for plutovg Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Manual build instructions for plutovg: compile all source files in plutovg/source/*.c and add include directories plutovg/include and plutovg/stb. ```text Compile all source files in `plutovg/source/*.c` + Add include directory: `plutovg/include` + `plutovg/stb` ``` -------------------------------- ### Portable usage after unzipping Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Usage for the portable release after unzipping the release zip. The first command launches the hub UI, and the second runs the CLI. ```text Retro Launcher.exe # hub UI Retro Launcher.exe cli list # CLI ``` -------------------------------- ### Build application icons with ./packaging/make-icons.sh Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Run from the repository root to generate the 512x512 PNG icon from assets/retcomm.svg and an ICO when ImageMagick is available. The PNG is written to assets/retcomm.png at the linuxdeploy maximum size; a 1024px version is rejected. The script must be invoked via the packaging/make-icons.sh path. ```sh ./packaging/make-icons.sh ``` -------------------------------- ### Build from source with CMake Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/README.md Commands to initialize submodules, configure with CMake, build, and run the retcomm and retro-hub executables. Requires CMake 3.24+, C++17, and libcurl. ```sh git submodule update --init # third_party/Retro-Runtime: the core runtime cmake -G Ninja -S . -B build cmake --build build -j ./build/retcomm --help ./build/retro-hub # SDL3 + ImGui dashboard ``` -------------------------------- ### CMake build commands for Retro Launcher Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/CMakeLists.txt Commands to configure, build, and run the Retro Launcher. The build directory is 'build', and the executable 'retcomm' is used for listing, while 'retro-hub' is the main launcher. ```bash cmake -G Ninja -S . -B build cmake --build build -j ./build/retcomm list ./build/retro-hub ``` -------------------------------- ### Compilation hints for plutosvg Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Manual build instructions for plutosvg: compile plutosvg/source/plutosvg.c, add include directory plutosvg/source, define PLUTOSVG_HAS_FREETYPE, and link with plutovg and freetype. ```text Compile `plutosvg/source/plutosvg.c` + Add include directory: `plutosvg/source` + Add define: `PLUTOSVG_HAS_FREETYPE` + Link with: plutovg, freetype ``` -------------------------------- ### Build macOS App and DMG Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Builds the macOS app bundle and DMG. Produces 'Retro Launcher.app' and 'Retro-Launcher-macos-.dmg' under dist/. The build fails if any /usr/local or /opt/homebrew load command remains, and ad-hoc codesign is applied. ```sh ./packaging/macos/build-app.sh "$PWD/out" 0.1.1 arm64 ``` -------------------------------- ### Build Windows dev zip from Linux: build-dev-zip.sh variants Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Commands to build a dev test zip cross-compiled from Linux. Needs mingw-w64 and cross libs; SDL3 is cross-built once. Produces dist/Retro-Launcher-windows-x64-dev.zip with layout matching the release package. PORTABLE=1 also builds the single-exe stub; STRIP=0 keeps symbols. ```sh ./packaging/windows/build-dev-zip.sh # version → -dev. ./packaging/windows/build-dev-zip.sh 0.6.4 # explicit label PORTABLE=1 ./packaging/windows/build-dev-zip.sh # also the single-exe stub STRIP=0 ./packaging/windows/build-dev-zip.sh # keep symbols in the zip ``` -------------------------------- ### retro-hub command-line usage for title-app mode Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/RELEASES.md Shows the command-line options for running retro-hub in title-app mode. Use --title to specify a title.json or directory, --core to override the core, --package for a shim, --runner for a runner, --rom for a ROM image, --boot to boot directly, --opt for key=value options, --hub to re-execute another hub, and --check-title to validate the title without launching. ```sh retro-hub [--title ] [--core ] [--package ] [--runner ] [--rom ] [--boot] [--opt key=value]... [--hub ] [--check-title] ``` -------------------------------- ### Local hub build script usage (Linux and Windows) Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/README.md Usage for scripts/build-local.sh and scripts/build-local.ps1 to build retro-hub and retro-core-runner into a flat prefix. The script prints RETRO_HUB= as its last line. ```sh scripts/build-local.sh [--debug] [--out DIR] [--build DIR] [--runtime ] [--jobs N] ``` ```powershell scripts/build-local.ps1 [-Debug] [-Out DIR] [-Build DIR] [-Runtime DIR] [-Jobs N] # Windows (vcpkg) ``` -------------------------------- ### Run Linux AppImage Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/packaging/README.md Runs the built AppImage. Use the 'cli list' argument to run the CLI. If FUSE is unavailable, use --appimage-extract-and-run to run without FUSE. ```sh ./dist/Retro-Launcher-linux-*.AppImage ./dist/Retro-Launcher-linux-*.AppImage cli list # if FUSE is unavailable: ./dist/Retro-Launcher-linux-*.AppImage --appimage-extract-and-run ``` -------------------------------- ### Smoke-test pack download command Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/ARCHITECTURE.md Command to ensure a toolchain pack is downloaded, optionally for a specific title. Used to verify pack availability before building. ```bash retcomm pack ensure toolchain ``` -------------------------------- ### Enable FreeType in imconfig.h Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Add this define to your imconfig.h file to enable FreeType rasterization instead of stb_truetype. ```c #define IMGUI_ENABLE_FREETYPE ``` -------------------------------- ### Optional catalog configuration in config.json Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/CATALOG.md Optional configuration for the catalog source and auto-update behavior. The url points to the latest release download, github_repo identifies the repository, and auto_update defaults to true. ```json "catalog": { "url": "https://github.com/RetroPortingToolKit/Retro-Catalog/releases/latest/download/catalog.zip", "github_repo": "RetroPortingToolKit/Retro-Catalog", "auto_update": true } ``` -------------------------------- ### CMake project configuration for Retro Launcher Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/CMakeLists.txt Sets the minimum CMake version, project name, and C++17 standard. Also enables compile commands export for tooling. ```cmake cmake_minimum_required(VERSION 3.24) project(retcomm_launcher C CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ``` -------------------------------- ### Smoke-test pack download with title Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/ARCHITECTURE.md Command to ensure a toolchain pack is downloaded for a specific title, e.g., metal-warriors-snes. Useful when the pack is needed for that title's build. ```bash retcomm pack ensure toolchain --title metal-warriors-snes ``` -------------------------------- ### Enable plutosvg support Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Add this define to your imconfig.h to enable OpenType SVG font rendering via plutosvg. ```c #define IMGUI_ENABLE_FREETYPE_PLUTOSVG ``` -------------------------------- ### Enable lunasvg support Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/third_party/misc/freetype/README.md Add this define to your imconfig.h to enable OpenType SVG font rendering via lunasvg. Requires lunasvg v2.3.2 and above. ```c #define IMGUI_ENABLE_FREETYPE_LUNASVG ``` -------------------------------- ### Submission-ready rom_identity template Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/docs/CATALOG.md Full field set for `rom_identity` to include in every title catalog entry, so future author self-submission can fill any subset without schema churn. Always ship all fields, using empty arrays for unused digests and `false` for `require_cue` when not needed. ```json "rom_identity": { "crc32": [], "md5": [], "sha1": [], "sha256": [], "disc_serials": [], "sizes": [], "filenames": ["Game Name (USA).z64"], "track_counts": [], "require_cue": false } ``` -------------------------------- ### CMake cache variables for versioning and catalog Source: https://github.com/retroportingtoolkit/retro-launcher/blob/main/CMakeLists.txt Defines cache variables for version, commit, release build flag, GitHub slugs, and catalog download URL. These are used for self-update and about text. ```cmake set(RETCOMM_VERSION "0.1.1" CACHE STRING "Retro Launcher semantic version") set(RETCOMM_COMMIT "" CACHE STRING "Git commit the build is from (empty: unknown)") option(RETCOMM_RELEASE_BUILD "A CI release build (hides Direct mode's developer tools)" OFF) set(RETCOMM_GITHUB_SLUG "RetroPortingToolKit/Retro-Launcher" CACHE STRING "GitHub owner/repo used for self-update") set(RETCOMM_CATALOG_GITHUB_REPO "RetroPortingToolKit/Retro-Catalog" CACHE STRING "GitHub owner/repo for the title catalog") set(RETCOMM_CATALOG_DOWNLOAD_URL "https://github.com/RetroPortingToolKit/Retro-Catalog/releases/latest/download/catalog.zip" CACHE STRING "Default catalog.zip download URL") ```