From a2bd496e8e9a68cdb98ef7e2d2b4340d409803cb Mon Sep 17 00:00:00 2001 From: naibo Date: Wed, 24 Apr 2024 22:04:16 +0800 Subject: [PATCH] Change windows to Windows --- .temp_to_pub/.gitignore | 4 +-- .temp_to_pub/compress.py | 68 ++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.temp_to_pub/.gitignore b/.temp_to_pub/.gitignore index 0167622..a20a9e4 100644 --- a/.temp_to_pub/.gitignore +++ b/.temp_to_pub/.gitignore @@ -1,10 +1,10 @@ EasySpider_MacOS/easyspider_executestage EasySpider_MacOS/easyspider_executestage_full EasySpider_Linux64_x64/user_data -EasySpider_windows_x32/user_data +EasySpider_Windows_x32/user_data EasySpider EasySpider.app/ -EasySpider_windows_x64/user_data +EasySpider_Windows_x64/user_data *.tmp *.tar.gz *.7z* diff --git a/.temp_to_pub/compress.py b/.temp_to_pub/compress.py index 5d12061..6f3d196 100644 --- a/.temp_to_pub/compress.py +++ b/.temp_to_pub/compress.py @@ -69,44 +69,44 @@ easyspider_version = "0.6.2" if __name__ == "__main__": if sys.platform == "win32" and platform.architecture()[0] == "64bit": - file_name = f"EasySpider_{easyspider_version}_windows_x64.7z" - if os.path.exists("./EasySpider_windows_x64/user_data"): - shutil.rmtree("./EasySpider_windows_x64/user_data") - if os.path.exists("./EasySpider_windows_x64/Data"): - shutil.rmtree("./EasySpider_windows_x64/Data") - if os.path.exists("./EasySpider_windows_x64/execution_instances"): - shutil.rmtree("./EasySpider_windows_x64/execution_instances") - if os.path.exists("./EasySpider_windows_x64/config.json"): - os.remove("./EasySpider_windows_x64/config.json") - if os.path.exists("./EasySpider_windows_x64/mysql_config.json"): - os.remove("./EasySpider_windows_x64/mysql_config.json") - if os.path.exists("./EasySpider_windows_x64/TempUserDataFolder"): - shutil.rmtree("./EasySpider_windows_x64/TempUserDataFolder") - os.mkdir("./EasySpider_windows_x64/Data") - os.mkdir("./EasySpider_windows_x64/execution_instances") - # compress_folder_to_7z_split("./EasySpider_windows_x64", file_name) + file_name = f"EasySpider_{easyspider_version}_Windows_x64.7z" + if os.path.exists("./EasySpider_Windows_x64/user_data"): + shutil.rmtree("./EasySpider_Windows_x64/user_data") + if os.path.exists("./EasySpider_Windows_x64/Data"): + shutil.rmtree("./EasySpider_Windows_x64/Data") + if os.path.exists("./EasySpider_Windows_x64/execution_instances"): + shutil.rmtree("./EasySpider_Windows_x64/execution_instances") + if os.path.exists("./EasySpider_Windows_x64/config.json"): + os.remove("./EasySpider_Windows_x64/config.json") + if os.path.exists("./EasySpider_Windows_x64/mysql_config.json"): + os.remove("./EasySpider_Windows_x64/mysql_config.json") + if os.path.exists("./EasySpider_Windows_x64/TempUserDataFolder"): + shutil.rmtree("./EasySpider_Windows_x64/TempUserDataFolder") + os.mkdir("./EasySpider_Windows_x64/Data") + os.mkdir("./EasySpider_Windows_x64/execution_instances") + # compress_folder_to_7z_split("./EasySpider_Windows_x64", file_name) # print(f"Compress {file_name} Split successfully!") - compress_folder_to_7z("./EasySpider_windows_x64", file_name) + compress_folder_to_7z("./EasySpider_Windows_x64", file_name) print(f"Compress {file_name} successfully!") elif sys.platform == "win32" and platform.architecture()[0] == "32bit": - file_name = f"EasySpider_{easyspider_version}_windows_x32.7z" - if os.path.exists("./EasySpider_windows_x32/user_data"): - shutil.rmtree("./EasySpider_windows_x32/user_data") - if os.path.exists("./EasySpider_windows_x32/Data"): - shutil.rmtree("./EasySpider_windows_x32/Data") - if os.path.exists("./EasySpider_windows_x32/execution_instances"): - shutil.rmtree("./EasySpider_windows_x32/execution_instances") - if os.path.exists("./EasySpider_windows_x32/config.json"): - os.remove("./EasySpider_windows_x32/config.json") - if os.path.exists("./EasySpider_windows_x32/mysql_config.json"): - os.remove("./EasySpider_windows_x32/mysql_config.json") - if os.path.exists("./EasySpider_windows_x32/TempUserDataFolder"): - shutil.rmtree("./EasySpider_windows_x32/TempUserDataFolder") - os.mkdir("./EasySpider_windows_x32/Data") - os.mkdir("./EasySpider_windows_x32/execution_instances") - # compress_folder_to_7z_split("./EasySpider_windows_x32", file_name) + file_name = f"EasySpider_{easyspider_version}_Windows_x32.7z" + if os.path.exists("./EasySpider_Windows_x32/user_data"): + shutil.rmtree("./EasySpider_Windows_x32/user_data") + if os.path.exists("./EasySpider_Windows_x32/Data"): + shutil.rmtree("./EasySpider_Windows_x32/Data") + if os.path.exists("./EasySpider_Windows_x32/execution_instances"): + shutil.rmtree("./EasySpider_Windows_x32/execution_instances") + if os.path.exists("./EasySpider_Windows_x32/config.json"): + os.remove("./EasySpider_Windows_x32/config.json") + if os.path.exists("./EasySpider_Windows_x32/mysql_config.json"): + os.remove("./EasySpider_Windows_x32/mysql_config.json") + if os.path.exists("./EasySpider_Windows_x32/TempUserDataFolder"): + shutil.rmtree("./EasySpider_Windows_x32/TempUserDataFolder") + os.mkdir("./EasySpider_Windows_x32/Data") + os.mkdir("./EasySpider_Windows_x32/execution_instances") + # compress_folder_to_7z_split("./EasySpider_Windows_x32", file_name) # print(f"Compress {file_name} Split successfully!") - compress_folder_to_7z("./EasySpider_windows_x32", file_name) + compress_folder_to_7z("./EasySpider_Windows_x32", file_name) print(f"Compress {file_name} successfully!") elif sys.platform == "linux" and platform.architecture()[0] == "64bit": file_name = f"EasySpider_{easyspider_version}_Linux_x64.tar.xz"