Update after_compile.py

This commit is contained in:
沈瑗杰 2023-01-22 09:19:13 +08:00
parent 9f56d566dc
commit b87403b0f6

View File

@ -11,12 +11,20 @@ import zipfile
if sys.platform == "win32": if sys.platform == "win32":
os.system('') os.system('')
print(os.listdir('./build'))
with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip: def make_zip():
for path, sub_paths, sub_files in os.walk('./build/Difficult-Rocket'): with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
print(f'writing {path}') for path, sub_paths, sub_files in os.walk('./build/Difficult-Rocket'):
for file in sub_files: print(f'writing {path}')
file_path = os.path.join(path, file) for file in sub_files:
dist_zip.write(file_path) file_path = os.path.join(path, file)
dist_zip.write(file_path)
def remove_dev_usage():
...
if __name__ == '__main__':
print(os.listdir('./build'))
make_zip()