From 45a512f3aacc53c14945f866d9ef36cc46876022 Mon Sep 17 00:00:00 2001 From: matei jordache Date: Mon, 30 Mar 2026 13:11:51 -0700 Subject: [PATCH] fix build --- scripts/build-linux.sh | 13 +++---------- scripts/build-mac.sh | 11 ++--------- scripts/build-windows.ps1 | 8 ++------ 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/scripts/build-linux.sh b/scripts/build-linux.sh index 942433c..387a088 100755 --- a/scripts/build-linux.sh +++ b/scripts/build-linux.sh @@ -1,12 +1,10 @@ #!/usr/bin/env bash set -euo pipefail -ONE_FILE=false CREATE_TAR=true while [[ $# -gt 0 ]]; do case "$1" in - --onefile) ONE_FILE=true; shift ;; --no-tar) CREATE_TAR=false; shift ;; *) echo "Unknown option: $1"; exit 1 ;; esac @@ -32,12 +30,6 @@ npm run build echo "Installing desktop build dependencies..." uv pip install -e ".[desktop]" -if $ONE_FILE; then - MODE="--onefile" -else - MODE="--onedir" -fi - echo "Packaging desktop app with PyInstaller..." $PYTHON -m PyInstaller \ desktop.py \ @@ -45,7 +37,7 @@ $PYTHON -m PyInstaller \ --clean \ --name tono \ --windowed \ - $MODE \ + --onefile \ --distpath desktop-dist \ --workpath desktop-build \ --specpath desktop-build \ @@ -54,7 +46,8 @@ $PYTHON -m PyInstaller \ --collect-all matplotlib \ --collect-all scipy \ --collect-all skimage \ - --collect-all webview + --collect-all webview \ + --copy-metadata gwyfile if $CREATE_TAR; then TAR_PATH="desktop-dist/tono-linux.tar.gz" diff --git a/scripts/build-mac.sh b/scripts/build-mac.sh index 2fb19fe..e325a4d 100755 --- a/scripts/build-mac.sh +++ b/scripts/build-mac.sh @@ -1,12 +1,10 @@ #!/usr/bin/env bash set -euo pipefail -ONE_FILE=false CREATE_DMG=true while [[ $# -gt 0 ]]; do case "$1" in - --onefile) ONE_FILE=true; shift ;; --no-dmg) CREATE_DMG=false; shift ;; *) echo "Unknown option: $1"; exit 1 ;; esac @@ -32,12 +30,6 @@ npm run build echo "Installing desktop build dependencies..." uv pip install -e ".[desktop]" -if $ONE_FILE; then - MODE="--onefile" -else - MODE="--onedir" -fi - echo "Packaging desktop app with PyInstaller..." $PYTHON -m PyInstaller \ desktop.py \ @@ -45,7 +37,7 @@ $PYTHON -m PyInstaller \ --clean \ --name tono \ --windowed \ - $MODE \ + --onefile \ --distpath desktop-dist \ --workpath desktop-build \ --specpath desktop-build \ @@ -55,6 +47,7 @@ $PYTHON -m PyInstaller \ --collect-all scipy \ --collect-all skimage \ --collect-all webview \ + --copy-metadata gwyfile \ --icon ../resources/icon.icns APP_BUNDLE="desktop-dist/tono.app" diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index fec1bc5..3a5bb2a 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 @@ -1,6 +1,3 @@ -param( - [switch]$OneFile -) Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" @@ -52,8 +49,6 @@ Write-Host "Installing desktop build dependencies..." & uv pip install -e ".[desktop]" Assert-LastExitCode "Desktop dependency installation" -$mode = if ($OneFile) { "--onefile" } else { "--onedir" } - $pyInstallerArgs = @( "-m", "PyInstaller", "desktop.py", @@ -61,7 +56,7 @@ $pyInstallerArgs = @( "--clean", "--name", "tono", "--windowed", - $mode, + "--onefile", "--distpath", "desktop-dist", "--workpath", "desktop-build", "--specpath", "desktop-build", @@ -71,6 +66,7 @@ $pyInstallerArgs = @( "--collect-all", "scipy", "--collect-all", "skimage", "--collect-all", "webview", + "--copy-metadata", "gwyfile", "--icon", "../resources/icon.ico" )