diff --git a/wvguesser/main.py b/wvguesser/main.py index 9e8cc74..057a692 100644 --- a/wvguesser/main.py +++ b/wvguesser/main.py @@ -20,9 +20,15 @@ # excepted_j = list(range(8)) if platform.system() == 'Windows': - MAIN_EXE = (Path(sys.argv[0]).parent / 'main.exe').resolve().as_posix() + MAIN_EXE = (Path(sys.argv[0]).parent / 'main.exe') + if MAIN_EXE.exists() is False: + MAIN_EXE = (Path('.').parent / 'main.exe') + MAIN_EXE = MAIN_EXE.resolve().as_posix() else: - MAIN_EXE = (Path(sys.argv[0]).parent / 'main').resolve().as_posix() + MAIN_EXE = (Path(sys.argv[0]).parent / 'main') + if MAIN_EXE.exists() is False: + MAIN_EXE = (Path('.').parent / 'main') + MAIN_EXE = MAIN_EXE.resolve().as_posix() def server_setup():