feat: 试试py os.system 能不能输出

This commit is contained in:
shenjack 2022-12-29 17:26:39 +08:00
parent 746e8e35ba
commit 6b059c3e14
4 changed files with 16 additions and 5 deletions

View File

@ -5,12 +5,16 @@
# -------------------------------
import os
import sys
import zipfile
print(os.listdir('../../build'))
if sys.platform == "win32":
os.system('')
print(os.listdir('./build'))
with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
for path, sub_paths, sub_files in os.walk('../../build/DR.dist'):
for path, sub_paths, sub_files in os.walk('./build/DR.dist'):
print(f'writing {path}')
for file in sub_files:
file_path = os.path.join(path, file)

View File

@ -7,7 +7,11 @@
import os
import sys
from Difficult_Rocket import DR_runtime
print(os.curdir)
print(os.listdir('.'))
print(sys.path)
os.system(f'echo "DR_version={DR_runtime.DR_version.__str__()}" >> $GITHUB_OUTPUT')

View File

@ -81,7 +81,7 @@ jobs:
$arg += @("--include-data-dir=./libs/fonts=./libs/fonts")
$arg += @("--include-data-dir=./textures=./textures")
$arg += @("--include-data-dir=./configs=./configs")
$arg += @("--show-progress")
# $arg += @("--show-progress")
$arg += @("--assume-yes-for-download")
python -m nuitka $arg DR.py
@ -90,7 +90,8 @@ jobs:
shell: bash
run: |
arg="--standalone --assume-yes-for-download --output-dir=build "
arg+="--clang --lto=no --show-progress "
# arg+="--show-progress "
arg+="--clang --lto=no "
arg+="--nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet "
arg+="--include-data-dir=./libs/pyglet=./pyglet "
arg+="--include-data-dir=./libs/fonts=./libs/fonts "
@ -99,6 +100,7 @@ jobs:
python -m nuitka $arg DR.py
- name: after build
shell: pwsh
run: python ./.github/workflows/after_compile.py
# Uploads artifact

View File

@ -20,11 +20,12 @@ from libs.MCDR.version import Version
game_version = Version("0.6.4")
__version__ = game_version
long_version: ctypes.c_longlong = ctypes.c_longlong(2)
long_version: ctypes.c_longlong = ctypes.c_longlong(3)
"""
long_version: 一个用于标记内部协议的整数
1: 我可算想起来还有这回事了 v0.6.4
2: longlong 好耶
3: 就是试试改一下正好 compiler 要用
"""