Longshot

Longshot is an open-source static recompilation tool and launcher that lets you play the Switch 2 version of The Legend of Zelda: Ocarina of Time natively on Windows and Linux without traditional emulation

README


Longshot Launcher
Longshot Launcher

Installs, builds, updates and starts Longshot, which runs a supported console game natively on Windows & Linux.

Website | Discord | What it does | Download | Installing | Using it | Saves | Updates | Build from source | Credits | License

This website is our Git hosting, similar to GitHub.

The Longshot Launcher is the one program players download to get Longshot. It installs Longshot's builder, builds the game on your PC, from your own copy of the game, starts it, and keeps the game and itself up to date. It is a separate project from Longshot, with its own repository and its own releases.

The launcher's home: the default version, Play, and offers to import NX2navi and Hookshot saves

Note

Nothing of the game is in the launcher or downloaded by it. It downloads Longshot's builder, which builds the game from the copy you own. Don't ask where to get the game.

Discord: https://discord.gg/magicbean

What it does

Builds the gameA three-step wizard: it finds your game files while that version's builder downloads, then the settings (DLSS, FSR 4, Intel XeSS, language, the builds folder), then the build with one progress bar
Several versions side by sideKeep a stable build and a nightly; Play starts the default one; Set as default, Saves, Open folder and Delete for each
Three channelsstable, rc (release candidates) and nightly, chosen per build and, apart from that, for the launcher itself
Installs Longshot's builderFor each version, from Longshot's signed release: every file checked against its SHA-256 before it is used
Updates the gameOffers each build its channel's newest version and builds it from the game files the build kept
Updates itselfFrom its own signed releases, checked and tested before it replaces itself; --rollback puts the previous one back
SavesOne save folder for every build, imports saves from emulators and from Hookshot, exports them to emulators, and to and from one .zip file; a Progress view per slot shows what a save has and is missing and edits it, with a backup first; and it restores the backups every copy makes (docs/saves.md)
Pull requestsThe Pull request track builds an open Longshot pull request on your PC to help test it: the ones a BigBean wrote or approved are listed, any other found by its number, with warnings before its code is built; it updates with each push (docs/pull-requests.md)
NFCKeeps the NFC tag dumps of figures you own, which the game's NFC tab lists: add one, many or a folder of them, scan one with a Switch 2 Pro Controller (Windows), delete them (docs/nfc.md)

Download

⬇️ Download Longshot Launcher

🪟  Download for Windows

🐧  Download for Linux (AppImage)

Windows without installing: portable zip · Not sure? longshot.magicbean.dev/download picks for your computer.

These links always give the newest launcher: the stable one, or until there is one, the release candidate, then the nightly. To pick a channel:

Every release is on the releases page. The files:

  • Windows 10 and 11 (x64): LongshotLauncher-<version>-windows-x64-setup.exe. Start it, then choose Install or Run portable (Installing).
  • Windows, portable: LongshotLauncher-<version>-windows-x64-portable.zip. Unzip it anywhere (a USB stick) and start LongshotLauncher.exe.
  • Linux and Steam Deck (x86-64): LongshotLauncher-<version>-x86_64.AppImage. Make it executable (chmod +x) and start it.

This is the one download: the launcher installs Longshot's builder for you. The builder files on Longshot's releases are for the launcher, not for you.

All of them are in the release's signed SHA256SUMS. After that the launcher updates itself. Its numbers are its own: Longshot's start at v3.0.0, the launcher's at v1.0.0.

Tip

Windows may warn about an unknown program on its first start (the program is not code-signed yet). Choose More info, then Run anyway.

Installing

There is no installer program: the launcher installs itself.

Windows. The first start of the setup file asks:

  • Install copies it to %LOCALAPPDATA%\Programs\LongshotLauncher\LongshotLauncher.exe (for your user only, no administrator rights), adds a Longshot Launcher shortcut to the Start menu and an entry in Apps & features (publisher Magic Bean), then starts the installed copy. After each of its own updates it makes the Start menu shortcut (and the Longshot shortcuts it made) again, so they start the updated program. Its data goes in %LOCALAPPDATA%\LongshotLauncher. You can delete the setup file afterwards. LongshotLauncher-<v>-windows-x64-setup.exe --install does the same without asking. A setup file older than the launcher installed (which has updated itself since) never goes back over it: it starts the installed launcher instead.
  • Run portable puts a file named portable beside the program, and from then on the launcher keeps everything in a LongshotLauncher-data folder beside it: its settings, its list of builds, the builder's tools, the build files, and by default the builds and the save backups too. It never writes the registry, and makes no shortcut unless you tick one when a build is ready. The portable zip has the portable file in it already, so it never asks.
  • Switching between them. An installed launcher and a portable one each keep their own list of builds and (on Windows) their own saves. A portable launcher that starts with no build offers the installed launcher's builds and saves on this PC: its builds are listed where they are, and its saves are copied in if the portable launcher has none yet. The other way, Add a build folder… on the home takes a game folder, a folder of them, or a portable launcher's LongshotLauncher-data (its builds, and its saves where there are none yet). A save is never copied over another: Manage saves imports one, after a backup.

