mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[core/lfs] Enable update notification for PyInstaller on Linux
This commit is contained in:
parent
43bb09a1ad
commit
791bc77c7c
|
@ -31,6 +31,7 @@ from legendary.models.game import *
|
||||||
from legendary.models.json_manifest import JSONManifest
|
from legendary.models.json_manifest import JSONManifest
|
||||||
from legendary.models.manifest import Manifest, ManifestMeta
|
from legendary.models.manifest import Manifest, ManifestMeta
|
||||||
from legendary.models.chunk import Chunk
|
from legendary.models.chunk import Chunk
|
||||||
|
from legendary.utils.env import is_windows_or_pyi
|
||||||
from legendary.utils.game_workarounds import is_opt_enabled, update_workarounds
|
from legendary.utils.game_workarounds import is_opt_enabled, update_workarounds
|
||||||
from legendary.utils.savegame_helper import SaveGameHelper
|
from legendary.utils.savegame_helper import SaveGameHelper
|
||||||
from legendary.utils.manifests import combine_manifests
|
from legendary.utils.manifests import combine_manifests
|
||||||
|
@ -210,7 +211,7 @@ class LegendaryCore:
|
||||||
if self.force_show_update:
|
if self.force_show_update:
|
||||||
return True
|
return True
|
||||||
return not self.lgd.config.getboolean('Legendary', 'disable_update_notice',
|
return not self.lgd.config.getboolean('Legendary', 'disable_update_notice',
|
||||||
fallback=os.name != 'nt')
|
fallback=not is_windows_or_pyi())
|
||||||
|
|
||||||
def check_for_updates(self, force=False):
|
def check_for_updates(self, force=False):
|
||||||
def version_tuple(v):
|
def version_tuple(v):
|
||||||
|
|
|
@ -9,6 +9,7 @@ from time import time
|
||||||
|
|
||||||
from legendary.models.game import *
|
from legendary.models.game import *
|
||||||
from legendary.utils.config import LGDConf
|
from legendary.utils.config import LGDConf
|
||||||
|
from legendary.utils.env import is_windows_or_pyi
|
||||||
from legendary.utils.lfs import clean_filename
|
from legendary.utils.lfs import clean_filename
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ class LGDLFS:
|
||||||
self.config.set('Legendary', 'disable_update_check', 'false')
|
self.config.set('Legendary', 'disable_update_check', 'false')
|
||||||
if not self.config.has_option('Legendary', 'disable_update_notice'):
|
if not self.config.has_option('Legendary', 'disable_update_notice'):
|
||||||
self.config.set('Legendary', '; Disables the notice about an available update on exit')
|
self.config.set('Legendary', '; Disables the notice about an available update on exit')
|
||||||
self.config.set('Legendary', 'disable_update_notice', 'false' if os.name == 'nt' else 'true')
|
self.config.set('Legendary', 'disable_update_notice', 'false' if is_windows_or_pyi() else 'true')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._installed = json.load(open(os.path.join(self.path, 'installed.json')))
|
self._installed = json.load(open(os.path.join(self.path, 'installed.json')))
|
||||||
|
|
Loading…
Reference in a new issue