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:
16
packaging/myGarmin.spec
Normal file
16
packaging/myGarmin.spec
Normal file
@@ -0,0 +1,16 @@
|
||||
# PyInstaller spec: one-folder, windowed build of the myGarmin app. Build with packaging\build.ps1.
|
||||
from PyInstaller.utils.hooks import collect_all, collect_data_files
|
||||
|
||||
datas = collect_data_files('mygarmin', includes=['**/*.html'])
|
||||
datas += collect_data_files('timezonefinder') + collect_data_files('tzdata')
|
||||
binaries, hidden = [], []
|
||||
for pkg in ('webview', 'clr_loader', 'pythonnet', 'garminconnect', 'curl_cffi', 'timezonefinder'): # js files, .NET bridge, native libs, tz data (needs numpy)
|
||||
d, b, h = collect_all(pkg); datas += d; binaries += b; hidden += h
|
||||
|
||||
a = Analysis(['launcher.py'], pathex=['../src'], binaries=binaries, datas=datas,
|
||||
hiddenimports=hidden + ['mygarmin.sources.garmin_api', 'mygarmin.sources.watch', 'mygarmin.cli', 'mygarmin.export', 'mygarmin.report', 'mygarmin.dedupe', 'clr'],
|
||||
excludes=['tkinter', 'matplotlib', 'pandas', 'PIL', 'pytest'], noarchive=False)
|
||||
pyz = PYZ(a.pure)
|
||||
exe = EXE(pyz, a.scripts, [], exclude_binaries=True, name='myGarmin', icon='myGarmin.ico',
|
||||
console=False, upx=False, version='version_info.txt')
|
||||
coll = COLLECT(exe, a.binaries, a.datas, name='myGarmin', upx=False)
|
||||
Reference in New Issue
Block a user