From 755211a881158303c6ee1c3e888319921d17ddea Mon Sep 17 00:00:00 2001 From: Emmanuel Aubert Date: Sat, 24 Oct 2026 01:27:03 +0200 Subject: [PATCH] Add macOS standalone bundle build script (PyInstaller) --- build_macos.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 build_macos.sh diff --git a/build_macos.sh b/build_macos.sh new file mode 100755 index 000000000..e1b1256df --- /dev/null +++ b/build_macos.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Script de packaging PySolFC pour macOS (Apple Silicon / Intel) +set -e + +echo "--> Installation des dépendances de build..." +pip install pyinstaller + +echo "--> Création du script d execution..." +cat << "EOF" > run_app.py +import os +import sys + +resource_path = getattr(sys, "_MEIPASS", os.path.dirname(os.path.abspath(__file__))) +os.chdir(resource_path) +sys.argv[0] = os.path.join(resource_path, "pysol.py") + +from pysollib.main import main +sys.exit(main(sys.argv)) +EOF + +echo "--> Compilation du bundle .app avec PyInstaller..." +pyinstaller --noconfirm --onedir --windowed \n --name "PySolFC" \n --add-data "data:data" \n --add-data "images:images" \n --add-data "cardsets:cardsets" \n --add-data "html:html" \n --collect-all "pysollib" \n run_app.py + +rm -f run_app.py + +echo "--> Build terminé : dist/PySolFC.app"