Guides menu
Guide

Package & distribute an app

A step-by-step tutorial: turn a Serez app into a self-contained installer with serez-pack. The sz runtime travels inside the package, so the people you share it with run your app without installing anything.

What you'll learn: the three output formats (folder, MSI, EXE), packaging an app that uses serez-ui, and what ends up in the box.

Step 1 — Start with an app

We'll package the task tracker from the GUI app tutorial — but any .sz app works. Install the packer:

sz install serez-pack
Key idea: serez-pack is written in pure Serez Code and never touches the language core. It copies your app + the sz runtime into one bundle that runs regardless of the working directory.

Step 2 — The folder format (no toolchain)

Start with format=folder — a self-contained directory, no extra tools required. Options are passed as key=value tokens (no dashes — the runtime rejects unknown --flags):

sz pack.sz entry=app.sz name=TaskTracker out=dist format=folder

You get a folder you can zip and hand to anyone:

dist/TaskTracker/
  sz.exe         runtime, embedded
  app.sz         your app (entry)
  serez.json     permissions

They run it with the bundled runtime — no install:

cd dist/TaskTracker
sz.exe app.sz

Step 3 — A real Windows installer (MSI / EXE)

For a double-click experience, build an installer. msi installs into Program Files; exe is a self-contained setup bundle:

# Windows installer
sz pack.sz entry=app.sz name=TaskTracker out=dist format=msi

# Self-installing .exe (Burn bundle that wraps the .msi)
sz pack.sz entry=app.sz name=TaskTracker out=dist format=exe
format=OutputToolchain
folderSelf-contained foldernone
msiWindows installer (Program Files)WiX
exeSetup bundle that installs the MSIWiX
WiX is auto-managed: the msi and exe formats need WiX, which serez-pack declares as a dependency and installs for you (needs the .NET SDK), pinned to v5.

Step 4 — Packaging a serez-ui app

If your app imports serez-ui (like the task tracker), point the packer at it with serez-ui= so the library travels inside the bundle too:

sz pack.sz entry=app.sz name=TaskTracker \
  serez-ui=packages/serez-ui format=exe

The runtime resolves the serez-ui import from the app directory, so it works the same in the folder, the MSI install, or the setup EXE.

Options reference

OptionDefaultDescription
entry=requiredPath to the app .sz (entry point)
name=requiredApp / package name
out=distOutput directory
format=folderfolder | msi | exe
serez-ui=Path to serez-ui if the app imports it
serez-json=serez.json with the app's permissions

Which tool for what?

Serez has two packagers — they ship different kinds of apps:

ToolForOutput
serez-packDesktop / CLI / GUI apps.exe / .msi / folder
serez-apipackHTTP APIs & servicesDocker image

Next steps