Uninstalling (Windows): Settings > Apps > Installed apps > Longshot Launcher > Uninstall, which runs LongshotLauncher.exe --uninstall. It removes the program, its Start menu shortcut, the Longshot shortcuts it made, and its Apps & features entry. It asks whether to delete its data too; your builds' game folders and your saves are never deleted, even when they are inside it.

Updates keep the kind. An installed launcher updates its installed LongshotLauncher.exe, from the release's setup file; a portable one takes LongshotLauncher.exe out of the release's portable zip and updates itself in place, beside its portable file. Either way the file keeps the name it was installed or started as.

Linux and the Steam Deck. The AppImage needs no installing. Settings > Applications menu > Add to applications menu writes ~/.local/share/applications/longshot-launcher.desktop and its icon, starting the AppImage where it is now; add it again after moving the AppImage, or Remove it. Portable on Linux is the AppImage convention: make a folder named after the AppImage with .home added (LongshotLauncher-v1.0.0-x86_64.AppImage.home) beside it, and the launcher keeps its data there. (The AppImage runtime then also points $HOME there, for everything the launcher starts.)

One launcher at a time. A second start of the launcher brings the open one's window forward instead (one per data folder: a portable launcher and an installed one can run side by side).

If an update was cut short on Windows (the PC lost power during the swap), the launcher puts the earlier one back the next time it starts. If LongshotLauncher.exe itself is missing, rename LongshotLauncher.exe.old beside it back to LongshotLauncher.exe.

Using it

  1. Build another version (or, the first time, Build the game) opens the wizard. Pick the channel: Stable for playing, Release candidate to try the next version, Nightly for the newest changes.
  2. Game files: the launcher looks for your dump on this PC; point it at the folder if it doesn't find it.
  3. Settings: the builds folder (Settings' own: Change sets it for every build; this build goes in <builds>/<track>/<version>, shown under it), the language, and DLSS, FSR 4 or, on Windows, Intel XeSS (their licences are shown first; with XeSS on, the build downloads Intel's XeSS library for the game's Upscaler row). A PC with no card that runs DLSS or FSR 4 says so in red, and the switch still turns on: the build fetches its files for tools like OptiScaler. XeSS is never red: it runs on other makers' cards too where their driver has what it needs, which the game checks at its start. Your saves come along: every build shares them. On Windows with Intel graphics, Intel shader compiles chooses how many shaders Intel's driver is given at once, for the build and the game: Auto (recommended: the game's own choice, side by side on the Arc B-series and one at a time on other Intel graphics, and the game's Intel shader compiles row stays free to change), Side by side (faster on a CPU with many cores, but can crash Intel's driver) or One at a time. Side by side and One at a time hold the game's row at that value. Shader time limit on Longer waits up to 30 minutes, not 5, on a driver that seems stuck before the shader preparation gives up, and 3 minutes, not 30 seconds, for the last pipelines: for a slow Intel GPU whose build says the GPU driver stopped responding.
  4. Build: about 15 to 30 minutes the first time, shaders included. An update compiles only what changed.
  5. Play. Ready can also make desktop and menu shortcuts, which start the default version.

The cog on the home opens the launcher's settings: the launcher's language, the channel for new builds, the launcher's own channel, the builds folder (your instances, one folder per track and version; its folder button opens it in the file manager), the build files folder (working files every build reuses, not the game; and Free up space), the update check at start, and on Linux the launcher's entry in the applications menu.

