|
|
||
|---|---|---|
| .. | ||
| config | ||
| installer | ||
| postgres | ||
| _common.ps1 | ||
| build_release.ps1 | ||
| check_update.ps1 | ||
| download_postgres.ps1 | ||
| install_autostart.ps1 | ||
| manifest.example.json | ||
| netx_tray.ps1 | ||
| publish_release.ps1 | ||
| README.md | ||
| setup_first_run.ps1 | ||
| start_netx_app.ps1 | ||
| stop_netx_app.ps1 | ||
| update_netx.ps1 | ||
NetX Windows packaging
Linux is unchanged: keep using your own PostgreSQL and NETX_DATABASE_URL with scripts/start_netx.sh. Nothing under this folder is required on Linux.
This directory builds a Windows deliverable with:
- Optional bundled portable PostgreSQL or external existing Postgres
- API-hosted UI (
web/dist) — no separate Vite process for end users - Program / data split so upgrades do not wipe the database
- Manual update script + check/apply updates (GitHub Releases or custom manifest)
- Optional system tray + start-at-logon
What users get
| Artifact | How |
|---|---|
NetX-x.y.z-win64.zip |
build_release.ps1 |
NetX-Setup-x.y.z.exe |
Compile installer/netx.iss with Inno Setup after staging |
Build (developer machine)
Prerequisites: Python 3.11+, Node 20+, PowerShell, network (to download PG binaries once).
cd netx
# Optional: download portable Postgres into packaging\postgres\pgsql
powershell -ExecutionPolicy Bypass -File .\packaging\download_postgres.ps1
# Build web + stage + zip (-CreateVenv ships a ready .venv; large)
powershell -ExecutionPolicy Bypass -File .\packaging\build_release.ps1 -CreateVenv
Output:
packaging/release/netx-win64/— stage treepackaging/release/NetX-<ver>-win64.zip
Inno Setup:
ISCC.exe packaging\installer\netx.iss
Override version in the .iss or edit #define MyAppVersion.
End-user install
Setup.exe
- Run
NetX-Setup-x.y.z.exe(admin). - Files →
%ProgramFiles%\NetX\(program root). - Data →
%ProgramData%\NetX\(.env,pgdata, spool, secrets). - Optional post-install task runs
setup_first_run.ps1(choose bundled vs external DB). - Start menu: Start NetX / Stop NetX / Open NetX UI.
Zip (portable)
- Unpack anywhere.
- Marker
.portable→ data root is siblingNetXData\. - Target needs Python 3.11+ on PATH unless the zip was built with
-CreateVenv. - Run:
.\packaging\setup_first_run.ps1
.\packaging\start_netx_app.ps1
Database modes
| Mode | Behavior |
|---|---|
bundled |
Start portable PG on 127.0.0.1:15432, data in data-root pgdata\ |
external |
Do not start PG; use NETX_DATABASE_URL (same as today / Linux) |
| unset | Treated as external |
Existing Windows deploys that only set NETX_DATABASE_URL keep working: never set NETX_DB_MODE=bundled unless you want the portable engine.
Manual update
.\packaging\update_netx.ps1 -PackagePath .\NetX-0.4.0-win64.zip
Stops services, replaces program folders (netx_api, web, packaging, postgres, …), keeps the data root, restarts. Schema migrations still run via Alembic on API start.
Or reinstall a newer NetX-Setup-*.exe over the same program directory.
Check / apply updates
Default source: latest GitHub Release for hansjone/netx. Optional custom manifest via NETX_UPDATE_URL (see manifest.example.json).
# Report only (exit 0 = up to date, 10 = update available)
.\packaging\check_update.ps1
# Download zip + run update_netx.ps1
.\packaging\check_update.ps1 -Apply
Tray & autostart
# System tray: Start / Stop / Open UI / Check updates
.\packaging\netx_tray.ps1 -StartOnLaunch
# Start tray at Windows logon (current user)
.\packaging\install_autostart.ps1
# Remove: .\packaging\install_autostart.ps1 -Remove
Layout reminder
Program root (replaceable) Data root (never wiped by update)
netx_api\ web\dist\ .env
postgres\pgsql\ pgdata\ (bundled only)
packaging\ scripts\ data\auth\ data\runtime\
version.json backups\