Skip to content

App Template

Pk11 edited this page Dec 30, 2024 · 14 revisions

Example

This is what most apps actually need/want to provide. Upload your builds directly to your GitHub release, no zips. Put screenshots as PNG in /docs/assets/images/screenshots/[slug] (400x480; no screen gap, 1x resolution, with the left and right of the bottom screen cut out to transparency!) if desired.

Create this at /source/apps/[slug].json. Your app's slug is the title, all lowercase, no 'special' characters, with spaces to -. ("My Cool App" -> "my-cool-app.json")

{
	"github": "yourname/myproject",
	"systems": ["3DS"],
	"categories": ["game"],
	"unique_ids": [123456],
	"image": "https://raw.githubusercontent.com/yourname/myproject/main/meta/banner.png",
	"icon": "https://raw.githubusercontent.com/yourname/myproject/main/meta/icon.png",
	"long_description": "This is a *really* cool app!",
}
  • systems: DS and/or 3DS
  • categories: Any combination ofgame, emulator, app, utility, save-tool, firm, luma3ds do not just make up new categories, but you can make suggestions
  • unique_ids: This is the UniqueId value in your .rsf file, but in decimal JSON will not take hexadecimal
  • image: Preferably a 3DS CIA banner image, but any large(ish) image to show on the website, can be omitted and the icon will be used
  • icon: Preferably a 32x32 (DS) or 48x48 (3DS) icon, but any small preferably square icon can work, falls back to your profile picture if omitted

Advanced features

{
	"github": "yourname/myproject",
	"Author": "Me",
	"title": "My Cool Project",
	"description": "This is a cool project for 3DS",
	"website": "https://yourname.example/myproject",
	"systems": ["3DS"],
	"categories": ["game"],
	"unique_ids": [123456],
	"download_filter": "-(3ds|nds)\\.zip",
	"image": "https://raw.githubusercontent.com/yourname/myproject/main/meta/banner.png",
	"icon": "https://raw.githubusercontent.com/yourname/myproject/main/meta/icon.png",
	"long_description": "This is a really cool app, you can even put *Markdown* here!",
	"autogen_scripts": true,
	"script_message": "This will be shown at the end of the script if auto-generated.\n\nDo not use this unless you have very important info.",
	"scripts": {... see below ...},
	"archive": {... see below ...}
}

Only necessary items should be included, remove all unnecessary items. I think I included everything remotely common here, but anything that gets scraped can be overridden here, if you should need to.

  • github: Required (assuming the app is on GitHub, search the repo for BitBucket and GitLab examples), completely manually filled apps are supported, but git repos are strongly preferred
  • author: Autofilled from your GitHub name (not username), only fill if different
  • title: Autofilled from the GitHub repos name, only fill if different
  • description: Autofilled from GitHub repo description, shown in Universal-Updater, only fill if different
  • website: Effectively defaults to your GitHub repo
  • download_filter: U-DB tries to exclude all unwanted files with a blacklist, but if you have something falling through that put a whitelist regex here
  • autogen_scripts: only useful if true, makes U-DB still automatically generate more scripts even if you have a manual script, niche but useful if you have say a 3DSX in a folder and a CIA directly (plz dont do that, but a lot of old apps did)

Archives

This exists as a simpler way to extract files from a zip. Again, I suggest not using zips it usually slows things down on 3DS. This supports some rather advanced regex (see Angband) and extracting multiple files (see 3DSController).

	"archive": {
		"myapp.zip": { // Name of the GitHub artifact
			"myapp.3dsx": [ // Name to display in Universal-Updater
				"myapp.3dsx" // Path within the zip
			],
			"myapp.cia": [ // Name to display in Universal-Updater
				"myapp.cia" // Path within the zip
			]
		}
	}

Scripts

I strongly recommend uploading your CIA, 3DSX, NDS files individually as Universal-DB's scripts will handle everything automatically, no scripts at all! If you need support files, you'll need a custom script. See the Universal-Updater wiki for more information. They follow the same structure, inside a block named "scripts". This is a common template, regex is supported at several points, search the repo for examples.

	"scripts": {
		"myapp.cia": [
			{
				"type": "downloadRelease",
				"repo": "yourname/myproject",
				"file": "myapp.zip",
				"output": "/myapp.zip"
			},
			{
				"type": "extractFile",
				"file": "/myapp.zip",
				"input": "myapp.cia",
				"output": "/myapp.cia"
			},
			{
				"type": "installCia",
				"file": "/myapp.cia"
			},
			{
				"type": "deleteFile",
				"file": "/myapp.cia"
			},
			{
				"type": "deleteFile",
				"file": "/myapp.zip"
			}
		]
	}
Clone this wiki locally