From a92fa79c0b6eba9c7af045eb6550a48c69247603 Mon Sep 17 00:00:00 2001 From: Rim Date: Mon, 18 Dec 2023 06:12:33 -0500 Subject: [PATCH] Rebrand to T7x & update variables/links --- README.md | 32 ++--- build.py | 24 ++-- .../resources/Refresh_icon.svg.png | Bin .../resources/b_map_image.png | Bin .../resources/b_mod_image.png | Bin .../resources/default_library_img.png | Bin .../resources/map_image.png | Bin .../resources/mod_image.png | Bin .../resources/ryuk.ico | Bin .../resources/ryuk.png | Bin .../resources/sett10.png | Bin .../resources/t7xwd_blue.json | 2 +- .../resources/t7xwd_ghost.json | 2 +- .../resources/t7xwd_grey.json | 2 +- .../resources/t7xwd_neonbanana.json | 2 +- .../resources/t7xwd_obsidian.json | 2 +- .../resources/t7xwd_test.json | 2 +- .../resources/t7xwd_theme.json | 2 +- .../resources/update_icon.png | Bin .../src/CTkListbox/__init__.py | 0 .../src/CTkListbox/ctk_listbox.py | 0 .../src/CTkToolTip/__init__.py | 0 .../src/CTkToolTip/ctk_tooltip.py | 0 .../src/__init__.py | 0 .../src/helpers.py | 41 ++++--- .../src/imports.py | 8 +- .../src/library_tab.py | 24 ++-- .../src/main.py | 42 +++---- .../src/settings_tab.py | 116 +++++++++--------- .../src/shared_vars.py | 2 +- .../src/update_window.py | 6 +- .../boiiiwd.py => t7xwd_package/t7xwd.py | 0 32 files changed, 155 insertions(+), 154 deletions(-) rename {boiiiwd_package => t7xwd_package}/resources/Refresh_icon.svg.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/b_map_image.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/b_mod_image.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/default_library_img.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/map_image.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/mod_image.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/ryuk.ico (100%) rename {boiiiwd_package => t7xwd_package}/resources/ryuk.png (100%) rename {boiiiwd_package => t7xwd_package}/resources/sett10.png (100%) rename boiiiwd_package/resources/boiiiwd_blue.json => t7xwd_package/resources/t7xwd_blue.json (99%) rename boiiiwd_package/resources/boiiiwd_ghost.json => t7xwd_package/resources/t7xwd_ghost.json (99%) rename boiiiwd_package/resources/boiiiwd_grey.json => t7xwd_package/resources/t7xwd_grey.json (99%) rename boiiiwd_package/resources/boiiiwd_neonbanana.json => t7xwd_package/resources/t7xwd_neonbanana.json (99%) rename boiiiwd_package/resources/boiiiwd_obsidian.json => t7xwd_package/resources/t7xwd_obsidian.json (99%) rename boiiiwd_package/resources/boiiiwd_test.json => t7xwd_package/resources/t7xwd_test.json (99%) rename boiiiwd_package/resources/boiiiwd_theme.json => t7xwd_package/resources/t7xwd_theme.json (99%) rename {boiiiwd_package => t7xwd_package}/resources/update_icon.png (100%) rename {boiiiwd_package => t7xwd_package}/src/CTkListbox/__init__.py (100%) rename {boiiiwd_package => t7xwd_package}/src/CTkListbox/ctk_listbox.py (100%) rename {boiiiwd_package => t7xwd_package}/src/CTkToolTip/__init__.py (100%) rename {boiiiwd_package => t7xwd_package}/src/CTkToolTip/ctk_tooltip.py (100%) rename {boiiiwd_package => t7xwd_package}/src/__init__.py (100%) rename {boiiiwd_package => t7xwd_package}/src/helpers.py (92%) rename {boiiiwd_package => t7xwd_package}/src/imports.py (85%) rename {boiiiwd_package => t7xwd_package}/src/library_tab.py (98%) rename {boiiiwd_package => t7xwd_package}/src/main.py (98%) rename {boiiiwd_package => t7xwd_package}/src/settings_tab.py (88%) rename {boiiiwd_package => t7xwd_package}/src/shared_vars.py (54%) rename {boiiiwd_package => t7xwd_package}/src/update_window.py (97%) rename boiiiwd_package/boiiiwd.py => t7xwd_package/t7xwd.py (100%) diff --git a/README.md b/README.md index 140986c..b912f43 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,42 @@ -# BOIIIWD -- A Feature-rich GUI Steam Workshop downloader for BO3 ([boiii client](https://github.com/Ezz-lol/boiii-free)) built using CustomTkinter
+# T7xWD +- A Feature-rich GUI Steam Workshop downloader for BO3 ([T7x client](https://github.com/Ezz-lol/T7x-free)) built using CustomTkinter
- - + +
- - + +
## Usage (exe): -- Run [BOIIIWD.exe](https://github.com/faroukbmiled/BOIIIWD/releases/latest/download/Release.zip) and use it (it'll ask you to download steamcmd within the app if not found) +- Run [T7xWD.exe](https://github.com/faroukbmiled/T7xWD/releases/latest/download/Release.zip) and use it (it'll ask you to download steamcmd within the app if not found) - That's it slap in your workshop item link or just the id then hit Download and wait for it to finish, when it does just launch your game (Please check [Notes](#notes) before you ask anything) - If the exe is getting flagged as a virus by your ac it is obviously a false positive, if you still do not trust it you can [compile/freeze](#freezing) it yourself ([VirusTotal Scan](https://www.virustotal.com/gui/file/9df159098638ab8a8bec7205eeb271cb5891c19cdbb81bcd5368dfc1ef213f76/detection)) ## Usage (script): -- ```pip install -r requirements.txt``` -> use my modified [CTkToolTip](./CTkToolTip) and [CTkListbox](./CTkListbox) for [v0.2.8](https://github.com/faroukbmiled/BOIIIWD/releases) and up -- ```python boiiiwd_package\boiiiwd.py``` +- ```pip install -r requirements.txt``` -> use my modified [CTkToolTip](./CTkToolTip) and [CTkListbox](./CTkListbox) for [v0.2.8](https://github.com/faroukbmiled/T7xWD/releases) and up +- ```python T7xwd_package\T7xwd.py``` - Slap in your workshop item link for example: "https://steamcommunity.com/sharedfiles/filedetails/?id=3011930738" or just the id 3011930738 ## Features: - Improves steamcmd's stability while downloading -- Auto installs mods and maps to boiii +- Auto installs mods and maps to T7x - Queue -> download items in queue - Library tab -> lists your downloaded items - Item updater -> Checks your items for updates (redownloads them,no way for now to "update" them only) -> Under Library tab -- Steam to boiii -> Item mover (moves items (mods,maps) from steam to boiii client) -> Under settings tab +- Steam to T7x -> Item mover (moves items (mods,maps) from steam to T7x client) -> Under settings tab - Themes -> Under settings tab - Bunch of useful settings -> Under settings tab ## Freezing into an exe (pyinstaller): -- ```pip install -r requirements.txt``` -> use my modified [CTkToolTip](./CTkToolTip) and [CTkListbox](./CTkListbox) for [v0.2.8](https://github.com/faroukbmiled/BOIIIWD/releases) and up. +- ```pip install -r requirements.txt``` -> use my modified [CTkToolTip](./CTkToolTip) and [CTkListbox](./CTkListbox) for [v0.2.8](https://github.com/faroukbmiled/T7xWD/releases) and up. - ```python build.py``` ## Queue tab (beta) @@ -62,9 +62,9 @@ or
* If you do not know where to find your map in-game check this [video](https://youtu.be/XIQjfXXlgQs?t=260) out ,for mods find "mods" in the game's main menu
* Initializing SteamCMD for the first time could take some time depending on your internet speed
* New item update window: Right click on an item (mouse3) -> will open the item in the browser (Steam Workshop)
-* BOIIIWD requires having "boiiiwd_library.json" in the app's directory for the new features to work -> clicking on the library tab will generate the JSON file (please don't touch it)
-* [v0.3.1](https://github.com/faroukbmiled/BOIIIWD/releases) and up program will use windows registry to save window coordinates (height , width ,x_pos, y_pos) -* For Item Updater to recognize your Item as a valid one is to have it's folder named either "FolderName ,"PublisherID" or "FolderName_PublisherID" (taken from workshop.json from each item) -> Invalid items will have a warning icon in library and will not be checked for updates -> Downloading items from boiiiwd will be valid by default +* T7xWD requires having "T7xwd_library.json" in the app's directory for the new features to work -> clicking on the library tab will generate the JSON file (please don't touch it)
+* [v0.3.1](https://github.com/faroukbmiled/T7xWD/releases) and up program will use windows registry to save window coordinates (height , width ,x_pos, y_pos) +* For Item Updater to recognize your Item as a valid one is to have it's folder named either "FolderName ,"PublisherID" or "FolderName_PublisherID" (taken from workshop.json from each item) -> Invalid items will have a warning icon in library and will not be checked for updates -> Downloading items from T7xwd will be valid by default * Invalid items will still work in game but will not be checked for updates #### PS (Library tab):
@@ -87,4 +87,4 @@ or
- [ ] add an option to login with your account => delayed (do we really need it?) ### Themes: -- If you choose "custom" theme a file called boiiiwd_theme.json will be created in the current folder (where the exe at) , Don't add anything or edit any keyes just modify the colours, If you mess up something you can just rename the file and it'll go back to the default theme (you can always press custom again and the file will be created again, based on which theme you choose before) +- If you choose "custom" theme a file called T7xwd_theme.json will be created in the current folder (where the exe at) , Don't add anything or edit any keyes just modify the colours, If you mess up something you can just rename the file and it'll go back to the default theme (you can always press custom again and the file will be created again, based on which theme you choose before) diff --git a/build.py b/build.py index 4325a82..97c519b 100644 --- a/build.py +++ b/build.py @@ -5,9 +5,9 @@ from distutils.sysconfig import get_python_lib site_packages_path = get_python_lib() -NAME = "BOIIIWD" -SCRIPT = "boiiiwd_package/boiiiwd.py" -ICON = "boiiiwd_package/resources/ryuk.ico" +NAME = "T7xWD" +SCRIPT = "T7xwd_package/T7xwd.py" +ICON = "T7xwd_package/resources/ryuk.ico" PyInstaller.__main__.run([ "{}".format(SCRIPT), @@ -16,18 +16,18 @@ PyInstaller.__main__.run([ "--onefile", "--windowed", "--icon", f"{ICON}", - "--add-data", "boiiiwd_package/resources;resources", - "--add-data", "boiiiwd_package/src;imports", - "--add-data", "boiiiwd_package/src;helpers", - "--add-data", "boiiiwd_package/src;shared_vars", - "--add-data", "boiiiwd_package/src;library_tab", - "--add-data", "boiiiwd_package/src;settings_tab", - "--add-data", "boiiiwd_package/src;update_window", - "--add-data", "boiiiwd_package/src;main", + "--add-data", "T7xwd_package/resources;resources", + "--add-data", "T7xwd_package/src;imports", + "--add-data", "T7xwd_package/src;helpers", + "--add-data", "T7xwd_package/src;shared_vars", + "--add-data", "T7xwd_package/src;library_tab", + "--add-data", "T7xwd_package/src;settings_tab", + "--add-data", "T7xwd_package/src;update_window", + "--add-data", "T7xwd_package/src;main", "--add-data", f"{site_packages_path}/customtkinter;customtkinter", "--add-data", f"{site_packages_path}/CTkMessagebox;CTkMessagebox", "--add-data", f"{site_packages_path}/CTkToolTip;CTkToolTip", ]) current_directory = os.path.dirname(__file__) -shutil.copy2(os.path.join(current_directory, "dist", "BOIIIWD.exe"), current_directory) +shutil.copy2(os.path.join(current_directory, "dist", "T7xWD.exe"), current_directory) diff --git a/boiiiwd_package/resources/Refresh_icon.svg.png b/t7xwd_package/resources/Refresh_icon.svg.png similarity index 100% rename from boiiiwd_package/resources/Refresh_icon.svg.png rename to t7xwd_package/resources/Refresh_icon.svg.png diff --git a/boiiiwd_package/resources/b_map_image.png b/t7xwd_package/resources/b_map_image.png similarity index 100% rename from boiiiwd_package/resources/b_map_image.png rename to t7xwd_package/resources/b_map_image.png diff --git a/boiiiwd_package/resources/b_mod_image.png b/t7xwd_package/resources/b_mod_image.png similarity index 100% rename from boiiiwd_package/resources/b_mod_image.png rename to t7xwd_package/resources/b_mod_image.png diff --git a/boiiiwd_package/resources/default_library_img.png b/t7xwd_package/resources/default_library_img.png similarity index 100% rename from boiiiwd_package/resources/default_library_img.png rename to t7xwd_package/resources/default_library_img.png diff --git a/boiiiwd_package/resources/map_image.png b/t7xwd_package/resources/map_image.png similarity index 100% rename from boiiiwd_package/resources/map_image.png rename to t7xwd_package/resources/map_image.png diff --git a/boiiiwd_package/resources/mod_image.png b/t7xwd_package/resources/mod_image.png similarity index 100% rename from boiiiwd_package/resources/mod_image.png rename to t7xwd_package/resources/mod_image.png diff --git a/boiiiwd_package/resources/ryuk.ico b/t7xwd_package/resources/ryuk.ico similarity index 100% rename from boiiiwd_package/resources/ryuk.ico rename to t7xwd_package/resources/ryuk.ico diff --git a/boiiiwd_package/resources/ryuk.png b/t7xwd_package/resources/ryuk.png similarity index 100% rename from boiiiwd_package/resources/ryuk.png rename to t7xwd_package/resources/ryuk.png diff --git a/boiiiwd_package/resources/sett10.png b/t7xwd_package/resources/sett10.png similarity index 100% rename from boiiiwd_package/resources/sett10.png rename to t7xwd_package/resources/sett10.png diff --git a/boiiiwd_package/resources/boiiiwd_blue.json b/t7xwd_package/resources/t7xwd_blue.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_blue.json rename to t7xwd_package/resources/t7xwd_blue.json index 4d32e6f..28c7e13 100644 --- a/boiiiwd_package/resources/boiiiwd_blue.json +++ b/t7xwd_package/resources/t7xwd_blue.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#0e2540", "button_normal_state_color": "#1f538d", "progress_bar_fill_color": "#1f538d", diff --git a/boiiiwd_package/resources/boiiiwd_ghost.json b/t7xwd_package/resources/t7xwd_ghost.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_ghost.json rename to t7xwd_package/resources/t7xwd_ghost.json index 12d6599..f708ceb 100644 --- a/boiiiwd_package/resources/boiiiwd_ghost.json +++ b/t7xwd_package/resources/t7xwd_ghost.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#a9b8c4", "button_normal_state_color": "#11202b", "progress_bar_fill_color": "#a9b8c4", diff --git a/boiiiwd_package/resources/boiiiwd_grey.json b/t7xwd_package/resources/t7xwd_grey.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_grey.json rename to t7xwd_package/resources/t7xwd_grey.json index 34ed76c..70a9c90 100644 --- a/boiiiwd_package/resources/boiiiwd_grey.json +++ b/t7xwd_package/resources/t7xwd_grey.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#28292b", "button_normal_state_color": "#3e3f42", "progress_bar_fill_color": "#616368", diff --git a/boiiiwd_package/resources/boiiiwd_neonbanana.json b/t7xwd_package/resources/t7xwd_neonbanana.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_neonbanana.json rename to t7xwd_package/resources/t7xwd_neonbanana.json index b3a61ec..4b6f17c 100644 --- a/boiiiwd_package/resources/boiiiwd_neonbanana.json +++ b/t7xwd_package/resources/t7xwd_neonbanana.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#200c00", "button_normal_state_color": "#532000", "progress_bar_fill_color": "#814007", diff --git a/boiiiwd_package/resources/boiiiwd_obsidian.json b/t7xwd_package/resources/t7xwd_obsidian.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_obsidian.json rename to t7xwd_package/resources/t7xwd_obsidian.json index 9fe89f2..5dea2ad 100644 --- a/boiiiwd_package/resources/boiiiwd_obsidian.json +++ b/t7xwd_package/resources/t7xwd_obsidian.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#070d13", "button_normal_state_color": "#11202b", "progress_bar_fill_color": "#11202b", diff --git a/boiiiwd_package/resources/boiiiwd_test.json b/t7xwd_package/resources/t7xwd_test.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_test.json rename to t7xwd_package/resources/t7xwd_test.json index dba1518..7058a69 100644 --- a/boiiiwd_package/resources/boiiiwd_test.json +++ b/t7xwd_package/resources/t7xwd_test.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#070d13", "button_normal_state_color": "#11202b", "progress_bar_fill_color": "#11202b", diff --git a/boiiiwd_package/resources/boiiiwd_theme.json b/t7xwd_package/resources/t7xwd_theme.json similarity index 99% rename from boiiiwd_package/resources/boiiiwd_theme.json rename to t7xwd_package/resources/t7xwd_theme.json index 2400ebc..bd5c814 100644 --- a/boiiiwd_package/resources/boiiiwd_theme.json +++ b/t7xwd_package/resources/t7xwd_theme.json @@ -1,5 +1,5 @@ { - "BOIIIWD_Globals": { + "T7xWD_Globals": { "button_active_state_color": "#351400", "button_normal_state_color": "#d35600", "progress_bar_fill_color": "#d35600", diff --git a/boiiiwd_package/resources/update_icon.png b/t7xwd_package/resources/update_icon.png similarity index 100% rename from boiiiwd_package/resources/update_icon.png rename to t7xwd_package/resources/update_icon.png diff --git a/boiiiwd_package/src/CTkListbox/__init__.py b/t7xwd_package/src/CTkListbox/__init__.py similarity index 100% rename from boiiiwd_package/src/CTkListbox/__init__.py rename to t7xwd_package/src/CTkListbox/__init__.py diff --git a/boiiiwd_package/src/CTkListbox/ctk_listbox.py b/t7xwd_package/src/CTkListbox/ctk_listbox.py similarity index 100% rename from boiiiwd_package/src/CTkListbox/ctk_listbox.py rename to t7xwd_package/src/CTkListbox/ctk_listbox.py diff --git a/boiiiwd_package/src/CTkToolTip/__init__.py b/t7xwd_package/src/CTkToolTip/__init__.py similarity index 100% rename from boiiiwd_package/src/CTkToolTip/__init__.py rename to t7xwd_package/src/CTkToolTip/__init__.py diff --git a/boiiiwd_package/src/CTkToolTip/ctk_tooltip.py b/t7xwd_package/src/CTkToolTip/ctk_tooltip.py similarity index 100% rename from boiiiwd_package/src/CTkToolTip/ctk_tooltip.py rename to t7xwd_package/src/CTkToolTip/ctk_tooltip.py diff --git a/boiiiwd_package/src/__init__.py b/t7xwd_package/src/__init__.py similarity index 100% rename from boiiiwd_package/src/__init__.py rename to t7xwd_package/src/__init__.py diff --git a/boiiiwd_package/src/helpers.py b/t7xwd_package/src/helpers.py similarity index 92% rename from boiiiwd_package/src/helpers.py rename to t7xwd_package/src/helpers.py index b199f86..a8f0c34 100644 --- a/boiiiwd_package/src/helpers.py +++ b/t7xwd_package/src/helpers.py @@ -29,19 +29,20 @@ def check_custom_theme(theme_name): return os.path.join(APPLICATION_PATH, theme_name) else: try: return os.path.join(RESOURCES_DIR, theme_name) - except: return os.path.join(RESOURCES_DIR, "boiiiwd_theme.json") + except: return os.path.join(RESOURCES_DIR, "T7xwd_theme.json") # theme initialization ctk.set_appearance_mode(check_config("appearance", "Dark")) # Modes: "System" (standard), "Dark", "Light" try: - ctk.set_default_color_theme(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json"))) + ctk.set_default_color_theme(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json"))) except: - save_config("theme", "boiiiwd_theme.json") - ctk.set_default_color_theme(os.path.join(RESOURCES_DIR, "boiiiwd_theme.json")) + save_config("theme", "T7xwd_theme.json") + ctk.set_default_color_theme(os.path.join(RESOURCES_DIR, "T7xwd_theme.json")) def get_latest_release_version(): try: - release_api_url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/latest" + release_api_url = f"https://git.rimmyscorner.com/api/v1/repos/{GITHUB_REPO}/releases/latest" + response = requests.get(release_api_url) response.raise_for_status() data = response.json() @@ -53,15 +54,15 @@ def get_latest_release_version(): def create_update_script(current_exe, new_exe, updater_folder, program_name): script_content = f""" @echo off - echo Terminating BOIIIWD.exe... + echo Terminating T7xWD.exe... taskkill /im "{program_name}" /t /f - echo Replacing BOIIIWD.exe... + echo Replacing T7xWD.exe... cd "{updater_folder}" taskkill /im "{program_name}" /t /f move /y "{new_exe}" "../"{program_name}"" - echo Starting BOIIIWD.exe... + echo Starting T7xWD.exe... cd .. start "" "{current_exe}" @@ -69,7 +70,7 @@ def create_update_script(current_exe, new_exe, updater_folder, program_name): exit """ - script_path = os.path.join(updater_folder, "boiiiwd_updater.bat") + script_path = os.path.join(updater_folder, "T7xwd_updater.bat") with open(script_path, "w") as script_file: script_file.write(script_content) @@ -106,7 +107,7 @@ def check_for_updates_func(window, ignore_up_todate=False): result = msg_box.get() if result == "View": - webbrowser.open(f"https://github.com/{GITHUB_REPO}/releases/latest") + webbrowser.open(f"https://git.rimmyscorner.com/{GITHUB_REPO}/releases/latest") if result == "Yes": from src.update_window import UpdateWindow @@ -162,7 +163,7 @@ def initialize_steam(master): master.attributes('-alpha', 0.0) process.wait() if is_steamcmd_initialized(): - show_message("SteamCMD has terminated!", "BOIIIWD is ready for action.", icon="info") + show_message("SteamCMD has terminated!", "T7xWD is ready for action.", icon="info") else: show_message("SteamCMD has terminated!!", "SteamCMD isn't initialized yet") except: @@ -258,18 +259,18 @@ def show_message(title, message, icon="warning", _return=False, option_1="No", o CTkMessagebox(title=title, message=message, icon=icon, sound=True) main_app.app.after(0, callback) -def launch_boiii_func(path): - procname = "boiii.exe" +def launch_T7x_func(path): + procname = "T7x.exe" try: if procname in (p.name() for p in psutil.process_iter()): for proc in psutil.process_iter(): if proc.name() == procname: proc.kill() - boiii_path = os.path.join(path, procname) - subprocess.Popen([boiii_path ,"-launch"] , cwd=path) + T7x_path = os.path.join(path, procname) + subprocess.Popen([T7x_path ,"-launch"] , cwd=path) show_message("Please wait!", "The game has launched in the background it will open up in a sec!", icon="info") except Exception as e: - show_message("Error: Failed to launch BOIII", f"Failed to launch boiii.exe\nMake sure to put in your correct boiii path\n{e}") + show_message("Error: Failed to launch T7x", f"Failed to launch T7x.exe\nMake sure to put in your correct T7x path\n{e}") def remove_tree(folder_path, show_error=None): if show_error: @@ -307,10 +308,10 @@ def get_button_state_colors(file_path, state): try: with open(file_path, 'r') as json_file: data = json.load(json_file) - if 'BOIIIWD_Globals' in data: - boiiiwd_globals = data['BOIIIWD_Globals'] - if state in boiiiwd_globals: - return boiiiwd_globals[state] + if 'T7xWD_Globals' in data: + T7xwd_globals = data['T7xWD_Globals'] + if state in T7xwd_globals: + return T7xwd_globals[state] else: return None else: diff --git a/boiiiwd_package/src/imports.py b/t7xwd_package/src/imports.py similarity index 85% rename from boiiiwd_package/src/imports.py rename to t7xwd_package/src/imports.py index f45777d..28ade78 100644 --- a/boiiiwd_package/src/imports.py +++ b/t7xwd_package/src/imports.py @@ -39,11 +39,11 @@ else: APPLICATION_PATH = os.path.dirname(os.path.abspath(__file__)) CONFIG_FILE_PATH = "config.ini" -GITHUB_REPO = "faroukbmiled/BOIIIWD" +GITHUB_REPO = "Rim/T7x-Workshop-Downloader" ITEM_INFO_API = "https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/" -LATEST_RELEASE_URL = "https://github.com/faroukbmiled/BOIIIWD/releases/latest/download/Release.zip" -LIBRARY_FILE = "boiiiwd_library.json" +LATEST_RELEASE_URL = "https://git.rimmyscorner.com/Rim/T7x-Workshop-Downloader/releases/latest" +LIBRARY_FILE = "T7xwd_library.json" RESOURCES_DIR = os.path.join(os.path.dirname(__file__), '..', 'resources') UPDATER_FOLDER = "update" -REGISTRY_KEY_PATH = r"Software\BOIIIWD" +REGISTRY_KEY_PATH = r"Software\T7xWD" VERSION = "v0.3.3" \ No newline at end of file diff --git a/boiiiwd_package/src/library_tab.py b/t7xwd_package/src/library_tab.py similarity index 98% rename from boiiiwd_package/src/library_tab.py rename to t7xwd_package/src/library_tab.py index 0d91893..b473155 100644 --- a/boiiiwd_package/src/library_tab.py +++ b/t7xwd_package/src/library_tab.py @@ -231,7 +231,7 @@ class LibraryTab(ctk.CTkScrollableFrame): item_type, item_name = item[5], item[0] return (0, item_name) if item_type == "map" else (1, item_name) - def load_items(self, boiiiFolder, dont_add=False): + def load_items(self, T7xFolder, dont_add=False): if self.refresh_next_time and not dont_add: self.refresh_next_time = False status = self.refresh_items() @@ -243,8 +243,8 @@ class LibraryTab(ctk.CTkScrollableFrame): self.ids_added.clear() self.refresh_next_time = True - maps_folder = Path(boiiiFolder) / "mods" - mods_folder = Path(boiiiFolder) / "usermaps" + maps_folder = Path(T7xFolder) / "mods" + mods_folder = Path(T7xFolder) / "usermaps" mod_img = os.path.join(RESOURCES_DIR, "mod_image.png") map_img = os.path.join(RESOURCES_DIR, "map_image.png") b_mod_img = os.path.join(RESOURCES_DIR, "b_mod_image.png") @@ -372,12 +372,12 @@ class LibraryTab(ctk.CTkScrollableFrame): self.show_no_items_message(only_up=True) return "No items in current selected folder" - def update_item(self, boiiiFolder, id, item_type, foldername): + def update_item(self, T7xFolder, id, item_type, foldername): try: if item_type == "map": - folder_path = Path(boiiiFolder) / "usermaps" / f"{foldername}" + folder_path = Path(T7xFolder) / "usermaps" / f"{foldername}" elif item_type == "mod": - folder_path = Path(boiiiFolder) / "mods" / f"{foldername}" + folder_path = Path(T7xFolder) / "mods" / f"{foldername}" else: raise ValueError("Unsupported item_type. It must be 'map' or 'mod'.") @@ -445,7 +445,7 @@ class LibraryTab(ctk.CTkScrollableFrame): self.remove_item_by_option(items_file, id) def refresh_items(self): - main_app.app.title("BOIII Workshop Downloader - Library ➜ Loading... ⏳") + main_app.app.title("T7x Workshop Downloader - Library ➜ Loading... ⏳") for label, button, button_view_list in zip(self.label_list, self.button_list, self.button_view_list): label.destroy() button.destroy() @@ -457,7 +457,7 @@ class LibraryTab(ctk.CTkScrollableFrame): self.added_folders.clear() self.ids_added.clear() status = self.load_items(main_app.app.edit_destination_folder.get().strip()) - main_app.app.title(f"BOIII Workshop Downloader - Library ➜ {status}") + main_app.app.title(f"T7x Workshop Downloader - Library ➜ {status}") # main_app library event needs a return for status => when refresh_next_time is true return status @@ -471,7 +471,7 @@ class LibraryTab(ctk.CTkScrollableFrame): if only_up: return self.no_items_label.grid(row=1, column=0, padx=10, pady=(0, 10), sticky="n") - self.no_items_label.configure(text="No items found in the selected folder. \nMake sure you have a mod/map downloaded and or have the right boiii folder selected.") + self.no_items_label.configure(text="No items found in the selected folder. \nMake sure you have a mod/map downloaded and or have the right T7x folder selected.") def hide_no_items_message(self): self.update_tooltip.configure(message="Check items for updates") @@ -669,7 +669,7 @@ class LibraryTab(ctk.CTkScrollableFrame): win_width = calc_req_width if calc_req_width < 500 else 500 description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}") - if check_config("theme", "boiiiwd_theme.json") == "boiiiwd_obsidian.json": + if check_config("theme", "T7xwd_theme.json") == "T7xwd_obsidian.json": description_label = ctk.CTkTextbox(description_window, activate_scrollbars=True, scrollbar_button_color="#5b6c7f") else: description_label = ctk.CTkTextbox(description_window, activate_scrollbars=True) @@ -884,7 +884,7 @@ class LibraryTab(ctk.CTkScrollableFrame): lib_data = None if not os.path.exists(os.path.join(APPLICATION_PATH, LIBRARY_FILE)): - show_message("Error checking for item updates! -> Setting is on", "Please visit library tab at least once with the correct boiii path!, you also need to have at least 1 item!") + show_message("Error checking for item updates! -> Setting is on", "Please visit library tab at least once with the correct T7x path!, you also need to have at least 1 item!") return with open(os.path.join(APPLICATION_PATH, LIBRARY_FILE), 'r') as file: @@ -897,7 +897,7 @@ class LibraryTab(ctk.CTkScrollableFrame): if_ids_need_update(item_ids, item_dates, texts) except: - show_message("Error checking for item updates!", "Please visit the library tab at least once with the correct boiii path!, you also need to have at least 1 item!") + show_message("Error checking for item updates!", "Please visit the library tab at least once with the correct T7x path!, you also need to have at least 1 item!") return check_for_update() diff --git a/boiiiwd_package/src/main.py b/t7xwd_package/src/main.py similarity index 98% rename from boiiiwd_package/src/main.py rename to t7xwd_package/src/main.py index 1f39bcf..97eb5cf 100644 --- a/boiiiwd_package/src/main.py +++ b/t7xwd_package/src/main.py @@ -5,12 +5,12 @@ from src.library_tab import LibraryTab from src.settings_tab import SettingsTab -class BOIIIWD(ctk.CTk): +class T7xWD(ctk.CTk): def __init__(self): super().__init__() # configure window - self.title("BOIII Workshop Downloader - Main") + self.title("T7x Workshop Downloader - Main") window_info = get_window_size_from_registry() try: @@ -88,7 +88,7 @@ class BOIIIWD(ctk.CTk): # create optionsframe self.optionsframe = ctk.CTkFrame(self) self.optionsframe.grid(row=0, column=1, rowspan=2, padx=(0, 20), pady=(20, 0), sticky="nsew") - self.txt_main = ctk.CTkLabel(self.optionsframe, text="💎 BOIIIWD 💎", font=(font, 20)) + self.txt_main = ctk.CTkLabel(self.optionsframe, text="💎 T7xWD 💎", font=(font, 20)) self.txt_main.grid(row=0, column=1, columnspan=5, padx=0, pady=(20, 20), sticky="n") # create slider and progressbar frame @@ -144,19 +144,19 @@ class BOIIIWD(ctk.CTk): self.button_browse = ctk.CTkButton(master=self.optionsframe, text="Workshop", command=self.open_browser, width=10) self.button_browse.grid(row=2, column=5, padx=(0, 20), pady=(0, 10), sticky="en") - self.button_browse_tooltip = CTkToolTip(self.button_browse, message="Will open steam workshop for boiii in your browser") + self.button_browse_tooltip = CTkToolTip(self.button_browse, message="Will open steam workshop for T7x in your browser") self.info_button = ctk.CTkButton(master=self.optionsframe, text="Details", command=self.show_map_info, width=10) self.info_button.grid(row=2, column=5, padx=(0, 20), pady=(0, 10), sticky="wn") - self.label_destination_folder = ctk.CTkLabel(master=self.optionsframe, text='Enter Your boiii folder:') + self.label_destination_folder = ctk.CTkLabel(master=self.optionsframe, text='Enter Your T7x folder:') self.label_destination_folder.grid(row=3, column=1, padx=20, pady=(0, 0), columnspan=4, sticky="ws") - self.edit_destination_folder = ctk.CTkEntry(master=self.optionsframe, placeholder_text="Your boiii Instalation folder") + self.edit_destination_folder = ctk.CTkEntry(master=self.optionsframe, placeholder_text="Your T7x Instalation folder") self.edit_destination_folder.grid(row=4, column=1, padx=20, pady=(0, 25), columnspan=4, sticky="ewn") - self.button_BOIII_browse = ctk.CTkButton(master=self.optionsframe, text="Select", command=self.open_BOIII_browser) - self.button_BOIII_browse.grid(row=4, column=5, padx=(0, 20), pady=(0, 10), sticky="ewn") + self.button_T7x_browse = ctk.CTkButton(master=self.optionsframe, text="Select", command=self.open_T7x_browser) + self.button_T7x_browse.grid(row=4, column=5, padx=(0, 20), pady=(0, 10), sticky="ewn") self.label_steamcmd_path = ctk.CTkLabel(master=self.optionsframe, text="Enter SteamCMD path:") self.label_steamcmd_path.grid(row=5, column=1, padx=20, pady=(0, 0), columnspan=3, sticky="wn") @@ -169,9 +169,9 @@ class BOIIIWD(ctk.CTk): # set default values - self.active_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "button_active_state_color") - self.normal_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "button_normal_state_color") - self.progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "progress_bar_fill_color") + self.active_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json")), "button_active_state_color") + self.normal_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json")), "button_normal_state_color") + self.progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json")), "progress_bar_fill_color") self.settings_tab.appearance_mode_optionemenu.set("Dark") self.settings_tab.scaling_optionemenu.set("100%") self.progress_bar.set(0.0) @@ -356,7 +356,7 @@ class BOIIIWD(ctk.CTk): self.slider_progressbar_frame.grid_forget() def show_main_widgets(self): - self.title("BOIII Workshop Downloader - Main") + self.title("T7x Workshop Downloader - Main") self.slider_progressbar_frame.grid(row=2, column=1, rowspan=1, padx=(0, 20), pady=(20, 20), sticky="nsew") self.optionsframe.grid(row=0, column=1, rowspan=2, padx=(0, 20), pady=(20, 0), sticky="nsew") @@ -364,7 +364,7 @@ class BOIIIWD(ctk.CTk): self.settings_tab.grid_forget() def show_settings_widgets(self): - self.title("BOIII Workshop Downloader - Settings") + self.title("T7x Workshop Downloader - Settings") self.settings_tab.grid(row=0, rowspan=3, column=1, padx=(0, 20), pady=(20, 20), sticky="nsew") self.settings_tab.load_on_switch_screen() @@ -372,13 +372,13 @@ class BOIIIWD(ctk.CTk): self.library_tab.grid_remove() def show_library_widgets(self): - self.title("BOIII Workshop Downloader - Library ➜ Loading... ⏳") + self.title("T7x Workshop Downloader - Library ➜ Loading... ⏳") status = self.library_tab.load_items(self.edit_destination_folder.get()) self.library_tab.grid(row=0, rowspan=3, column=1, padx=(0, 20), pady=(20, 20), sticky="nsew") - self.title(f"BOIII Workshop Downloader - Library ➜ {status}") + self.title(f"T7x Workshop Downloader - Library ➜ {status}") def show_queue_widgets(self): - self.title("BOIII Workshop Downloader - Queue") + self.title("T7x Workshop Downloader - Queue") self.optionsframe.grid_forget() self.queue_enabled = True self.slider_progressbar_frame.grid(row=2, column=1, rowspan=1, padx=(0, 20), pady=(20, 20), sticky="nsew") @@ -488,8 +488,8 @@ class BOIIIWD(ctk.CTk): self.queuetextarea.insert(1.0, help_text) self.queuetextarea.configure(state="disabled") - def open_BOIII_browser(self): - selected_folder = ctk.filedialog.askdirectory(title="Select boiii Folder") + def open_T7x_browser(self): + selected_folder = ctk.filedialog.askdirectory(title="Select T7x Folder") if selected_folder: self.edit_destination_folder.delete(0, "end") self.edit_destination_folder.insert(0, selected_folder) @@ -552,7 +552,7 @@ class BOIIIWD(ctk.CTk): pass self.after(0, inti_steam) else: - show_message("Error", "Failed to find steamcmd.exe after extraction.\nMake you sure to select the correct SteamCMD path (by default current BOIIIWD path)", icon="cancel") + show_message("Error", "Failed to find steamcmd.exe after extraction.\nMake you sure to select the correct SteamCMD path (by default current T7xWD path)", icon="cancel") os.remove(fr"{steamcmd_zip_path}") except requests.exceptions.RequestException as e: show_message("Error", f"Failed to download SteamCMD: {e}", icon="cancel") @@ -684,7 +684,7 @@ class BOIIIWD(ctk.CTk): win_width = calc_req_width if calc_req_width < 500 else 500 description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}") - if check_config("theme", "boiiiwd_theme.json") == "boiiiwd_obsidian.json": + if check_config("theme", "T7xwd_theme.json") == "T7xwd_obsidian.json": description_label = ctk.CTkTextbox(description_window, activate_scrollbars=True, scrollbar_button_color="#5b6c7f") else: description_label = ctk.CTkTextbox(description_window, activate_scrollbars=True) @@ -1011,7 +1011,7 @@ class BOIIIWD(ctk.CTk): msg = CTkMessagebox(title="Downloads Complete", message=message, icon="info", option_1="Launch", option_2="Ok", sound=True) response = msg.get() if response=="Launch": - launch_boiii_func(self.edit_destination_folder.get().strip()) + launch_T7x_func(self.edit_destination_folder.get().strip()) if response=="Ok": return self.after(0, callback) diff --git a/boiiiwd_package/src/settings_tab.py b/t7xwd_package/src/settings_tab.py similarity index 88% rename from boiiiwd_package/src/settings_tab.py rename to t7xwd_package/src/settings_tab.py index 6230cd1..50b0031 100644 --- a/boiiiwd_package/src/settings_tab.py +++ b/t7xwd_package/src/settings_tab.py @@ -119,20 +119,20 @@ class SettingsTab(ctk.CTkFrame): self.folder_options.grid(row=10, column=1, padx=(150, 0), pady=(3, 0), sticky="nw") self.folder_options.set(value=self.load_settings("folder_naming", "PublisherID")) - # Check for updates button n Launch boiii + # Check for updates button n Launch T7x self.check_for_updates = ctk.CTkButton(right_frame, text="Check for updates", command=self.settings_check_for_updates) self.check_for_updates.grid(row=1, column=1, padx=20, pady=(20, 0), sticky="n") - self.launch_boiii = ctk.CTkButton(right_frame, text="Launch boiii", command=self.settings_launch_boiii) - self.launch_boiii.grid(row=2, column=1, padx=20, pady=(20, 0), sticky="n") + self.launch_T7x = ctk.CTkButton(right_frame, text="Launch T7x", command=self.settings_launch_T7x) + self.launch_T7x.grid(row=2, column=1, padx=20, pady=(20, 0), sticky="n") self.reset_steamcmd = ctk.CTkButton(right_frame, text="Reset SteamCMD", command=self.settings_reset_steamcmd) self.reset_steamcmd.grid(row=3, column=1, padx=20, pady=(20, 0), sticky="n") self.reset_steamcmd_tooltip = CTkToolTip(self.reset_steamcmd, message="This will remove steamapps folder + all the maps that are potentioaly corrupted\nor not so use at ur own risk (could fix some issues as well)") - self.steam_to_boiii = ctk.CTkButton(right_frame, text="Steam to boiii", command=self.from_steam_to_boiii_toplevel) - self.steam_to_boiii.grid(row=5, column=1, padx=20, pady=(20, 0), sticky="n") - self.steam_to_boiii_tooltip = CTkToolTip(self.steam_to_boiii, message="Moves/copies maps and mods from steam to boiii (opens up a window)") + self.steam_to_T7x = ctk.CTkButton(right_frame, text="Steam to T7x", command=self.from_steam_to_T7x_toplevel) + self.steam_to_T7x.grid(row=5, column=1, padx=20, pady=(20, 0), sticky="n") + self.steam_to_T7x_tooltip = CTkToolTip(self.steam_to_T7x, message="Moves/copies maps and mods from steam to T7x (opens up a window)") # appearance self.appearance_mode_label = ctk.CTkLabel(right_frame, text="Appearance Mode:", anchor="n") @@ -146,7 +146,7 @@ class SettingsTab(ctk.CTkFrame): command=master.change_scaling_event) self.scaling_optionemenu.grid(row=9, column=1, padx=20, pady=(0, 0)) - # self.custom_theme = ctk.CTkButton(right_frame, text="Custom theme", command=self.boiiiwd_custom_theme) + # self.custom_theme = ctk.CTkButton(right_frame, text="Custom theme", command=self.T7xwd_custom_theme) # self.custom_theme.grid(row=8, column=1, padx=20, pady=(20, 0), sticky="n") self.theme_options_label = ctk.CTkLabel(right_frame, text="Themes:", anchor="n") @@ -185,24 +185,24 @@ class SettingsTab(ctk.CTkFrame): def theme_options_func(self, option: str): theme_mapping = { - "Default": "boiiiwd_theme.json", - "Blue": "boiiiwd_blue.json", - "Grey": "boiiiwd_grey.json", - "Ghost": "boiiiwd_ghost.json", - "Obsidian": "boiiiwd_obsidian.json", - "NeonBanana": "boiiiwd_neonbanana.json", - "Custom": "boiiiwd_theme.json", + "Default": "T7xwd_theme.json", + "Blue": "T7xwd_blue.json", + "Grey": "T7xwd_grey.json", + "Ghost": "T7xwd_ghost.json", + "Obsidian": "T7xwd_obsidian.json", + "NeonBanana": "T7xwd_neonbanana.json", + "Custom": "T7xwd_theme.json", } theme_file = theme_mapping.get(option) if option == "Custom": - self.boiiiwd_custom_theme() - save_config("theme", "boiiiwd_theme.json") + self.T7xwd_custom_theme() + save_config("theme", "T7xwd_theme.json") return if theme_file: - self.boiiiwd_custom_theme(disable_only=True) + self.T7xwd_custom_theme(disable_only=True) save_config("theme", theme_file) else: return @@ -361,26 +361,26 @@ class SettingsTab(ctk.CTkFrame): return 0 if setting == "theme": - theme_config = check_config("theme", "boiiiwd_theme.json") + theme_config = check_config("theme", "T7xwd_theme.json") if os.path.exists(os.path.join(APPLICATION_PATH, theme_config)): return "Custom" - if theme_config == "boiiiwd_theme.json": + if theme_config == "T7xwd_theme.json": return "Default" - match = re.match(r'boiiiwd_(\w+)\.json', theme_config) + match = re.match(r'T7xwd_(\w+)\.json', theme_config) if match: theme_name = match.group(1).capitalize() return theme_name else: return 1 if check_config(setting, fallback) == "on" else 0 - def boiiiwd_custom_theme(self, disable_only=None): - file_to_rename = os.path.join(APPLICATION_PATH, "boiiiwd_theme.json") + def T7xwd_custom_theme(self, disable_only=None): + file_to_rename = os.path.join(APPLICATION_PATH, "T7xwd_theme.json") if os.path.exists(file_to_rename): timestamp = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") - new_name = f"boiiiwd_theme_{timestamp}.json" + new_name = f"T7xwd_theme_{timestamp}.json" os.rename(file_to_rename, os.path.join(APPLICATION_PATH, new_name)) if not disable_only: @@ -389,19 +389,19 @@ class SettingsTab(ctk.CTkFrame): if disable_only: return try: - shutil.copy(os.path.join(RESOURCES_DIR, check_config("theme", "boiiiwd_theme.json")), os.path.join(APPLICATION_PATH, "boiiiwd_theme.json")) + shutil.copy(os.path.join(RESOURCES_DIR, check_config("theme", "T7xwd_theme.json")), os.path.join(APPLICATION_PATH, "T7xwd_theme.json")) except: - shutil.copy(os.path.join(RESOURCES_DIR, "boiiiwd_theme.json"), os.path.join(APPLICATION_PATH, "boiiiwd_theme.json")) - show_message("Preset file created", "You can now edit boiiiwd_theme.json in the current directory to your liking\n* Edits will apply next time you open boiiiwd\n* Program will always take boiiiwd_theme.json as the first theme option if found\n* Click on this button again to disable your custom theme or just rename boiiiwd_theme.json", icon="info") + shutil.copy(os.path.join(RESOURCES_DIR, "T7xwd_theme.json"), os.path.join(APPLICATION_PATH, "T7xwd_theme.json")) + show_message("Preset file created", "You can now edit T7xwd_theme.json in the current directory to your liking\n* Edits will apply next time you open T7xwd\n* Program will always take T7xwd_theme.json as the first theme option if found\n* Click on this button again to disable your custom theme or just rename T7xwd_theme.json", icon="info") def settings_check_for_updates(self): check_for_updates_func(self, ignore_up_todate=False) # make this rename to {id}_duplicate as a fallback def rename_all_folders(self, option): - boiiiFolder = main_app.app.edit_destination_folder.get() - maps_folder = os.path.join(boiiiFolder, "mods") - mods_folder = os.path.join(boiiiFolder, "usermaps") + T7xFolder = main_app.app.edit_destination_folder.get() + maps_folder = os.path.join(T7xFolder, "mods") + mods_folder = os.path.join(T7xFolder, "usermaps") folders_to_process = [] @@ -412,7 +412,7 @@ class SettingsTab(ctk.CTkFrame): folders_to_process.append(maps_folder) if not os.path.exists(maps_folder) and not os.path.exists(mods_folder): - show_message("Warning -> Check boiii path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") + show_message("Warning -> Check T7x path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") return 0 processed_names = set() @@ -463,13 +463,13 @@ class SettingsTab(ctk.CTkFrame): return 1 def change_folder_naming(self, option): - main_app.app.title("BOIII Workshop Downloader - Settings ➜ Loading... ⏳") + main_app.app.title("T7x Workshop Downloader - Settings ➜ Loading... ⏳") try: if os.path.exists(main_app.app.edit_destination_folder.get()): lib = main_app.app.library_tab.load_items(main_app.app.edit_destination_folder.get(), dont_add=True) if not "No items" in lib: if show_message("Renaming", "Would you like to rename all your exisiting item folders now?", _return=True): - main_app.app.title("BOIII Workshop Downloader - Settings ➜ Renaming... ⏳") + main_app.app.title("T7x Workshop Downloader - Settings ➜ Renaming... ⏳") try : ren_return = self.rename_all_folders(option) except Exception as er: show_message("Error!", f"Error occured when renaming\n{er}"); return if ren_return == 0: @@ -480,13 +480,13 @@ class SettingsTab(ctk.CTkFrame): else: show_message("Heads up!", "Only newly downloaded items will be affected", icon="info") else: - show_message("Warning -> Check boiii path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") + show_message("Warning -> Check T7x path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") else: - show_message("Warning -> Check boiii path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") + show_message("Warning -> Check T7x path", f"You don't have any items yet ,from now on item's folders will be named as their {option}") except Exception as e: show_message("Error", f"Error occured \n{e}") finally: - main_app.app.title("BOIII Workshop Downloader - Settings") + main_app.app.title("T7x Workshop Downloader - Settings") self.save_settings() def load_on_switch_screen(self): @@ -502,20 +502,20 @@ class SettingsTab(ctk.CTkFrame): # keep last cuz of trace_add() self.save_button.configure(state='disabled') - def settings_launch_boiii(self): - launch_boiii_func(check_config("destinationfolder")) + def settings_launch_T7x(self): + launch_T7x_func(check_config("destinationfolder")) def settings_reset_steamcmd(self): reset_steamcmd() - def from_steam_to_boiii_toplevel(self): + def from_steam_to_T7x_toplevel(self): try: # to make sure json file is up to date main_app.app.library_tab.load_items(main_app.app.edit_destination_folder.get(), dont_add=True) top = ctk.CTkToplevel(self) if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")): top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico"))) - top.title("Steam to boiii") + top.title("Steam to T7x") _, _, x, y = get_window_size_from_registry() top.geometry(f"+{x}+{y}") # top.attributes('-topmost', 'true') @@ -527,9 +527,9 @@ class SettingsTab(ctk.CTkFrame): steam_folder_label = ctk.CTkLabel(center_frame, text="Steam Folder:") steam_folder_entry = ctk.CTkEntry(center_frame, width=225) button_steam_browse = ctk.CTkButton(center_frame, text="Select", width=10) - boiii_folder_label = ctk.CTkLabel(center_frame, text="boiii Folder:") - boiii_folder_entry = ctk.CTkEntry(center_frame, width=225) - button_BOIII_browse = ctk.CTkButton(center_frame, text="Select", width=10) + T7x_folder_label = ctk.CTkLabel(center_frame, text="T7x Folder:") + T7x_folder_entry = ctk.CTkEntry(center_frame, width=225) + button_T7x_browse = ctk.CTkButton(center_frame, text="Select", width=10) # Create option to choose between cut or copy operation_label = ctk.CTkLabel(center_frame, text="Choose operation:") copy_var = ctk.BooleanVar() @@ -574,11 +574,11 @@ class SettingsTab(ctk.CTkFrame): if copy_var.get(): copy_button.configure(text=f"Start (Copy)") - def open_BOIII_browser(): - selected_folder = ctk.filedialog.askdirectory(title="Select boiii Folder") + def open_T7x_browser(): + selected_folder = ctk.filedialog.askdirectory(title="Select T7x Folder") if selected_folder: - boiii_folder_entry.delete(0, "end") - boiii_folder_entry.insert(0, selected_folder) + T7x_folder_entry.delete(0, "end") + T7x_folder_entry.insert(0, selected_folder) def open_steam_browser(): selected_folder = ctk.filedialog.askdirectory(title="Select Steam Folder (ex: C:/Program Files (x86)/Steam)") @@ -597,14 +597,14 @@ class SettingsTab(ctk.CTkFrame): copy_button.configure(state="disabled") steam_folder = steam_folder_entry.get() ws_folder = os.path.join(steam_folder, "steamapps/workshop/content/311210") - boiii_folder = boiii_folder_entry.get() + T7x_folder = T7x_folder_entry.get() if not os.path.exists(steam_folder) and not os.path.exists(ws_folder): show_message("Not found", "Either you have no items downloaded from Steam or wrong path, please recheck path (ex: C:/Program Files (x86)/Steam)") return - if not os.path.exists(boiii_folder): - show_message("Not found", "boiii folder not found, please recheck path") + if not os.path.exists(T7x_folder): + show_message("Not found", "T7x folder not found, please recheck path") return top.after(0, progress_text.configure(text="Loading...")) @@ -644,10 +644,10 @@ class SettingsTab(ctk.CTkFrame): folder_name = extract_json_data(json_file_path, "publisherID") if mod_type == "mod": - path_folder = os.path.join(boiii_folder, "mods") + path_folder = os.path.join(T7x_folder, "mods") folder_name_path = os.path.join(path_folder, folder_name, "zone") elif mod_type == "map": - path_folder = os.path.join(boiii_folder, "usermaps") + path_folder = os.path.join(T7x_folder, "usermaps") folder_name_path = os.path.join(path_folder, folder_name, "zone") else: show_message("Error", "Invalid workshop type in workshop.json, are you sure this is a map or a mod?.", icon="cancel") @@ -699,26 +699,26 @@ class SettingsTab(ctk.CTkFrame): button_steam_browse.grid(row=1, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes") steam_folder_label.grid(row=0, column=0, padx=(20, 20), pady=(10, 0), sticky='w') steam_folder_entry.grid(row=1, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes') - boiii_folder_label.grid(row=2, column=0, padx=(20, 20), pady=(10, 0), sticky='w') - boiii_folder_entry.grid(row=3, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes') - button_BOIII_browse.grid(row=3, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes") + T7x_folder_label.grid(row=2, column=0, padx=(20, 20), pady=(10, 0), sticky='w') + T7x_folder_entry.grid(row=3, column=0, columnspan=2, padx=(0, 20), pady=(10, 10), sticky='nes') + button_T7x_browse.grid(row=3, column=2, padx=(0, 20), pady=(10, 10), sticky="wnes") operation_label.grid(row=4, column=0, padx=(20, 20), pady=(10, 10), sticky='wnes') copy_check.grid(row=4, column=1, padx=(0, 10), pady=(10, 10), sticky='wnes') cut_check.grid(row=4, column=2, padx=(0, 10), pady=(10, 10), sticky='nes') progress_bar.grid(row=5, column=0, columnspan=3, padx=(20, 20), pady=(10, 10), sticky='wnes') progress_text.place(relx=0.5, rely=0.5, anchor="center") copy_button.grid(row=6, column=0, columnspan=3,padx=(20, 20), pady=(10, 10), sticky='wnes') - progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "progress_bar_fill_color") + progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json")), "progress_bar_fill_color") progress_bar.configure(progress_color=progress_color) steam_folder_entry.insert(1, check_config("steam_folder", "")) - boiii_folder_entry.insert(1, main_app.app.edit_destination_folder.get()) - button_BOIII_browse.configure(command=open_BOIII_browser) + T7x_folder_entry.insert(1, main_app.app.edit_destination_folder.get()) + button_T7x_browse.configure(command=open_T7x_browser) button_steam_browse.configure(command=open_steam_browser) copy_button.configure(command=start_copy_operation) cut_check.configure(command = lambda: check_status(cut_var, copy_var)) copy_check.configure(command = lambda: check_status(copy_var, cut_var)) main_app.app.create_context_menu(steam_folder_entry) - main_app.app.create_context_menu(boiii_folder_entry) + main_app.app.create_context_menu(T7x_folder_entry) copy_var.set(True) progress_bar.set(0) top.after(150, top.focus_force) diff --git a/boiiiwd_package/src/shared_vars.py b/t7xwd_package/src/shared_vars.py similarity index 54% rename from boiiiwd_package/src/shared_vars.py rename to t7xwd_package/src/shared_vars.py index af5b483..d3cb7ed 100644 --- a/boiiiwd_package/src/shared_vars.py +++ b/t7xwd_package/src/shared_vars.py @@ -1,3 +1,3 @@ import src.main as main -app = main.BOIIIWD() +app = main.T7xWD() diff --git a/boiiiwd_package/src/update_window.py b/t7xwd_package/src/update_window.py similarity index 97% rename from boiiiwd_package/src/update_window.py rename to t7xwd_package/src/update_window.py index 649d4a1..264c76f 100644 --- a/boiiiwd_package/src/update_window.py +++ b/t7xwd_package/src/update_window.py @@ -45,7 +45,7 @@ def check_for_updates_func(window, ignore_up_todate=False): class UpdateWindow(ctk.CTkToplevel): def __init__(self, master, update_url): super().__init__(master) - self.title("BOIIIWD Self-Updater") + self.title("T7xWD Self-Updater") _, _, x, y = get_window_size_from_registry() self.geometry(f"400x150+{x}+{y}") if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")): @@ -64,7 +64,7 @@ class UpdateWindow(ctk.CTkToplevel): self.label_size = ctk.CTkLabel(self, text="Size: 0") self.label_size.grid(row=0, column=1, padx=30, pady=(10, 0), sticky="e") - self.progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="boiiiwd_theme.json")), "progress_bar_fill_color") + self.progress_color = get_button_state_colors(check_custom_theme(check_config("theme", fallback="T7xwd_theme.json")), "progress_bar_fill_color") self.progress_bar = ctk.CTkProgressBar(self, mode="determinate", height=20, corner_radius=7, progress_color=self.progress_color) self.progress_bar.grid(row=1, column=0, columnspan=4, padx=30, pady=10, sticky="ew") self.progress_bar.set(0) @@ -86,7 +86,7 @@ class UpdateWindow(ctk.CTkToplevel): response.raise_for_status() current_exe = sys.argv[0] program_name = os.path.basename(current_exe) - new_exe = os.path.join(update_dir, "BOIIIWD.exe") + new_exe = os.path.join(update_dir, "T7xWD.exe") if not os.path.exists(update_dir): os.makedirs(update_dir) diff --git a/boiiiwd_package/boiiiwd.py b/t7xwd_package/t7xwd.py similarity index 100% rename from boiiiwd_package/boiiiwd.py rename to t7xwd_package/t7xwd.py