Windows installer; ship the dashboard template

- packaging/: PyInstaller spec (one folder, windowed, Python included), Inno Setup script
  (per-user install, Start menu, optional desktop icon, WebView2 check), build.ps1, app icon.
- Bundled exe also runs the CLI (output to %LOCALAPPDATA%\myGarmin\cli.log).
- Fix: .gitignore pattern dashboard*.html also hid src/mygarmin/report/dashboard.html, so the
  template was never committed and fresh clones could not build a dashboard. Patterns anchored;
  data file types (*.gpx, *.csv, *.json, *.gz, *.log) ignored too.
- Self-test runs beside an open app (own WebView2 data folder, no single-instance check).
- Neutral example values in a docstring and the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 14:10:05 +02:00
parent 7b1276f0b1
commit 39ce4e73a0
12 changed files with 692 additions and 10 deletions

View File

@@ -9,7 +9,12 @@ Everything stays on your PC: there is no server and no account, and nothing is u
> Status: early (phase 0/1 of [docs/PLAN.md](docs/PLAN.md)), command line only. A desktop window and installer come next.
## Install
Python 3.12 or newer:
**Windows:** download `myGarmin-setup-<version>.exe` from the releases page and run it. No admin rights or Python needed;
it installs for your user only and adds myGarmin to the Start menu. The app window needs Microsoft Edge WebView2,
which Windows 11 includes (setup checks and points you to Microsoft's download if it is missing).
Uninstalling removes the program only; your library folder stays where you put it.
**From source** (any OS with Python 3.12 or newer; the app window and watch-over-USB are Windows-first):
```
pip install -e . # from a checkout of this repo
pip install -e ".[api]" # also the Garmin Connect API (optional)
@@ -53,7 +58,14 @@ mygarmin update D:\myGarmin # all of the above + build + export
This repository never contains personal data. Your library folder holds your health data: keep it private.
## Development
`pip install -e ".[dev]"` then `pytest`. Tests use synthetic files only.
`pip install -e ".[dev,app]"`, then `pytest` (tests use synthetic files only) and `mygarmin-app` for the window.
Build the Windows installer (needs `pip install pyinstaller` and Inno Setup 6):
```
powershell -ExecutionPolicy Bypass -File packaging\build.ps1 # -> build\installer\myGarmin-setup-<version>.exe
```
The bundled `myGarmin.exe` also runs the command line (`myGarmin.exe status <library>`); as it has no console, output
goes to `%LOCALAPPDATA%\myGarmin\cli.log`. `MYGARMIN_SELFTEST=<file>` makes the window write what it shows and close.
## Licence
MIT, see [LICENSE](LICENSE).