Skip to content

Installers and the wizard

Exercise installers-and-wizard-annex.pdf · PDF

Picture two installers for the same app, with the same code. One has a grey sidebar and a generic icon. The other shows the app's colours, icon and name. Which one do you trust with your files?

The user looks at that screen for about three seconds. It is the first screen of your app, and you did not design it in Unit 1. This page fixes that. You will see what each system shows when somebody installs your app, and you will brand the part you control.

What you will learn

  • Match the seven Tauri bundle targets with their platform, and say which ones show a wizard
  • Name the pages of the NSIS wizard and the config keys that customise them
  • Design installer images at the exact sizes Tauri asks for
  • Export from Figma, convert to .bmp and wire the files in tauri.conf.json
  • Fill the fields Linux shows instead of a wizard: description, category, publisher
  • The trap: why renaming sidebar.png to sidebar.bmp does not convert it

The front door

Keep one picture for this page: the installer is the front door of your app.

Nobody visits a house for its door. But a door with no number, bell or name makes you check the address twice. On the previous page you packed the suitcase. Now you design the door it arrives at.

An installation wizard is the series of windows that guides a user through installing a program, one step at a time, with Next and Back buttons.

One app, seven packages

A bundle target is a package format Tauri can produce. These are the values bundle > targets accepts:

Target Platform What the user gets Wizard?
nsis Windows NoteBox_1.0.0_x64-setup.exe. Can install without administrator rights Yes
msi Windows NoteBox_1.0.0_x64_en-US.msi, built with WiX. The format IT departments deploy Yes
deb Debian, Ubuntu NoteBox_1.0.0_amd64.deb, installed by apt. It lists its dependencies No
rpm Fedora, openSUSE NoteBox-1.0.0-1.x86_64.rpm, installed by dnf No
appimage Any Linux One file with nothing to install: make it executable and run it No
app macOS The application bundle: a folder that looks like a file No
dmg macOS A disk image: a window where you drag the app onto Applications Just a window

NSIS (Nullsoft Scriptable Install System) and WiX are the two tools Tauri uses behind the scenes to build Windows installers.

Why are the sizes so different? NoteBox's .deb weighs 2.9 MB because it only declares that it needs libwebkit2gtk-4.1-0 and libgtk-3-0, and apt fetches them. An AppImage carries everything with it. The Tauri docs warn that this takes the size from the 2-6 MB range to 70 MB or more. Same app, more than twenty times the weight: it packed the bed.

Each row can only be built on its own system. msi needs Windows, because WiX only runs there. dmg needs a Mac.

One exception: building the NSIS installer from Linux

Tauri can cross-compile nsis, which means building it on one system for another. The docs call it "not tested as much" and a last resort, to use only when you have no Windows VM or CI. It downloads the Microsoft C runtime the first time, and signing the result needs an external tool.

sudo apt install nsis lld llvm
rustup target add x86_64-pc-windows-msvc
cargo install --locked cargo-xwin
npm run tauri build -- --runner cargo-xwin --target x86_64-pc-windows-msvc

The installer lands in src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/.

Careful: a wizard is not how all software is installed

On Windows, yes. On Ubuntu, the package manager installs a .deb and asks about nothing specific to your app. On macOS you drag an icon. "Customise the wizard" is a Windows job. The other systems show your metadata instead.

What you can change

The NSIS wizard walks through these pages, in order:

flowchart LR
    A["<b>Welcome</b><br>sidebar image"] --> B["<b>License</b><br>only with licenseFile"]
    B --> C["<b>Install location</b><br>header image"]
    C --> D["<b>Start menu folder</b><br>header image"]
    D --> E["<b>Installing</b><br>header image"]
    E --> F["<b>Finish</b><br>sidebar image"]

Two more pages appear only in special cases. With installMode set to both, a page asks who to install for. If a previous installation is found, a page asks whether to reinstall.

The images are the only pixels you control without writing your own template. All these keys live under bundle > windows > nsis, with paths relative to src-tauri/:

Key Effect
sidebarImage Bitmap on the Welcome and Finish pages. Recommended 164 × 314 px
headerImage Bitmap in the header of the inner pages. Recommended 150 × 57 px
installerIcon The .ico of the installer file and its window. Use icons/icon.ico
installMode Who the app is installed for (see below)
languages List of wizard languages. The default is ["English"]
displayLanguageSelector true shows a language dialog before the wizard

