From 20f87f963bbda7d2dcd3dd8883622023d640fc38 Mon Sep 17 00:00:00 2001 From: lilingfengdev Date: Sun, 9 Jun 2024 13:38:20 +0800 Subject: [PATCH] fix action --- generate-bundle.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/generate-bundle.py b/generate-bundle.py index 23af81a..eb2c66a 100644 --- a/generate-bundle.py +++ b/generate-bundle.py @@ -6,18 +6,16 @@ if platform.system() == 'Windows': os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub " "rtoml-0.10.0-cp311-none-win_amd64.whl pyinstaller") -else: - os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub rtoml pyinstaller") - - -import PyInstaller.__main__ -import platform -if platform.system() == 'Windows': urllib.request.urlretrieve("https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-win64.zip", "upx.zip") zip = zipfile.ZipFile("upx.zip") 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 pyinstaller") + + +import PyInstaller.__main__ os.mkdir("dist") for file in os.listdir(os.getcwd()): if file != "utils.py" and file != "generate-bundle.py" and file.endswith(".py") and not os.path.isdir(file):