Skip to content

Commit

Permalink
Tweaks for code freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Mar 10, 2019
1 parent 40f1391 commit eb71510
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.idea/
__pycache__/
Interface/
build/
dist/
/CurseBreaker.json
/Wow.exe
/CurseBreaker.spec
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added CurseBreaker.ico
Binary file not shown.
15 changes: 10 additions & 5 deletions CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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(',')
Expand Down Expand Up @@ -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()
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CurseBreaker

WIP
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/).

0 comments on commit eb71510

Please sign in to comment.