Feature/python build #25

Merged
shenjackyuanjie merged 28 commits from feature/python_build into main 2023-06-10 19:02:01 +08:00
2 changed files with 8 additions and 33 deletions
Showing only changes of commit d62dcc2d3c - Show all commits

View File

@ -88,31 +88,6 @@ jobs:
python nuitka_build.py --github
# 集成的构建脚本 好耶!
# - name: after build
# shell: pwsh
# run: |
# Get-ChildItem libs/fonts/Fira_Code -Recurse | Remove-Item -Force
# Get-ChildItem libs/fonts/scientifica -Recurse | Remove-Item -Force
# Remove-Item libs/fonts/Monocraft.otf -Force
# Remove-Item libs/fonts/SmileySans-Oblique.ttf -Force
# Get-ChildItem libs/fonts/HarmonyOS_Sans/HarmonyOS_Sans_Condensed/* -Recurse | Remove-Item -Force
# Get-ChildItem libs/fonts/HarmonyOS_Sans/HarmonyOS_Sans/* -Recurse | Remove-Item -Force
#
# Copy-Item libs/fonts build\DR.dist\libs\fonts -Recurse
# # Copy-Item libs\pyglet\ build\DR.dist -Recurse
#
# Rename-Item build/DR.dist Difficult-Rocket
# python ./.github/workflows/post_compile.py
upload-artifact:
runs-on: ubuntu-latest
needs:
- build-nuitka
steps:
# 获取短 sha
- name: Get short commit sha
id: get_short_sha
@ -129,4 +104,4 @@ jobs:
with:
name: Difficult-Rocket_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}}-Build.${{github.run_number}}+${{env.short_sha}}
path: |
build/main.zip
build/github/DR.dist

View File

@ -76,11 +76,11 @@ if __name__ == '__main__':
traceback.print_exc()
print('Remove Useless Files Done!')
# 压缩
with zipfile.ZipFile(Path('./build/Difficult_Rocket.zip'), 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
for path, sub_paths, sub_files in os.walk(compiler.output_path / 'DR.dist'):
print(f'writing {path}')
for file in sub_files:
file_path = os.path.join(path, file)
dist_zip.write(file_path)
print('Zip Done!')
# with zipfile.ZipFile(Path('./build/Difficult_Rocket.zip'), 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
# for path, sub_paths, sub_files in os.walk(compiler.output_path / 'DR.dist'):
# print(f'writing {path}')
# for file in sub_files:
# file_path = os.path.join(path, file)
# dist_zip.write(file_path)
# print('Zip Done!')
sys.exit(0)