One related key sits one level up, not under nsis: bundle > licenseFile. It adds the License page, the only page where the user accepts your terms. No file, no page.

Install mode

installMode Installs to Administrator rights?
currentUser (default) The user's own folder, %LOCALAPPDATA% No
perMachine System-wide, in Program Files Yes
both The user chooses Yes

Careful: perMachine is not more professional

It asks for the administrator password. In a school or a company the user usually does not have it, and then the installation stops there.

Languages

If the operating system's language is in your languages list, the wizard uses it. If not, it uses the first language in the list. "Spanish" works out of the box.

"Catalan" is only half there. The build passes and the standard pages come out translated, but Tauri's own texts do not. To complete it, write those strings in a file and point to it with customLanguageFiles.

The other doors

Package Key Size
msi bundle > windows > wix > bannerPath 493 × 58 px, on top of every page except the first
msi bundle > windows > wix > dialogImagePath 493 × 312 px, on the welcome and completion dialogs
dmg bundle > macOS > dmg > background PNG, JPG or GIF. The window is 660 × 400 by default

And on Ubuntu?

No wizard, so the door is the card the software installer shows for your .deb. Those fields come from the label:

On the card Key
Name productName
Icon bundle > icon
Version version
Description bundle > shortDescription and bundle > longDescription
Category bundle > category, for example "Productivity"
Publisher bundle > publisher

Empty fields look as unfinished as a grey sidebar.

Design the front door

In Figma, make one frame per image for your own app: sidebar at 164 × 314 and header at 150 × 57. The frame is the export, so do not resize it. Then paste both onto a mock-up of the wizard screens to see them in context.

The rules:

  • Fill the whole frame. No transparency: .bmp files have none, and transparent pixels come out white or black depending on the converter.
  • Use flat colours from your palette, your app icon and the app name. There should be nothing to read: the user gives it three seconds.
  • The header sits next to the wizard's own title text, so keep it calm. No slogans.
  • Use the same icon in the app, the installer and the uninstaller.

What usually goes wrong:

Mistake Fix
The frame "grew" to fit the drawing Check W and H in Figma's right panel. NSIS squeezes a wrong-size bitmap, it does not crop it
A paragraph in the sidebar Can you read it in three seconds? If not, cut it
The name at 8 px in the header The header is 57 px tall. Use one line, at 20 px or more
A screenshot of the app as the sidebar A door is not a window. Icon and name

Export, convert, wire

Export. Select the frame, then Export, PNG, 1x. You get sidebar.png and header.png.

Convert. Figma cannot export .bmp, and NSIS reads nothing else. Use the png2bmp.mjs converter shared in Classroom, saved in your project's scripts/ folder. It needs only Node.js.

mkdir src-tauri/installer
node scripts/png2bmp.mjs sidebar.png src-tauri/installer/sidebar.bmp
node scripts/png2bmp.mjs header.png  src-tauri/installer/header.bmp

The script prints what it wrote: 164 x 314 px, 24-bit BMP. If it says 328 × 628, you exported at 2x. Go back and export at 1x.

Other tools do the same job. With ImageMagick, run magick sidebar.png BMP3:sidebar.bmp. On Windows, use Paint, then Save as, 24-bit Bitmap.

Careful: renaming is not converting

If you rename sidebar.png to sidebar.bmp, the file is still a PNG inside. The extension is a label, not the format. The installer shows nothing, or the build fails. Convert the pixels.

Wire. In tauri.conf.json:

"bundle": {
  "licenseFile": "../LICENSE",
  "publisher": "IES Son Ferrer",
  "shortDescription": "NoteBox, a tiny notes app",
  "windows": {
    "nsis": {
      "sidebarImage": "installer/sidebar.bmp",
      "headerImage": "installer/header.bmp",
      "installerIcon": "icons/icon.ico",
      "installMode": "currentUser",
      "languages": ["English", "Spanish"],
      "displayLanguageSelector": true
    }
  }
}

Merge these keys into the bundle you already have. Do not replace it, or you lose your targets, icon and resources.

Check. On Ubuntu, run the build as usual:

npm run tauri build -- --bundles deb

