Add support for flatpak extensions

This commit is contained in:
André Apitzsch 2018-05-27 01:18:54 +02:00 committed by Philipp Hörist
parent 3f2d4e5085
commit 5e712768cf
2 changed files with 22 additions and 3 deletions

View File

@ -28,13 +28,18 @@ import sys
import tempfile
from pathlib import Path
import gajim
from gajim.common.const import PathType, PathLocation
def get(key):
if key == 'PLUGINS_DIRS':
return [_paths['PLUGINS_BASE'],
_paths['PLUGINS_USER']]
if gajim.IS_FLATPAK:
return ['/app/plugins',
_paths['PLUGINS_BASE']]
else:
return [_paths['PLUGINS_BASE'],
_paths['PLUGINS_USER']]
return _paths[key]

View File

@ -22,8 +22,19 @@
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
/* extensions */
"--env=PYTHONPATH=/app/plugins/lib/python3.5/site-packages"
],
"add-extensions": {
"org.gajim.Gajim.Plugin": {
"directory": "plugins",
"merge-dirs": "lib/python3.5/site-packages",
"subdirectories": true,
"no-autodownload": true,
"autodelete": true
}
},
"build-options": {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g"
@ -370,6 +381,9 @@
"sha256": "02f71f0921d67433ecdca7f0b682a63cadaa7a057fa68608f1ec7ce3fae44fb9",
"dest": "gajim/data/plugins/plugin_installer"
}
],
"post-install": [
"install -d /app/plugins"
]
}
]