Support flatpak build
Use 3 levels for application ID. Use XDG_RUNTIME_DIR as TMPDIR to share file outside the sandbox issue11250 review390051002
This commit is contained in:
@@ -41,6 +41,11 @@ if hasattr(sys, 'frozen'):
|
||||
if sys.platform == 'darwin':
|
||||
sys.argv = [a for a in sys.argv if not a.startswith('-psn_')]
|
||||
|
||||
if os.environ.get('FLATPAK_ID') and os.environ.get('XDG_RUNTIME_DIR'):
|
||||
# Set $TMPDIR to share files outside the sandbox
|
||||
os.environ['TMPDIR'] = os.path.join(
|
||||
os.environ.get('XDG_RUNTIME_DIR'), 'app', os.environ.get('FLATPAK_ID'))
|
||||
|
||||
|
||||
# Disable dbusmenu to show second menu in tabs
|
||||
os.environ['UBUNTU_MENUPROXY'] = '0'
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ def main():
|
||||
'database': CONFIG['login.db'],
|
||||
}
|
||||
server = hashlib.md5(server.encode('utf-8')).hexdigest()
|
||||
application_id = 'org.tryton._' + server
|
||||
application_id = 'org.tryton.Tryton._' + server
|
||||
app = gui.Main(
|
||||
application_id=application_id,
|
||||
flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
|
||||
|
||||
Reference in New Issue
Block a user