From 878fbad06a7c72d3f18faad03165b12f60d6c9b1 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Sat, 12 Apr 2025 10:31:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E6=89=93=E5=8C=85=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=9B=B4=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/package.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/app/utils/package.py b/app/utils/package.py index c95b010..31bbe7a 100644 --- a/app/utils/package.py +++ b/app/utils/package.py @@ -68,9 +68,8 @@ if __name__ == "__main__": print("Packaging AUTO_MAA main program ...") os.system( - "powershell -Command python -m nuitka --standalone --onefile --mingw64" + "powershell -Command python -m nuitka --standalone --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"]}" @@ -113,28 +112,22 @@ if __name__ == "__main__": item, root_path / "AUTO_MAA" / item.name, dirs_exist_ok=True ) else: - shutil.copy(item, root_path / "AUTO_MAA" / item.name) + shutil.copy(item, root_path / "AUTO_MAA/") shutil.rmtree(root_path / "main.dist") print("Start to copy AUTO_MAA update program ...") - for item in (root_path / "downloader.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" / item.name) + shutil.copy(root_path / "AUTO_Updater.exe", root_path / "AUTO_MAA/") shutil.rmtree(root_path / "downloader.dist") print("Start to copy rescourses ...") shutil.copytree(root_path / "app", root_path / "AUTO_MAA/app") shutil.copytree(root_path / "resources", root_path / "AUTO_MAA/resources") - shutil.copy(root_path / "main.py", root_path / "AUTO_MAA/main.py") - shutil.copy(root_path / "requirements.txt", root_path / "AUTO_MAA/requirements.txt") - shutil.copy(root_path / "README.md", root_path / "AUTO_MAA/README.md") - shutil.copy(root_path / "LICENSE", root_path / "AUTO_MAA/LICENSE") + shutil.copy(root_path / "main.py", root_path / "AUTO_MAA/") + shutil.copy(root_path / "requirements.txt", root_path / "AUTO_MAA/") + shutil.copy(root_path / "README.md", root_path / "AUTO_MAA/") + shutil.copy(root_path / "LICENSE", root_path / "AUTO_MAA/") print("Start to compress ...")