# OrbisForge [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![GUI powered by UIFramework](https://img.shields.io/badge/GUI%20powered%20by-UIFramework-orange)](https://github.com/xeghosted/UIFramework) [![CI](https://github.com/xeghosted/OrbisForge/actions/workflows/ci.yml/badge.svg)](https://github.com/xeghosted/OrbisForge/actions/workflows/ci.yml) [![Latest release](https://img.shields.io/github/v/release/xeghosted/OrbisForge)](https://github.com/xeghosted/OrbisForge/releases/latest) **Scaffold and build OpenOrbis PS4 homebrew projects with CMake — on Windows or Linux/WSL.** OrbisForge generates self-contained CMake projects for the [OpenOrbis PS4 Toolchain](https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain), producing `eboot.bin` executables, `.prx` user libraries, `.sprx` signed system libraries, GoldHEN plugins, and (optionally) full signed/encrypted `.pkg` installers — through a single `add_orbis_target()` CMake function. A Windows GUI wizard and a cross-platform CLI both scaffold the same project layout. > The GUI wizard is Windows-only, built on [UIFramework](https://github.com/xeghosted/UIFramework) > (skinned WinForms). The CLI (`orbisforge`) runs natively on Windows, Linux, and WSL, published > self-contained so no .NET install is required to use it. ## Features - **Every artifact type** — EXE (`eboot.bin`), PRX, SPRX, and GHPLUGIN, via one `add_orbis_target()` call. `TYPE` selects the right CRT object (`crt1.o` vs `crtlib.o` vs `crtprx.o`), the right `create-fself` packaging mode (`--eboot` vs `--lib`), and a sensible default `-ptype`. - **GoldHEN plugins** — `TYPE GHPLUGIN` builds a plugin the GoldHEN loader actually accepts. It differs from a plain PRX in three ways that must all be right or the plugin builds cleanly and then silently never loads: the [GoldHEN Plugin SDK](https://github.com/GoldHEN/GoldHEN_Plugins_SDK)'s `crtprx.o` instead of `crtlib.o`, entry at `_init`, and `SceLibcInternal`/`SceSysmodule` instead of `c`/`c++`. Requires the SDK installed into the toolchain — the generated CMake fails with instructions if it isn't. The scaffolded starter plugin shows a PS4 notification from `module_start`. - **Optional full `.pkg` installer** — `add_orbis_package()` stages `eboot.bin` and a generated `param.sfo` into a directory tree matching the final package layout, then drives `create-gp4` + `PkgTool.Core pkg_build` to produce a real signed/encrypted `.pkg`. - **Cross-platform builds** — generated projects carry their own `cmake/` core (toolchain file + target helpers), a `build.bat` that shells into WSL, and a `build.sh` for native Linux/WSL. - **Automatic sanity check** — every packaged target runs `readoelf` over its own output as a post-build step, catching malformed builds before you ever copy them to hardware. - **Optional FTP deploy** — `deploy.bat`/`deploy.sh` (curl-based, no extra dependency) upload the built artifact straight to your PS4's homebrew FTP server. Off by default; opt in via `--deploy-host` or the GUI checkbox. No credentials baked in by design — most PS4 FTP servers run anonymous. - **GUI wizard (Windows)** — pick a name, type, output folder, optional `.pkg` packaging, and optional FTP deploy target; detects your WSL distro and the OpenOrbis toolchain automatically, and surfaces the latest available OpenOrbis release as a reference point. Light/dark mode toggle, remembered across launches. - **VS Code integration** — generated projects include a build task (Ctrl+Shift+B) and IntelliSense configuration for the toolchain's unusual target triple. - **CLI scaffolder (Windows + Linux + WSL)** — `orbisforge new`, plus `orbisforge build`/ `orbisforge deploy` so you never have to leave the CLI for the rest of the workflow either. - **CI on every push** — generates and builds one project of every type (including the full `.pkg` path) on real GitHub-hosted Linux, plus a Windows job that builds the GUI. ## Requirements - The [OpenOrbis PS4 Toolchain](https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain) installed, with `OO_PS4_TOOLCHAIN` set (in WSL, if building from Windows). - clang, lld, and CMake ≥ 3.20 available wherever the actual build runs (WSL/Linux). - Windows GUI: .NET Framework 4.8 (ships with Windows 10/11). - CLI: nothing — the published binaries are self-contained. ## Using the CLI Prebuilt, self-contained binaries are attached to each [release](https://github.com/xeghosted/OrbisForge/releases/latest) — no .NET install needed. Or build from source (see below). ``` orbisforge new --name my_plugin --type sprx --output E:\Projects\PS4 orbisforge new --name my_game --type exe --pkg orbisforge build E:\Projects\PS4\my_plugin orbisforge deploy E:\Projects\PS4\my_plugin ``` Run `orbisforge --help` for the full option list. `build`/`deploy` just invoke the generated project's own `build.bat`/`build.sh`/`deploy.bat`/`deploy.sh` for you — double-clicking those files directly works exactly the same. ## Building from source ``` git clone --recurse-submodules https://github.com/xeghosted/OrbisForge.git cd OrbisForge dotnet build OrbisForge.slnx ``` `--recurse-submodules` is required — the GUI depends on [UIFramework](https://github.com/xeghosted/UIFramework), pulled in as a git submodule at `external/UIFramework`. If you already cloned without it: `git submodule update --init`. To publish self-contained CLI binaries: ``` dotnet publish src/OrbisForge.Cli -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o publish/win-x64 dotnet publish src/OrbisForge.Cli -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true -o publish/linux-x64 ``` ## Testing ``` dotnet test tests/OrbisForge.Core.Tests ``` Unit tests cover `OrbisForge.Core`'s scaffolding logic directly (file sets per target type, template content, sanitization, warnings) — fast, no toolchain required. CI's generate-and-build matrix is the complementary end-to-end layer: it proves the *output* actually compiles against the real OpenOrbis toolchain. ## Project layout - `src/OrbisForge.Core` — scaffolding logic (multi-targeted `net8.0`/`netstandard2.0`) - `tests/OrbisForge.Core.Tests` — xUnit tests for Core - `src/OrbisForge.Cli` — cross-platform console scaffolder - `src/OrbisForge.Gui` — Windows wizard (WinForms + UIFramework) - `external/UIFramework` — git submodule ## License MIT — see [LICENSE](LICENSE).