Tauri + GameSalad

Turn your GameSalad HTML5 game into a Windows .exe with an NSIS installer — store-ready for places like Steam — using the official gs-tauri template plus a few niceties.

Visit the GitHub repo associated with this tutorial! The tutorial is pretty useless without it!

This template is based on the official GameSalad repo here: https://github.com/gamesalad/gs-tauri

Section 1: What this template adds

  • Quit button functionality so users can quit your game while in fullscreen.
  • Window Mode toggle so users can switch between Fullscreen (default) and Windowed.
  • Optional bundling of all resources into the .exe instead of a separate browsable folder.
  • Custom branding for the NSIS installer (sidebar & header images).

It's recommend you follow this tutorial all the way through using the demo project below before you try it on your own project. Keeping the project file really simple will make it much easier for you to spot any issues while you learn what to do!

Download the sample GameSalad project showing the Quit and Window Mode triggers

Tauri Buttons — ZIP

Section 2: Getting Set Up

Install requirements

Clone the repo

Create a folder (e.g. C:\Tauri ), then open Git Bash in that folder and run:

git clone https://github.com/gamesalad/gs-tauri

Install project pre-requisites

cd gs-tauri
npm install

Let the packages install. If prompted for permissions, allow them. That’s setup done.

Generate an HTML5 project

Publish your GameSalad game as HTML5 and download the zip. Unzip it — you’ll get a folder with your game’s files. For your first pass, it’s quicker to use the sample project linked above, then repeat with your own game once you’ve proven the pipeline.

Copy files from your HTML5 build into gs-tauri

Place the files as follows:

GameSalad HTML5 Tauri Project Note
images src/assets/images Scene loading indicator image
js/gse/gs-export.js src/js/gse/gs-export.js Game engine
game src-tauri/resources/game Game project (kept out of binary for dev)
css src/assets/css Optional — rarely changes and often already included

You want the default folder from your HTML5 game directory copied to: C:\Tauri\gs-tauri\src-tauri\resources\game\default

The two absolutely critical items: js/gse/gs-export.js and the default folder. Replace files if prompted. If you later choose to bundle resources into the .exe , we’ll move things (covered below), but for now use the paths above for easier testing.

Section 3: Edit tauri.conf.json for the first run

Open gs-tauri/src-tauri/tauri.conf.json and find the bundle block. Change the identifier to something unique:

"bundle": {
  "active": true,
  "targets": "all",
  "identifier": "com.armelline.example",
  "resources": [
    "resources/"
  ],
  ...
}

Use your own org/game naming (e.g., com.company.gamename ). Save.

Section 4: First test build

Heads up: This launches fullscreen with no in-game quit yet. To exit, press the Windows key or Alt-Tab to the taskbar, right-click the app and choose “Close Window”.

npm run tauri dev

The first run compiles quite a bit. When it launches, do a quick smoke test and quit as above. If you’re using the demo project, the Quit and Window Mode buttons should already work.

Section 5: More tauri.conf.json edits

Name & version

"package": {
  "productName": "Your Game Name",
  "version": "1.0.0"
},

Window settings

"windows": [
  {
    "title": "Your Game Name",
    "width": 1280,
    "height": 720,
    "fullscreen": true,
    "resizable": true,
    "fileDropEnabled": false,
    "minWidth": 800,
    "minHeight": 600
  }
],

title controls the taskbar/title text. width/height set the default window size. Leave fullscreen at true for now — we’ll add a window toggle soon. fileDropEnabled is safer off. minWidth/minHeight are optional.

More options: WindowConfig docs

Common error: JSON commas — make sure entries are comma-separated, except the last in an object/array.

Section 6: Icons & Installer images

App icons

Place a 1024×1024 PNG in the project root (e.g. gs-tauri ) and run:

npm run tauri icon imagename.png

Generated icons land in src-tauri/icons/ . Windows caches icons aggressively — if you still see old ones, restart to flush.

NSIS installer images

  • Header: 150×57 px BMP
  • Sidebar: 164×314 px BMP
  • Icon: installer.ico

NSIS is picky. A working ImageMagick example:

magick /Path/To/File/installer-header.png -depth 24 -background white -flatten -type truecolor bmp3:installer-header.bmp

Name them: installer-header.bmp , installer-sidebar.bmp , installer.ico and reference them in tauri.conf.json .

Edit Cargo.toml

Open gs-tauri/src-tauri/Cargo.toml and change:

description = "Your Game Name"

Otherwise Task Manager may show “A Tauri App”. You can also change authors = ["you"] if you like. Don’t change edition = "2021" .

Section 7: Full build with installer

The repo is set up to support bundling your resources into the .exe . Dev and bundled build use different resource paths, so there’s a small “switch” to perform when you’re ready to make an installer.

Update tauri.conf.json for bundled resources

Remove this block (no comments allowed in JSON, so delete it, don’t comment):

"resources": [
  "resources/**"
],

Also delete src-tauri/target to avoid stale cache issues when switching between dev/build.

Move resources for build

Copy your game to the src/resources path (added for clarity):

GameSalad HTML5 Tauri Project Note
game src/resources/game Game project (compiled into binary for build)

It’s fine to leave a copy in src-tauri/resources/game for dev. Only one path is used depending on dev vs build.

Build the app + installers

npm run tauri build

Output ends up here: gs-tauri/src-tauri/target/release/bundle/ with both MSI and NSIS. Steam prefers NSIS:

C:\gs-tauri\src-tauri\target\release\bundle\nsis\Your-Game-Name_1.0.0_x64-setup.nsis

Need to switch back to dev?

  1. Ensure your latest HTML5 game is in src-tauri/resources/game .
  2. Add this back into tauri.conf.json (same place as before):
    "resources": [
      "resources/**"
    ],
  3. Delete src-tauri/target before running dev again.

Section 8: Set-up inside your GameSalad project

Add two buttons: a “Quit” button and a “Window Mode” toggle. Both use a Tweet Sheet behaviour with specific messages.

Quit button

  • Add a Tweet Sheet with Message: EndGame . (Case-sensitive; if you change it, also change it in delegate.js .)

Windowed / Fullscreen toggle

  • Add a Tweet Sheet with Message: WindowChange . (Use a different string to the quit button and keep it consistent with delegate.js .)

You can inspect the sample project for reference.

Section 9: What’s different vs the base GameSalad repo?

  • main.rs : Adds quit handling.
  • delegate.js : Handles quit and window resizing messages.
  • main.js : Switches resource paths for dev vs build to reduce busywork.
  • tauri.conf.json : Slightly more permissive window changes.
  • src/resources/game/ : Added to clarify where to place game files for build mode.

Section 10: Troubleshooting

  • JSON parse error on tauri.conf.json : check for missing/extra commas or curly braces.
  • Black screen on npm run tauri dev : likely forgot to revert the “Full build with installer” changes. Restore the "resources" block and delete src-tauri/target .
  • Installer images rejected: confirm BMP sizes and format (24-bit, truecolor, bmp3 ).
  • Smart quotes (macOS) in JSON: replace “ ” with straight quotes " ".

Section 11: Final words

You should now have a Windows build with a branded installer, Quit button, Window Mode toggle, and optionally bundled resources. Linux is similar (paths/installer bits differ), but the core code remains the same.