Skip to content

Commit

Permalink
Try detecting splashscreen support
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Feb 11, 2025
1 parent 34698cb commit 38c7371
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
& "$PSScriptRoot/compile_resources.ps1"

$SupportsSplashScreen = [System.Convert]::ToBoolean($(uv run python -c "import _tkinter; print(hasattr(_tkinter, '__file__'))"))

$arguments = @(
"$PSScriptRoot/../src/AutoSplit.py",
'--onefile',
'--windowed',
'--additional-hooks-dir=Pyinstaller/hooks',
'--icon=res/icon.ico')
if ($SupportsSplashScreen) {
# https://github.com/pyinstaller/pyinstaller/issues/9022
$arguments += @('--splash=res/splash.png')
}
if ($IsWindows) {
$arguments += @(
# For now this is broken on Linux because we can't know if the target machine will support it or not
# https://github.com/pyinstaller/pyinstaller/issues/9022
'--splash=res/splash.png'
# Hidden import by winrt.windows.graphics.imaging.SoftwareBitmap.create_copy_from_surface_async
'--hidden-import=winrt.windows.foundation')
}
Expand Down

0 comments on commit 38c7371

Please sign in to comment.