From 9b49f216c9a0c94130730adee28500b897945492 Mon Sep 17 00:00:00 2001 From: Jeffreytsai1004 Date: Wed, 15 Jan 2025 23:26:52 +0800 Subject: [PATCH] Update freeInstaller.py --- freeInstaller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freeInstaller.py b/freeInstaller.py index 3060ab6..d62f7d7 100644 --- a/freeInstaller.py +++ b/freeInstaller.py @@ -6,11 +6,11 @@ import shutil import sys if getattr(sys, 'frozen', False): - # Running in a bundle (PyInstaller) + # 在捆绑中运行(PyInstaller) source_folder = os.path.dirname(sys.executable) source_folder = os.path.join(source_folder, "metapipeFree") else: - # Running in a normal Python environment + # 在正常Python环境中运行 source_folder = os.path.dirname(os.path.abspath(__file__)) source_folder_data = os.path.join(source_folder, "data") source_folder_icons = os.path.join(source_folder, "Icons") @@ -28,12 +28,12 @@ def move_files(source_folder, destination_folder): source = os.path.join(source_folder, file_name) destination = os.path.join(destination_folder, file_name) - if os.path.isfile(source): # Check if the item is a file + if os.path.isfile(source): # 检查项是否为文件 try: shutil.copy(source, destination) except PermissionError as e: print(f"Permission error: {e}") - # Handle the permission error as needed + # 根据需要处理权限错误 def run(): if not source_folder == destination_folder: