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.
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-packsz 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=folderYou get a folder you can zip and hand to anyone:
dist/TaskTracker/
sz.exe runtime, embedded
app.sz your app (entry)
serez.json permissionsThey run it with the bundled runtime — no install:
cd dist/TaskTracker
sz.exe app.szStep 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= | Output | Toolchain |
|---|---|---|
folder | Self-contained folder | none |
msi | Windows installer (Program Files) | WiX |
exe | Setup bundle that installs the MSI | WiX |
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=exeThe 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
| Option | Default | Description |
|---|---|---|
entry= | required | Path to the app .sz (entry point) |
name= | required | App / package name |
out= | dist | Output directory |
format= | folder | folder | 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:
| Tool | For | Output |
|---|---|---|
serez-pack | Desktop / CLI / GUI apps | .exe / .msi / folder |
| serez-apipack | HTTP APIs & services | Docker image |
Next steps
- See the serez-pack reference.
- Shipping a server instead of a desktop app? Use Serve a Model over HTTP + serez-apipack.