Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Custom fork of linkle to be used as a simple but powerful binary to build homebrew projects into Nintendo Switch formats

License

Notifications You must be signed in to change notification settings

aarch64-switch-rs/sprinkle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: this project is deprecated, please use cargo-nx instead!

sprinkle

sprinkle is an alternate fork of linkle, extending it for some specific purposes.

It is aimed as a simple build command for projects based on this organization's libraries and tools, to avoid having to mess with makefiles or scripts, and including support for generating various formats (linkle's original purpose) after projects are built.

Installation

Assuming you have cargo installed, cargo install sprinkle --git https://github.com/aarch64-switch-rs/sprinkle will install the sprinkle subcommand.

Project formats

Extra fields used for building are placed inside [package.metadata.sprinkle.<format>] in Cargo.toml. These fields vary depending on the project's format:

NRO

Projects which generate homebrew NRO binaries don't need any mandatory fields/files, but can set optional ones.

  • Example:
[package]
name = "Project"
version = "0.1.0"
authors = ["XorTroll"]
edition = "2018"

[package.metadata.sprinkle.nro]
romfs = "romfs_dir"
icon = "icon.jpg"
nacp = { name = "Sample project", author = "XorTroll", version = "0.1 beta" }

Note: the romfs and icon fields must point to items located in the same directory as Cargo.toml!

NACP fields

Note: every fields are optional!

Field Description Default value
name The application name. Unknown Application
author The application author. Unknown Author
version The application version. 1.0.0
title_id The application title id. 0000000000000000
dlc_base_title_id The base id of all the title DLC. title_id + 0x1000
lang (object) Different name/author depending of the language use name and author
Supported Languages
en-US
en-GB
ja
fr
de
es-419
es
it
nl
fr-CA
pt
ru
ko
zh-TW
zh-CN
  • Example with specific languages:
[package]
name = "Multi-language"
version = "0.2.0"
authors = ["XorTroll"]
edition = "2018"

[package.metadata.sprinkle.nro]
nacp = { name = "A", author = "B", version = "0.2 beta", lang = { ja = { name = "J" }, es = { author = "X" }, it = { name = "I", author = "T" } } }

# Result:
# - Japanese: "J", "B"
# - Spanish: "A", "X"
# - Italian: "I", "T"
# - Other languages: "A", "B"

Note: only name and author can be language-specific, other parameters such as titleid or version are not!

NSP

Projects which generate sysmodule NSP exefs packages need a single, mandatory field for the NPDM data:

  • Example:
[package]
name = "Project"
version = "0.2.10"
authors = ["XorTroll"]
edition = "2018"

[package.metadata.sprinkle.nsp]
npdm = "npdm.json"

Note: the NPDM JSON file follows the same format used in most homebrews (check projects like Atmosphere, emuiibo, ldn_mitm...) and must be located in the same directory as Cargo.toml!

Building

Command: sprinkle <format> [<optional-extra-cargo-arguments>]

Available formats (listed above): nro, nsp

Running this command will (among other minor details) run xargo build and, after building the project, will generate the specific files depending on the project build format.

A default target is used, whose JSON specs are included within sprinkle itself (check here). Support for custom targets is planned but not supported yet.

Credits

  • linkle project and its developers for the base of this fork

About

Custom fork of linkle to be used as a simple but powerful binary to build homebrew projects into Nintendo Switch formats

Resources

License

Stars

Watchers

Forks

Packages

No packages published