build(electron): app now builds and runs on macOS as a standalone app

This commit is contained in:
2025-08-10 15:09:23 -04:00
parent 7cfc70632b
commit 63bc3a198d
7 changed files with 139 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
# -*- mode: python ; coding: utf-8 -*-
import sys
import os
from pathlib import Path
# This is a PyInstaller spec file. It is used to bundle the Python backend
@@ -14,6 +15,15 @@ project_root = Path(SPECPATH).parent
# We need to add the project root to the path so that PyInstaller can find the 'fourdst' module.
sys.path.insert(0, str(project_root))
# Platform-specific configurations
platform = sys.platform
print(f"Building for platform: {platform}")
# Determine executable name based on platform
exe_name = 'fourdst-backend'
if platform == 'win32':
exe_name += '.exe'
# The main script to be bundled.
analysis = Analysis(['bridge.py'],
pathex=[str(project_root)],
@@ -35,7 +45,7 @@ exe = EXE(pyz,
analysis.scripts,
[],
exclude_binaries=True,
name='fourdst-backend',
name=exe_name,
debug=False,
bootloader_ignore_signals=False,
strip=False,