2016-02-13 17:06:36 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-06-29 17:21:00 -05:00
|
|
|
import logger
|
2016-02-21 08:16:36 -06:00
|
|
|
import sys
|
|
|
|
import fixes
|
|
|
|
if hasattr(sys, "frozen"):
|
|
|
|
fixes.setup()
|
2016-02-13 17:06:36 -06:00
|
|
|
import platform
|
|
|
|
import languageHandler
|
|
|
|
import widgetUtils
|
|
|
|
import paths
|
|
|
|
import config
|
|
|
|
import output
|
|
|
|
import logging
|
|
|
|
import keys
|
|
|
|
import application
|
|
|
|
from mysc.thread_utils import call_threaded
|
|
|
|
|
|
|
|
log = logging.getLogger("main")
|
|
|
|
|
|
|
|
def setup():
|
|
|
|
log.debug("Starting Socializer %s" % (application.version,))
|
|
|
|
config.setup()
|
|
|
|
log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
|
2019-01-01 19:42:53 -06:00
|
|
|
log.debug("Application path is %s" % (paths.app_path(),))
|
2016-02-13 17:06:36 -06:00
|
|
|
log.debug("config path is %s" % (paths.config_path(),))
|
|
|
|
output.setup()
|
2016-03-25 12:11:33 -06:00
|
|
|
languageHandler.setLanguage(config.app["app-settings"]["language"])
|
2016-05-10 20:23:48 -05:00
|
|
|
log.debug("Language set to %s" % (languageHandler.getLanguage()))
|
2016-02-13 17:06:36 -06:00
|
|
|
keys.setup()
|
|
|
|
from controller import mainController
|
|
|
|
from sessionmanager import sessionManager
|
|
|
|
app = widgetUtils.mainLoopObject()
|
2016-05-10 20:23:48 -05:00
|
|
|
log.debug("Created Application mainloop object")
|
2016-02-13 17:06:36 -06:00
|
|
|
sm = sessionManager.sessionManagerController()
|
|
|
|
del sm
|
|
|
|
r = mainController.Controller()
|
|
|
|
call_threaded(r.login)
|
2019-01-11 16:08:49 -06:00
|
|
|
|
2016-02-13 17:06:36 -06:00
|
|
|
app.run()
|
|
|
|
|
2017-03-13 02:16:34 -06:00
|
|
|
setup()
|