2022-11-18 23:57:03 +08:00
|
|
|
$start_time = Get-Uptime
|
2022-11-20 20:25:46 +08:00
|
|
|
Write-Output $start_time
|
2023-01-02 19:22:22 +08:00
|
|
|
|
2023-02-26 08:46:04 +08:00
|
|
|
python3 .github/workflows/get_info.py -env
|
2023-01-06 21:29:13 +08:00
|
|
|
|
|
|
|
if (-Not (Test-Path -Path "./.github/workflows/env.ps1"))
|
|
|
|
{
|
|
|
|
Throw "No env file found as ./github/workflows/env.ps1 !"
|
|
|
|
}
|
|
|
|
|
|
|
|
./.github/workflows/env.ps1
|
2023-01-06 20:01:34 +08:00
|
|
|
|
2023-01-02 19:22:22 +08:00
|
|
|
$arg = @()
|
|
|
|
# 输出配置
|
|
|
|
$arg += @("--standalone")
|
2023-01-24 09:59:38 +08:00
|
|
|
$arg += @("--output-dir=build/nuitka-mac")
|
2023-01-02 19:22:22 +08:00
|
|
|
$arg += @("--company-name=tool-shenjack-workshop")
|
|
|
|
$arg += @("--product-name=Difficult-Rocket")
|
2023-01-06 21:29:13 +08:00
|
|
|
$arg += @("--product-version=$env:DR_version")
|
|
|
|
$arg += @("--file-version=$env:Build_version")
|
2023-01-02 19:22:22 +08:00
|
|
|
$arg += @("--file-description=Difficult-Rocket!")
|
2023-01-03 15:34:06 +08:00
|
|
|
$arg += @("--macos-app-icon=textures/icon.png")
|
2023-01-02 19:22:22 +08:00
|
|
|
# 编译器配置
|
|
|
|
$arg += @("--clang")
|
|
|
|
$arg += @("--lto=no")
|
2023-04-09 01:28:02 +08:00
|
|
|
# 包配置
|
2023-06-08 23:06:30 +08:00
|
|
|
$arg += @("--nofollow-import-to=objprint,pillow,PIL,cffi,pydoc")
|
2023-04-09 01:28:02 +08:00
|
|
|
$arg += @("--follow-import-to=pyglet")
|
2023-01-02 19:22:22 +08:00
|
|
|
# 数据配置
|
|
|
|
$arg += @("--include-data-dir=./libs/fonts=./libs/fonts")
|
|
|
|
$arg += @("--include-data-dir=./textures=./textures")
|
|
|
|
$arg += @("--include-data-dir=./configs=./configs")
|
2023-06-08 23:06:30 +08:00
|
|
|
$arg += @("--include-package=Difficult_Rocket.api")
|
2023-01-02 19:22:22 +08:00
|
|
|
# 编译配置
|
|
|
|
$arg += @("--show-memory")
|
|
|
|
$arg += @("--show-progress")
|
2023-01-24 10:14:17 +08:00
|
|
|
python3.9 -m nuitka $arg $args DR.py
|
2023-01-02 19:22:22 +08:00
|
|
|
|
2022-11-18 23:57:03 +08:00
|
|
|
$end_time = Get-Uptime
|
|
|
|
$out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds
|
2023-05-09 20:48:06 +08:00
|
|
|
|
2022-11-22 11:43:46 +08:00
|
|
|
Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s
|
2022-11-20 20:25:46 +08:00
|
|
|
Write-Output $start_time $end_time
|
2023-01-24 09:59:38 +08:00
|
|
|
Write-Output "--clang --lto=no and ($args)"
|
2023-02-07 15:30:08 +08:00
|
|
|
|
2022-11-18 23:57:03 +08:00
|
|
|
# --include-data-dir=./libs/pyglet=./pyglet
|
|
|
|
# --run
|
|
|
|
# --disable-ccache
|