update nuitka build script

This commit is contained in:
shenjack-mac 2023-04-09 01:28:02 +08:00
parent 0ffbd5a1e4
commit a87e5c9ec8
2 changed files with 9 additions and 9 deletions

View File

@ -10,12 +10,12 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1"))
./.github/workflows/env.ps1 ./.github/workflows/env.ps1
cd libs Set-Location libs
cd Difficult_Rocket_rs Set-Location Difficult_Rocket_rs
cd src Set-Location src
python3.9 setup.py build python3.9 setup.py build
python3.9 post_build.py python3 post_build.py
cd ../../.. Set-Location ../../..
$arg = @() $arg = @()
# 输出配置 # 输出配置
@ -30,15 +30,16 @@ $arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置 # 编译器配置
$arg += @("--clang") $arg += @("--clang")
$arg += @("--lto=no") $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=./libs/fonts=./libs/fonts")
$arg += @("--include-data-dir=./textures=./textures") $arg += @("--include-data-dir=./textures=./textures")
$arg += @("--include-data-dir=./configs=./configs") $arg += @("--include-data-dir=./configs=./configs")
# 编译配置 # 编译配置
$arg += @("--show-memory") $arg += @("--show-memory")
$arg += @("--show-progress") $arg += @("--show-progress")
#$arg += @("--assume-yes-for-download")
python3.9 -m nuitka $arg $args DR.py python3.9 -m nuitka $arg $args DR.py
$end_time = Get-Uptime $end_time = Get-Uptime

View File

@ -42,7 +42,6 @@ $arg += @("--include-data-dir=./configs=./configs")
# 编译配置 # 编译配置
$arg += @("--show-memory") $arg += @("--show-memory")
$arg += @("--show-progress") $arg += @("--show-progress")
$arg += @("--assume-yes-for-download")
python3.8.exe -m nuitka $arg $args DR.py python3.8.exe -m nuitka $arg $args DR.py
$end_time = Get-Uptime $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 $end_time.TotalSeconds $start_time.TotalSeconds $out s
Write-Output $start_time $end_time Write-Output $start_time $end_time
Write-Output "--clang --msvc=latest --lto=no and $args" 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 # --include-data-dir=./libs/pyglet=./pyglet
# --run # --run
# --disable-ccache # --disable-ccache