bugfix: log directory now writes to appdata folder, avoiding permissions issues. log folder accessible from tray icon.

doc: deployment/build doc added
This commit is contained in:
serversdwn
2026-03-17 01:10:40 -04:00
parent e67b6eb89f
commit 504ee1d470
5 changed files with 137 additions and 6 deletions

117
BUILDING.md Normal file
View File

@@ -0,0 +1,117 @@
# Building & Releasing Series 3 Watcher
## Prerequisites (Win7 VM — do this once)
- Python 3.7.2 (or 3.8.10 if SP1 is installed)
- Inno Setup 6 — installed at `C:\Program Files (x86)\Inno Setup 6\`
- PyInstaller, pystray, Pillow — installed automatically by `build.bat`
The Win7 VM is the build machine. All builds must happen there to ensure
compatibility with the production DL2 computer.
---
## First-Time Install on a New Machine
Do this when setting up a brand new machine that has never had the watcher before.
**Step 1 — Build the .exe (on the Win7 VM)**
1. Copy the `series3-watcher/` folder to the VM (shared folder, USB, etc.)
2. Double-click `build.bat`
3. Wait for it to finish — output: `dist\series3-watcher.exe`
**Step 2 — Build the installer (on the Win7 VM)**
1. Open `installer.iss` in Inno Setup Compiler
2. Click **Build → Compile**
3. Output: `Output\series3-watcher-setup.exe`
**Step 3 — Create a Gitea release**
1. On your main machine, go to `https://gitea.serversdown.net/serversdown/series3-watcher`
2. Click **Releases → New Release**
3. Set the tag to match the version in `series3_watcher.py` (e.g. `v1.4.1`)
4. Upload **both** files as release assets:
- `dist\series3-watcher.exe` — used by the auto-updater on existing installs
- `Output\series3-watcher-setup.exe` — used for fresh installs
**Step 4 — Install on the target machine**
1. Download `series3-watcher-setup.exe` from the Gitea release
2. Run it on the target machine — installs to `C:\Program Files\Series3Watcher\`
3. The watcher launches automatically after install (or on next login)
4. The Setup Wizard appears on first run — fill in the Terra-View URL and Blastware path
---
## Releasing an Update (existing machines auto-update)
Do this for any code change — bug fix, new feature, etc.
**Step 1 — Bump the version**
In `series3_watcher.py`, update the `VERSION` string:
```python
VERSION = "1.4.2" # increment appropriately
```
Also update `installer.iss`:
```
AppVersion=1.4.2
```
**Step 2 — Build the .exe (on the Win7 VM)**
1. Pull the latest code to the VM
2. Double-click `build.bat`
3. Output: `dist\series3-watcher.exe`
> For hotfixes you can skip Inno Setup — existing machines only need the `.exe`.
> Only rebuild the installer if you need a fresh install package for a new machine.
**Step 3 — Create a Gitea release**
1. Go to `https://gitea.serversdown.net/serversdown/series3-watcher`
2. Click **Releases → New Release**
3. Tag must match the new version exactly (e.g. `v1.4.2`) — the auto-updater
compares this tag against its own version to decide whether to update
4. Upload `dist\series3-watcher.exe` as a release asset
5. Optionally upload `Output\series3-watcher-setup.exe` if you rebuilt the installer
**Step 4 — Done**
Existing installs check Gitea every ~5 minutes. When they see the new tag they
will download `series3-watcher.exe`, swap it in place, and relaunch silently.
No user action required on the target machine.
---
## Version Numbering
Follows Semantic Versioning: `MAJOR.MINOR.PATCH`
| Change type | Example |
|-------------|---------|
| Bug fix / text change | `1.4.1 → 1.4.2` |
| New feature | `1.4.x → 1.5.0` |
| Breaking change | `1.x.x → 2.0.0` |
---
## Files That Go in the Gitea Release
| File | Required for | Notes |
|------|-------------|-------|
| `dist\series3-watcher.exe` | Auto-updates on existing machines | Always upload this |
| `Output\series3-watcher-setup.exe` | Fresh installs on new machines | Only needed for new deployments |
---
## Files That Are NOT Committed to Git
- `dist/` — PyInstaller output
- `Output/` — Inno Setup output
- `build/` — PyInstaller temp files
- `*.spec` — PyInstaller spec file
- `config.ini` — machine-specific, never commit
- `agent_logs/` — log files