The launcher speaks the game's sixteen languages. It starts in the system's (Windows' display language; on Linux LANGUAGE, LC_ALL, LC_MESSAGES or LANG), else English, until one is picked in Settings, and a pick changes the window at once. The game's own language is apart from it: a build setting (step 2), as before.

The launcher's settings: the channel for new builds, the launcher's own channel, where builds go

Saves

Every build shares one save folder (%APPDATA%\Longshot on Windows, ~/.local/share/longshot on Linux). On Windows the launcher brings in, once, the saves each build kept in its own folder before, and the 2.x Builder's, keeping the newest after backing them all up (docs/saves.md). The Saves page imports saves from Lichii, Eden, NX2navi and the other emulators, and exports them back, or the whole save folder into one .zip file to keep or send, which it imports again after checking it is safe. You can import before playing Longshot for the first time. Every copy backs up what it replaces first, and Restore from a backup… lists those backups and puts one back. Open saves folder shows the save folder in the file manager, to find the saves by hand.

Coming from NX2navi? The home offers to import saves found in its usual game folder. Choose the profile and confirm the import; the originals stay where they are. Portable or custom installs can be chosen by hand.

Coming from Hookshot? The launcher finds Hookshot's saves and offers once to copy them in, or use Saves > Import from Hookshot…. It copies them and never moves them, so Hookshot keeps its own. It checks the files first, and it asks, and backs up, before it replaces a Longshot save. Import graphics and controls… separately brings compatible Hookshot game settings into the Longshot version you choose, with its own confirmation and backup.

Import saves from Hookshot: the saves found, with their slots, and Choose a folder Choose a Longshot version and review the Hookshot settings and backup before importing

Finishing a save? Saves > Progress on a slot lists what it has and what is missing, by name and area, and sets or takes away a group, gives items, hearts, rupees or keys, sets where Link starts and copies a slot. It runs Longshot's own save editor from your build's tools, backs the save up first, and refuses while the game runs (docs/saves.md).

All of it, with where every save lives: docs/saves.md. Longshot's own saves guide has the same from the command line (scripts/longshot_saves.py import|export).

NFC

The NFC page (the NFC card on the home, under Manage saves) keeps the NFC tag dumps of figures you own: .bin (a raw NTAG215 dump) and .nfc (Flipper Zero) files, in one folder every build of the game shares. Add one file, many, or a whole folder; each is checked first, and a file that is not a dump is skipped and named. Delete one or several, or open the folder. In the game, the Insert menu's NFC tab lists them by file name. Nothing of a dump leaves your PC. All of it: docs/nfc.md.

Scan a tag… (Windows) reads a tag with a Nintendo Switch 2 Pro Controller plugged in over USB and saves it there as Scanned <UID>.bin. Close Steam, the game and any controller bridge first: only one program can hold the controller. Scan only tags you own. The tag is only read, never written.

Updates and channels

Longshot and the launcher are released apart, from their own repositories, each on three channels:

ChannelMade fromFor
stablea tag vX.Y.Zplaying
rca tag vX.Y.Z-rc.N (and every stable)trying the next version before it is released
nightlyevery change to mainthe newest changes, untested

Two choices in Settings. Channel for new builds is the channel of Longshot a new build follows (each build keeps its own). Until you pick one, it follows the launcher's channel: a nightly launcher builds nightlies. Launcher updates is the channel the launcher updates itself from: LongshotLauncher's own stable, rc or nightly, apart from any build's. It starts on the channel of the launcher you installed.

Every release's SHA256SUMS is signed with the release key, which the launcher has built in. The launcher installs nothing whose signature or SHA-256 does not check out, and never goes to a lower version by itself. A new launcher is downloaded beside the current one and checked. It is then started once with --self-check, and only then swapped in. --rollback puts the previous launcher back. How releases are made and checked: docs/releases.md; how to make one: RELEASING.md.

Build from source

The .NET 10 SDK, on Windows or Linux:

git clone --depth 1 https://git.magicbean.dev/MagicBeanDev/LongshotLauncher.git
cd LongshotLauncher
dotnet build LongshotLauncher.slnx
dotnet run --project App

scripts/package.sh <tag> <out folder> makes the two release programs on Linux (a test build unless CI signs it).

Layout
Core/LongshotLauncher.Core: the logic, no UI and no package. Versions and channels (Versions), the signed releases of Longshot and of the launcher (Releases, ReleaseTrust, ReleaseManifest), its own update (SelfUpdate), each version's builder and its tools.lock (Toolchains, ToolsSource, ToolsLock), game folders, builds.json (BuildRegistry), remembered settings, make_game.py's command line, @@ lines, run and check (MakeGameCommand, MakeGameProtocol, MakeGameRun), the game files found on this PC (GameFiles), update offers (UpdatePolicy), saves (Saves, a port of Longshot's scripts/longshot_saves.py; SaveText) and Hookshot's (HookshotSaves), the NFC tag dumps the game reads (NfcTags) and scanning one with a Switch 2 Pro Controller (NfcReader), the save editor Progress runs from a build's tools (SaveEditing, SaveEditorReport), the game settings brought to a new build (SettingsCarry), disk space (Disk), this PC (SystemInfo), shortcuts (Shortcuts), installed or portable (LauncherLayout, Installer), one launcher per home (InstanceLock), the launcher's home and command line
Core/Lang/The launcher's translations, one catalog per language (Tr, Translations)
App/LongshotLauncher: the Avalonia window. ViewModels/ (one per page and dialog), Views/ (one .axaml each, compiled bindings), Controls/ (icons, bars and spinner), App.axaml (the palette and the styles), Assets/ (the Longshot logo and icon, the Inter font with its licence)
tools/screenshots/The screens drawn without a display into PNGs (Screenshots)
tests/test_launcher_core.py (builds launcher_core/, which compiles Core/ and checks it), test_release.py (scripts/release.py), fixtures/ (signed test releases, fake Hookshot saves, what Longshot's save editor answers as JSON),