|
|
|
@ -13,7 +13,7 @@ from PySide2.QtWidgets import QApplication |
|
|
|
|
|
|
|
|
|
from bip.deprecated.app import BipApp |
|
|
|
|
|
|
|
|
|
from bip import pink, link, mink |
|
|
|
|
from bip import link, mink |
|
|
|
|
from bip.wink.paths import changelogs_directory |
|
|
|
|
from bip.wink import REFRESH_CONTENT, LATEST, TAG, BRANCH, RECOMMENDED |
|
|
|
|
from bip.wink.exceptions import MissingConfig |
|
|
|
@ -171,10 +171,10 @@ class Launcher(BipApp): |
|
|
|
|
if not user: |
|
|
|
|
raise ValueError("Username not found") |
|
|
|
|
|
|
|
|
|
if not pink.login.check(user, password): |
|
|
|
|
if not mink.login.check(user, password): |
|
|
|
|
raise ValueError("Invalid password") |
|
|
|
|
|
|
|
|
|
pink.login.auth(user) |
|
|
|
|
mink.login.auth(user) |
|
|
|
|
self.logger.info("User {} logged in".format(username)) |
|
|
|
|
|
|
|
|
|
return user |
|
|
|
@ -183,7 +183,7 @@ class Launcher(BipApp): |
|
|
|
|
self.logger.info("User {} logged out".format(self.current_user.username)) |
|
|
|
|
self.clear() |
|
|
|
|
self.view.close() |
|
|
|
|
pink.login.disconnect() |
|
|
|
|
mink.login.disconnect() |
|
|
|
|
self.load_server_config() |
|
|
|
|
self.load_system_config() |
|
|
|
|
self.start() |
|
|
|
@ -204,14 +204,14 @@ class Launcher(BipApp): |
|
|
|
|
|
|
|
|
|
# Set environment variables |
|
|
|
|
self.splash.update_progress(10, "Updating environment variables") |
|
|
|
|
pink.env.set_bip_environment_variables() |
|
|
|
|
pink.env.set_custom_environment_variables() |
|
|
|
|
mink.env.set_bip_environment_variables() |
|
|
|
|
mink.env.set_custom_environment_variables() |
|
|
|
|
|
|
|
|
|
# Update content |
|
|
|
|
self.splash.update_progress(30, "Updating custom content") |
|
|
|
|
if REFRESH_CONTENT: |
|
|
|
|
mink.update.update_content() |
|
|
|
|
pink.env.set_python_path() |
|
|
|
|
mink.env.set_python_path() |
|
|
|
|
|
|
|
|
|
self.splash.update_progress(60, "Loading GUI") |
|
|
|
|
self.view = View(controller=self) |
|
|
|
@ -297,7 +297,7 @@ class Launcher(BipApp): |
|
|
|
|
self.server_config = link.config.get(autogen=False, force=force) |
|
|
|
|
|
|
|
|
|
def load_system_config(self, force=False): |
|
|
|
|
self.system_config = pink.system.get_config(force) |
|
|
|
|
self.system_config = mink.system.get_config(force) |
|
|
|
|
self.__version_mode = self.system_config.version_mode |
|
|
|
|
|
|
|
|
|
@online |
|
|
|
@ -347,9 +347,9 @@ class Launcher(BipApp): |
|
|
|
|
@online |
|
|
|
|
def update(self, force_recommended=False): |
|
|
|
|
if force_recommended: |
|
|
|
|
system_config = pink.system.get_config() |
|
|
|
|
system_config = mink.system.get_config() |
|
|
|
|
system_config.version_mode = RECOMMENDED |
|
|
|
|
pink.system.update_config(system_config) |
|
|
|
|
mink.system.update_config(system_config) |
|
|
|
|
|
|
|
|
|
mink.start.updater() |
|
|
|
|
self.quit() |
|
|
|
@ -829,13 +829,13 @@ class Launcher(BipApp): |
|
|
|
|
webbrowser.open(url) |
|
|
|
|
|
|
|
|
|
def html_parser(self, html, path): |
|
|
|
|
if "quick_start" in pink.content.get_links(): |
|
|
|
|
quick_start = pink.content.get_links()["quick_start"] |
|
|
|
|
if "quick_start" in mink.content.get_links(): |
|
|
|
|
quick_start = mink.content.get_links()["quick_start"] |
|
|
|
|
else: |
|
|
|
|
quick_start = "#special-not-found" |
|
|
|
|
|
|
|
|
|
if "documentation" in pink.content.get_links(): |
|
|
|
|
documentation = pink.content.get_links()["documentation"] |
|
|
|
|
if "documentation" in mink.content.get_links(): |
|
|
|
|
documentation = mink.content.get_links()["documentation"] |
|
|
|
|
else: |
|
|
|
|
documentation = "#special-not-found" |
|
|
|
|
|
|
|
|
|