Browse Source

Change windows to Windows

naibo 1 năm trước cách đây
mục cha
commit
a2bd496e8e
2 tập tin đã thay đổi với 36 bổ sung36 xóa
  1. 2 2
      .temp_to_pub/.gitignore
  2. 34 34
      .temp_to_pub/compress.py

+ 2 - 2
.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*

+ 34 - 34
.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"