-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
environ-xulrunner
38 lines (33 loc) · 1.32 KB
/
environ-xulrunner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# MonoDevelop seems to set PKG_CONFIG_LIBDIR to the empty string, which is bad
# for us because that eliminates most packages, including Geckofx-Core.
# If PKG_CONFIG_LIBDIR is not set at all, then the default paths are searched.
# To be safe, we'll preserve the old value (if it is set) and restore it.
if [ "${PKG_CONFIG_LIBDIR+set}" = set ]; then
OLD_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR}"
unset PKG_CONFIG_LIBDIR
fi
# search for xulrunner-14*, select the latest, and add its location to LD_LIBRARY_PATH
# also define LD_PRELOAD to get geckofix.so to work properly
# (the search order must be the same as in Geckfx-Core/XULRunnerLocator.cs)
if [ "$RUNMODE" = "INSTALLED" ]
then
XULRUNNER=/usr/lib/wesay-beta/Firefox
GECKOFX=/usr/lib/wesay-beta/Firefox
MOZ_PATH=/usr/lib/wesay-beta/Firefox
else
XULRUNNER=${BASE}/output/${BUILD}/Firefox
GECKOFX=${BASE}/output/${BUILD}/Firefox
MOZ_PATH=${BASE}/output/${BUILD}/Firefox
fi
if [ ! -d ${XULRUNNER} ]; then XULRUNNER=/usr/lib/xulrunner-29; fi
LD_LIBRARY_PATH="${XULRUNNER}:${LD_LIBRARY_PATH}"
#GECKOFX="$(pkg-config --variable assemblies_dir Geckofx-Core)"
if [ "$RUNMODE" != "BUILDINGPACKAGE" ]
then
LD_PRELOAD=${GECKOFX}/libgeckofix.so
fi
export MOZ_PATH
if [ "${OLD_PKG_CONFIG_LIBDIR+set}" = set ]; then
export PKG_CONFIG_LIBDIR="${OLD_PKG_CONFIG_LIBDIR}"
unset OLD_PKG_CONFIG_LIBDIR
fi