Tool

serez-pack

Package a Serez app into a self-contained installer. The sz runtime travels inside the package — end users run your app without installing Serez Code.

Install

sz install serez-pack

Output formats

format=OutputToolchain
folderSelf-contained folder, run with sz.exe app.sznone
msiWindows installer (installs to Program Files)WiX
exeBurn bundle .exe that installs the .msiWiX

Usage

Options are passed as key=value tokens (no dashes — the runtime rejects unknown --flags):

# Self-contained folder (no toolchain)
sz pack.sz entry=apps/hello.sz name=Hello out=dist format=folder

# Windows installer (.msi)
sz pack.sz entry=apps/hello.sz name=Hello out=dist format=msi

# Installer .exe (Burn bundle that wraps the .msi)
sz pack.sz entry=apps/hello.sz name=Hello out=dist format=exe

# App that uses serez-ui
sz pack.sz entry=my_app.sz name=MyApp serez-ui=../serez-ui format=msi

How it works

serez-pack copies your app, the sz runtime, and (optionally) serez-ui into one package:

<AppName>/
  sz.exe         runtime, embedded
  app.sz         your app (entry)
  serez.json     permissions
  serez-ui/      index.sz + src/  (if your app imports it)

The runtime resolves the serez-ui import from the directory of the app and ofsz.exe, so it works regardless of the working directory — in the folder, the .msi (Program Files) or the bundle .exe.

Options

OptionDefaultDescription
entry=requiredPath to the app .sz (entry)
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 permissions

WiX as a managed dependency

The msi and exe formats use WiX, declared as a dependency in the serez-pack manifest and auto-installed when missing:

"dependencies": { "wix": "5" }

If WiX is absent, serez-pack installs it withdotnet tool install --global wix (needs the .NET SDK), pinned to v5. If the dependency is not declared and WiX is missing, the msi/exe formats report it with a clear message.

Notes

serez-pack is written in pure Serez Code and does not modify the language core — it only uses the sz runtime as a regular file inside the package.