diff options
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/webactivity.py b/webactivity.py index 1e9280e..b703c5e 100644 --- a/webactivity.py +++ b/webactivity.py @@ -20,6 +20,7 @@ import logging from gettext import gettext as _ from gettext import ngettext import os +import platform import gobject gobject.threads_init() @@ -68,11 +69,20 @@ if not NEW_TOOLBARS: _TOOLBAR_EDIT = 1 _TOOLBAR_BROWSE = 2 -# Setup some env variables for the embedded PDF viewer +# Setup some files and env variables for the embedded PDF viewer +if platform.machine().startswith("arm"): + arch="arm" +else: + arch="x86" + +bindir = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], 'bin') +if not os.path.exists(bindir): + archbindir = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], 'bin-%s' % arch) + os.symlink(archbindir, bindir) + os.environ['MOZ_PLUGIN_PATH'] = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], - 'plugins') -os.environ['OPERA_DIR'] = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], - 'plugins', 'conf') + 'plugins-%s' % arch) +os.environ['OPERA_DIR'] = os.path.join(os.environ['MOZ_PLUGIN_PATH'], 'conf') if os.path.exists(_version_file): f = open(_version_file) |