diff --git a/generate-bundle.py b/generate-bundle.py index 221e5d3..e9acb2e 100644 --- a/generate-bundle.py +++ b/generate-bundle.py @@ -6,7 +6,7 @@ import platform if platform.system() == 'Windows': - os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub " + os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub imageio " "rtoml-0.10.0-cp311-none-win_amd64.whl nuitka") urllib.request.urlretrieve("https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-win64.zip", "upx.zip") @@ -14,7 +14,7 @@ zip.extract("upx-4.2.4-win64/upx.exe", path=os.getcwd()) shutil.move("upx-4.2.4-win64/upx.exe", os.path.join(os.getcwd(), "upx.exe")) else: - os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub rtoml nuitka") + os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests imageio pygithub rtoml nuitka") os.mkdir("dist") for file in os.listdir(os.path.join(os.getcwd(), "src")): @@ -25,9 +25,10 @@ args.append("--windows-icon-from-ico=favicon.png") if platform.system() == 'MacOS': args.append("--macos-app-icon=favicon.png") - subprocess.call(args) + subprocess.call(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if platform.system() == 'Windows': subprocess.call(["upx.exe", os.path.join(os.getcwd(), "dist", file + ".exe"), "-o", os.path.join(os.getcwd(), "dist", file + ".exe"), "-9", "-q"]) + break # 傻逼 # 狗屎代碼