CI: build cross-platform binaries + tagged release
.gitea/workflows/release.yml builds the PySide6 GUI with PyInstaller on each self-hosted runner and, on a v* tag, publishes a Gitea Release with every platform binary attached: - windows-latest -> OBDash-windows.exe (onefile, --windowed) - self-hosted-mac -> OBDash-macos.zip (.app bundle, ditto-zipped) - docker (linux) -> OBDash-linux-x86_64 (onefile + patchelf/GL libs) - arm64 (Pi) -> OBDash-linux-aarch64 Uses softprops/action-gh-release with the auto GITEA_TOKEN; manual dispatch build-only (no release). profiles/ is bundled via --add-data; obdcore.profile.profiles_dir() now resolves sys._MEIPASS when frozen so the binary finds its vehicle profiles. Validated locally on Linux: PyInstaller onefile builds (88MB), launches offscreen, and loads bundled profiles (6 found). Build artifacts gitignored. Added .claude/gitea-ship.json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
This commit is contained in:
@@ -19,6 +19,7 @@ JSON schema (schema=1):
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from .formula import compile_formula
|
||||
@@ -42,6 +43,11 @@ class Profile:
|
||||
|
||||
|
||||
def profiles_dir():
|
||||
# In a PyInstaller bundle, profiles/ is added as data and unpacked under
|
||||
# sys._MEIPASS; otherwise it's the repo's profiles/ next to obdcore/.
|
||||
if getattr(sys, "frozen", False):
|
||||
base = getattr(sys, "_MEIPASS", os.path.dirname(sys.executable))
|
||||
return os.path.join(base, "profiles")
|
||||
return os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
|
||||
"profiles")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user