Feature/python build #25
@ -62,12 +62,12 @@ if __name__ == '__main__':
|
|||||||
print(f'Compile Time: {time.time_ns() - start_time} ns ({(time.time_ns() - start_time) / 1000_000_000} s)')
|
print(f'Compile Time: {time.time_ns() - start_time} ns ({(time.time_ns() - start_time) / 1000_000_000} s)')
|
||||||
if is_github:
|
if is_github:
|
||||||
# 去除无用字体文件
|
# 去除无用字体文件
|
||||||
shutil.rmtree(compiler.output_path / 'fonts' / 'Fira_Code', ignore_errors=True)
|
shutil.rmtree(compiler.output_path / 'DR.dist' / 'fonts' / 'Fira_Code', ignore_errors=True)
|
||||||
shutil.rmtree(compiler.output_path / 'fonts' / 'scientifica', ignore_errors=True)
|
shutil.rmtree(compiler.output_path / 'DR.dist' / 'fonts' / 'scientifica', ignore_errors=True)
|
||||||
shutil.rmtree(compiler.output_path / 'fonts' / 'HarmonyOS_Sans' / 'HarmonyOS_Sans_Condensed', ignore_errors=True)
|
shutil.rmtree(compiler.output_path / 'DR.dist' / 'fonts' / 'HarmonyOS_Sans' / 'HarmonyOS_Sans_Condensed', ignore_errors=True)
|
||||||
shutil.rmtree(compiler.output_path / 'fonts' / 'HarmonyOS_Sans' / 'HarmonyOS_Sans', ignore_errors=True)
|
shutil.rmtree(compiler.output_path / 'DR.dist' / 'fonts' / 'HarmonyOS_Sans' / 'HarmonyOS_Sans', ignore_errors=True)
|
||||||
os.remove(compiler.output_path / 'fonts' / 'Monocraft.otf')
|
os.remove(compiler.output_path / 'DR.dist' / 'fonts' / 'Monocraft.otf')
|
||||||
os.remove(compiler.output_path / 'fonts' / 'SmileySans-Oblique.ttf')
|
os.remove(compiler.output_path / 'DR.dist' / 'fonts' / 'SmileySans-Oblique.ttf')
|
||||||
# 压缩
|
# 压缩
|
||||||
with zipfile.ZipFile(Path('./build/Difficult_Rocket.zip'), 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
|
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'):
|
for path, sub_paths, sub_files in os.walk(compiler.output_path / 'DR.dist'):
|
||||||
|
Loading…
Reference in New Issue
Block a user