The nsis block is read and validated, even though it is not used. A typo in a key stops the build with the name of the wrong key. To see the wizard itself, build with --bundles nsis on Windows.

Here is every size in one place:

Asset Size (px) Format Config key
App icon source 1024 × 1024 PNG or SVG tauri icon reads ./app-icon.png
NSIS sidebar 164 × 314 BMP bundle > windows > nsis > sidebarImage
NSIS header 150 × 57 BMP bundle > windows > nsis > headerImage
NSIS installer icon Layers from 16 to 256 ICO bundle > windows > nsis > installerIcon
WiX banner 493 × 58 BMP bundle > windows > wix > bannerPath
WiX dialog image 493 × 312 BMP bundle > windows > wix > dialogImagePath
DMG background Window of 660 × 400 PNG, JPG, GIF bundle > macOS > dmg > background

Key takeaways

  • Tauri has seven bundle targets: nsis and msi for Windows, deb, rpm and appimage for Linux, app and dmg for macOS. Each is built on its own system.
  • Only nsis and msi show a wizard. Linux and macOS show your metadata, so fill in the description, category and publisher.
  • The NSIS wizard is customised under bundle > windows > nsis: a sidebar of 164 × 314, a header of 150 × 57 and an icon. licenseFile sits one level up and adds the License page.
  • installMode: currentUser needs no administrator rights, while perMachine and both do.
  • Installer images must be real .bmp files, exported at 1x, with no transparency. Convert them, never rename them.

Quick check

1. Which pair of bundle targets shows an installation wizard?
  • deb and rpm
  • app and dmg
  • nsis and msi
  • appimage and deb

The two Windows formats are the ones with a wizard. A .deb or .rpm goes through the package manager, an AppImage is not installed at all, and on macOS you drag the app onto Applications.

2. Why is a .deb so much smaller than an AppImage of the same app?
  • The .deb uses a better compression method
  • The .deb declares its libraries, and the AppImage carries them
  • The .deb leaves out the app's frontend files
  • The .deb downloads the whole app when it is first opened

A .deb lists its dependencies, such as libwebkit2gtk-4.1-0, and apt fetches them. An AppImage bundles all it needs, which is why it runs on any Linux and weighs much more.

3. Where does licenseFile go in tauri.conf.json?
  • bundle > windows > nsis
  • bundle > windows > wix
  • plugins > updater
  • bundle

licenseFile sits directly under bundle, one level above nsis. Setting it adds the License page to the wizard. Without it, that page does not appear.

4. Which image appears on the Welcome and Finish pages of the NSIS wizard?
  • sidebarImage, at 164 × 314 px
  • headerImage, at 150 × 57 px
  • bannerPath, at 493 × 58 px
  • dialogImagePath, at 493 × 312 px

sidebarImage is on the Welcome and Finish pages, and headerImage is on the inner pages. bannerPath and dialogImagePath belong to WiX, the tool behind the msi format.

5. A teammate renamed header.png to header.bmp and the installer shows no header. What is the problem?
  • The header needs to be exported at 2x
  • The header key must sit under bundle > windows > wix
  • The file is still a PNG inside, whatever its extension says
  • NSIS does not allow header images on inner pages

The extension is a label, not the format. A real conversion rewrites the pixels as a bitmap, with png2bmp.mjs, ImageMagick or Paint.

6. Your image converter prints 300 x 114 px for a header image. What went wrong?
  • The installer language is set to the wrong value
  • The Figma frame was exported at 2x instead of 1x
  • The image still has a transparent background
  • The installMode is set to perMachine

The header is 150 × 57, and 300 × 114 is exactly double. NSIS would squeeze the image into the same box, so a bigger file does not make it sharper. Export at 1x.

7. The IT team of a town library has the administrator password and wants one copy of your app in Program Files, for everyone who logs in to its Windows PCs. Which package fits?
  • nsis with installMode set to currentUser
  • nsis with installMode set to perMachine
  • dmg with a custom background image
  • appimage with a custom sidebar image

perMachine installs system-wide in Program Files, and the administrator password it asks for is no problem here. currentUser would only install for the person running it. A dmg is for macOS, and an AppImage is for Linux and has no wizard.

The door looks right. But who guarantees the parcel was not opened on the way, how do you install it on 300 PCs without touching one, and how does it leave no trace? That is Sign, silent, update.