diff --git a/.gitignore b/.gitignore index a8cbbfa..f33a0cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ .idea/ __pycache__/ Interface/ +build/ +dist/ /CurseBreaker.json /Wow.exe +/CurseBreaker.spec diff --git a/CurseBreaker/Core.py b/CB/Core.py similarity index 100% rename from CurseBreaker/Core.py rename to CB/Core.py diff --git a/CurseBreaker/CurseForge.py b/CB/CurseForge.py similarity index 100% rename from CurseBreaker/CurseForge.py rename to CB/CurseForge.py diff --git a/CurseBreaker/ElvUI.py b/CB/ElvUI.py similarity index 100% rename from CurseBreaker/ElvUI.py rename to CB/ElvUI.py diff --git a/CurseBreaker/WoWInterface.py b/CB/WoWInterface.py similarity index 100% rename from CurseBreaker/WoWInterface.py rename to CB/WoWInterface.py diff --git a/CurseBreaker/__init__.py b/CB/__init__.py similarity index 100% rename from CurseBreaker/__init__.py rename to CB/__init__.py diff --git a/CurseBreaker.ico b/CurseBreaker.ico new file mode 100644 index 0000000..3889d61 Binary files /dev/null and b/CurseBreaker.ico differ diff --git a/CurseBreaker.py b/CurseBreaker.py index 0a345fb..7e194ab 100644 --- a/CurseBreaker.py +++ b/CurseBreaker.py @@ -3,8 +3,8 @@ import argparse from colorama import init, Fore from terminaltables import SingleTable -from CurseBreaker import __version__ -from CurseBreaker.Core import Core +from CB import __version__ +from CB.Core import Core class GUI: @@ -27,15 +27,17 @@ def __init__(self): init() sys.tracebacklimit = 0 - os.system('cls') - print(self.gui.table) def start(self): if not os.path.exists('Wow.exe') or not os.path.exists('Interface\\AddOns'): print(f'{Fore.LIGHTBLACK_EX}~~~ {Fore.LIGHTGREEN_EX}CurseBreaker ' f'{Fore.LIGHTBLACK_EX}v{__version__} ~~~{Fore.RESET}\n' f'{Fore.RED}This executable should be placed in WoW directory!{Fore.RESET}') - exit(1) + os.remove('CurseBreaker.json') + os.system('pause') + sys.exit(1) + os.system('cls') + print(self.gui.table) if self.args.add: addons = self.args.add.split(',') @@ -80,8 +82,11 @@ def start(self): self.table.append([f'{Fore.LIGHTBLACK_EX}Not installed{Fore.RESET}', addon, '']) os.system('cls') print(self.gui.table) + os.system('pause') if __name__ == "__main__": + if getattr(sys, 'frozen', False): + os.chdir(os.path.dirname(os.path.abspath(sys.executable))) app = GUI() app.start() diff --git a/README.md b/README.md index 0b849d3..de4f649 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # CurseBreaker -WIP \ No newline at end of file +WIP + +Icon made by [Nikita Golubev](https://www.flaticon.com/authors/nikita-golubev) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/). \ No newline at end of file