mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Main.py: check if Uninstall.exe exists before importing commandline and other modules
This commit is contained in:
parent
c830d4b5b4
commit
08a2eca98d
@ -14,6 +14,9 @@ if system == "Windows":
|
||||
sys.stderr = open(os.path.join(os.getenv("temp"), "stderr.log"), "w")
|
||||
import languageHandler
|
||||
import paths
|
||||
#check if TWBlue is installed (Windows only)
|
||||
if os.path.exists(paths.app_path(u"Uninstall.exe")):
|
||||
paths.mode="installed"
|
||||
import commandline
|
||||
import config
|
||||
import sound
|
||||
@ -32,9 +35,6 @@ if system == "Windows":
|
||||
from update import updater
|
||||
stdout_temp=sys.stdout
|
||||
stderr_temp=sys.stderr
|
||||
#check if TWBlue is installed
|
||||
if os.path.exists(paths.app_path(u"Uninstall.exe")):
|
||||
paths.mode="installed"
|
||||
#if it's a binary version
|
||||
if hasattr(sys, 'frozen'):
|
||||
sys.stderr = open(paths.logs_path("stderr.log"), 'w')
|
||||
|
Loading…
Reference in New Issue
Block a user