Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lilingfengdev committed Jun 28, 2024
1 parent 69887f5 commit 25b23d7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions generate-bundle.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import os
import shutil
import subprocess
import sys
import urllib.request
import zipfile
import platform
import io
import nuitka.__main__

if platform.system() == 'Windows':
os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests pygithub imageio "
"rtoml-0.10.0-cp311-none-win_amd64.whl nuitka")
os.system("pip install rtoml-0.10.0-cp311-none-win_amd64.whl ")
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 imageio pygithub rtoml nuitka")
os.system("pip install rtoml")

os.system("python3 -m pip install pyyaml install-jdk tqdm psutil requests imageio pygithub rtoml nuitka")

if os.path.exists("dist"):
shutil.rmtree("dist")
Expand All @@ -30,7 +32,8 @@
if platform.system() == 'MacOS':
args.append("--macos-app-icon=favicon.png")
print(" ".join(args))
subprocess.call(args)
sys.argv = args
nuitka.__main__.main()

# 傻逼
# 狗屎代碼

0 comments on commit 25b23d7

Please sign in to comment.