From a87e5c9ec83900534140c23074e7aec4ea9731d5 Mon Sep 17 00:00:00 2001 From: shenjack-mac <3695888@qq.com> Date: Sun, 9 Apr 2023 01:28:02 +0800 Subject: [PATCH] update nuitka build script --- nuitka-mac.ps1 | 15 ++++++++------- nuitka-win.ps1 | 3 +-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nuitka-mac.ps1 b/nuitka-mac.ps1 index d109e82..0a272d4 100644 --- a/nuitka-mac.ps1 +++ b/nuitka-mac.ps1 @@ -10,12 +10,12 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1")) ./.github/workflows/env.ps1 -cd libs -cd Difficult_Rocket_rs -cd src +Set-Location libs +Set-Location Difficult_Rocket_rs +Set-Location src python3.9 setup.py build -python3.9 post_build.py -cd ../../.. +python3 post_build.py +Set-Location ../../.. $arg = @() # 输出配置 @@ -30,15 +30,16 @@ $arg += @("--macos-app-icon=textures/icon.png") # 编译器配置 $arg += @("--clang") $arg += @("--lto=no") +# 包配置 +$arg += @("--nofollow-import-to=objprint,pillow,PIL,cffi") +$arg += @("--follow-import-to=pyglet") # 数据配置 -$arg += @("--include-data-dir=./libs/pyglet=./pyglet") $arg += @("--include-data-dir=./libs/fonts=./libs/fonts") $arg += @("--include-data-dir=./textures=./textures") $arg += @("--include-data-dir=./configs=./configs") # 编译配置 $arg += @("--show-memory") $arg += @("--show-progress") -#$arg += @("--assume-yes-for-download") python3.9 -m nuitka $arg $args DR.py $end_time = Get-Uptime diff --git a/nuitka-win.ps1 b/nuitka-win.ps1 index 89ce523..4feda60 100644 --- a/nuitka-win.ps1 +++ b/nuitka-win.ps1 @@ -42,7 +42,6 @@ $arg += @("--include-data-dir=./configs=./configs") # 编译配置 $arg += @("--show-memory") $arg += @("--show-progress") -$arg += @("--assume-yes-for-download") python3.8.exe -m nuitka $arg $args DR.py $end_time = Get-Uptime @@ -50,7 +49,7 @@ $out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s Write-Output $start_time $end_time Write-Output "--clang --msvc=latest --lto=no and $args" -#Copy-Item .\libs\pyglet\ .\build\nuitka-win\DR.dist -Recurse + # --include-data-dir=./libs/pyglet=./pyglet # --run # --disable-ccache