From 67bf7f649e0a9e97bb0f48ab53be155371b3141c Mon Sep 17 00:00:00 2001 From: DLmaster Date: Sun, 13 Apr 2025 00:45:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(utils):=20=E6=94=B9=E5=9B=9E=E5=8D=95?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/package.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/app/utils/package.py b/app/utils/package.py index 1bb58a5..68ab847 100644 --- a/app/utils/package.py +++ b/app/utils/package.py @@ -71,8 +71,9 @@ if __name__ == "__main__": print("Packaging AUTO_MAA main program ...") os.system( - "powershell -Command python -m nuitka --standalone --mingw64" + "powershell -Command python -m nuitka --standalone --onefile --mingw64" " --enable-plugins=pyside6 --windows-console-mode=disable" + " --onefile-tempdir-spec='{TEMP}\\AUTO_MAA'" " --windows-icon-from-ico=resources\\icons\\AUTO_MAA.ico" " --company-name='AUTO_MAA Team' --product-name=AUTO_MAA" f" --file-version={version["main_version"]}" @@ -107,19 +108,9 @@ if __name__ == "__main__": (root_path / "AUTO_MAA").mkdir(parents=True, exist_ok=True) - print("Start to copy AUTO_MAA main program ...") - - for item in (root_path / "main.dist").iterdir(): - if item.is_dir(): - shutil.copytree( - item, root_path / "AUTO_MAA" / item.name, dirs_exist_ok=True - ) - else: - shutil.copy(item, root_path / "AUTO_MAA/") - shutil.rmtree(root_path / "main.dist") - - print("Start to copy AUTO_MAA update program ...") + print("Start to move AUTO_MAA program ...") + shutil.move(root_path / "AUTO_MAA.exe", root_path / "AUTO_MAA/") shutil.move(root_path / "AUTO_Updater.exe", root_path / "AUTO_MAA/") print("Start to copy rescourses ...")