diff --git a/.github/workflows/nuitka.yml b/.github/workflows/nuitka.yml index 0c9e7ff..1039551 100644 --- a/.github/workflows/nuitka.yml +++ b/.github/workflows/nuitka.yml @@ -86,7 +86,7 @@ jobs: - name: Build by nuitka shell: pwsh run: | - python -m lndl_nuitka . -y + python -m lndl_nuitka . -y -github # 集成的构建脚本 好耶! # 获取短 sha @@ -105,4 +105,4 @@ jobs: with: name: Difficult-Rocket_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}}-Build.${{github.run_number}}+${{env.short_sha}}.zip path: | - build/github/DR.dist + build/DR.dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f5a24b..74d861b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,7 +74,7 @@ jobs: - name: Build by nuitka shell: pwsh run: | - python -m lndl_nuitka . -y + python -m lndl_nuitka . -y -github # 集成的构建脚本 好耶! # 编译 dr_rs @@ -94,7 +94,7 @@ jobs: with: name: DR_full_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}} path: | - build/github/DR.dist + build/DR.dist mods/dr_game Zip-All: diff --git a/scripts/lndl-config.py b/scripts/lndl-config.py index bd9ef9d..2c73af9 100644 --- a/scripts/lndl-config.py +++ b/scripts/lndl-config.py @@ -4,6 +4,7 @@ # All rights reserved # ------------------------------- +import sys import platform from Difficult_Rocket import sdk_version, build_version @@ -52,6 +53,9 @@ def gen_pyglet_no_follow_import() -> list: return no_follow_import +is_github = "-github" in sys.argv + + def main(config: raw_config_type) -> nuitka_config_type: config = config["cli"] if platform.system() == "Darwin": @@ -69,6 +73,9 @@ def main(config: raw_config_type) -> nuitka_config_type: config["macos-app-version"] = str(sdk_version) config["nofollow-import-to"] += gen_pyglet_no_follow_import() - config["output-dir"] = "./build/nuitka-" + platform.system().lower() + if is_github: + config["output-dir"] = "./build" + else: + config["output-dir"] = "./build/nuitka-" + platform.system().lower() return config