Skip to content

Muz-dev/smo-exlaunch-base-clang

 
 

Repository files navigation

smo-exlaunch-base-clang

A base project that allows you to create code mods for smo with exlaunch using clang. This also includes a custom actor factory to allow adding custom actors.

This project uses Sanae's marsmallow as a base. Marsmallow allows you to make switch mods using clang.

Original Marshmallow Readme


A clang based version of exlaunch with some useful built-in tools. Supporting clang directly allows better integration with IDEs via clangd and various other clang tools. This project does not depend on the devkitPro switch toolchain.

Setup

The only supported host platforms are Windows and Linux.

Dependencies: CMake(>=v3.21) and Ninja.
Both should be available from your package manager, be it winget, apt, pacman or anything else.

To configure the CMake project, run this command. See [definitions](#CMake definition args) for flags to add on.

cmake -S . -B build -G Ninja --toolchain=cmake/toolchain.cmake

And to build using Ninja, simply run:

ninja -C build

Any other target generators are untested and unsupported.

Logging

As you can see in user/src/main.cpp, there's a few logger destinations available. The default file location in that file is sd:/mallow.log. If you want network logging, you can make a json file at sd:/mallow.json with the contents:

{
  "logger": {
    // The address (hostname or IPv4) where the log server is hosted.
    "ip": "XXX.XXX.XXX.XXX",
    // The default port of choice is 3080.
    "port": 3080,
    // Reconnect when a server could not be found.
    "reconnect": false
  }
}

Hosting a log server on Linux (not WSL!) is as easy as running nc -lk 3080. On Windows, there is an included logserver.js which also opens a raw tcp server. You will need Node.js if you want to use logserver.js, otherwise you should make your own log server.

CMake definition arguments:

  • -DFTP_IP=XXX.XXX.XXX.XXX
    • optional, will enable FTP deployment builds if specified
    • your switch's IP for deployment with the subsdk9_deploy_ftp target
  • -DFTP_PORT=5000, -DFTP_USERNAME=anonymous, -DFTP_PASSWORD=anonymous
    • optional, uses defaults above
    • your switch's FTP port, username, and password
  • -DFTP_TITLE_ID=0100000000010000
    • optional, uses defaults above
    • what title id to use when placing deployments into /atmosphere/contents/FTP_TITLE_ID/exefs/

Credits


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.3%
  • C 14.6%
  • Assembly 4.2%
  • CMake 3.0%
  • Linker Script 0.8%
  • JavaScript 0.1%