完善打包流程
This commit is contained in:
@@ -41,6 +41,8 @@ if __name__ == "__main__":
|
||||
main_version_numb = list(map(int, version["main_version"].split(".")))
|
||||
updater_version_numb = list(map(int, version["updater_version"].split(".")))
|
||||
|
||||
print("正在打包AUTO_MAA主程序...")
|
||||
|
||||
result = subprocess.run(
|
||||
f"powershell -Command nuitka --standalone --onefile --mingw64"
|
||||
f" --enable-plugins=pyside6 --windows-console-mode=disable"
|
||||
@@ -58,6 +60,10 @@ if __name__ == "__main__":
|
||||
text=True,
|
||||
)
|
||||
|
||||
print(result.stdout)
|
||||
print(result.stderr)
|
||||
print("AUTO_MAA主程序打包完成!")
|
||||
|
||||
shutil.copy(os.path.normpath("app/utils/Updater.py"), os.path.normpath("."))
|
||||
|
||||
with open(os.path.normpath("Updater.py"), "r", encoding="utf-8") as f:
|
||||
@@ -70,6 +76,8 @@ if __name__ == "__main__":
|
||||
with open(os.path.normpath("Updater.py"), "w", encoding="utf-8") as f:
|
||||
f.write(file_content)
|
||||
|
||||
print("正在打包AUTO_MAA更新程序...")
|
||||
|
||||
result = subprocess.run(
|
||||
f"powershell -Command nuitka --standalone --onefile --mingw64"
|
||||
f" --enable-plugins=pyside6 --windows-console-mode=disable"
|
||||
@@ -87,6 +95,12 @@ if __name__ == "__main__":
|
||||
text=True,
|
||||
)
|
||||
|
||||
print(result.stdout)
|
||||
print(result.stderr)
|
||||
print("AUTO_MAA更新程序打包完成!")
|
||||
|
||||
os.remove(os.path.normpath("Updater.py"))
|
||||
|
||||
with open("update_info.txt", "w", encoding="utf-8") as f:
|
||||
print(
|
||||
f"{version_text(main_version_numb)}\n{version_text(updater_version_numb)}{version["announcement"]}",
|
||||
|
||||
Reference in New Issue
Block a user