-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
environ
103 lines (85 loc) · 4 KB
/
environ
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Environment settings for running programs with the SIL version of mono
# (or with the system mono: set MONO_PREFIX to /usr.
# Set MONO_ENVIRON to this file's pathname, then run, for example,
# /opt/mono5-sil/bin/mono --debug Bloom.exe
# These setting assume that the packaged SIL Mono is installed in /opt/mono5-sil.
# Note that this file is intended to be "sourced", not "executed".
# the sourcing script should cd/pushd to the directory containing this script
BASE="$(pwd)"
[ -z "$BUILD" ] && BUILD=Debug
[ -z "$MONO_PREFIX" ] && MONO_PREFIX=/opt/mono5-sil
# Dependency locations
# Search for xulrunner and geckofx, select the best, and add its location to LD_LIBRARY_PATH.
# Also determine the location of the geckofx assemblies and shared object libraries.
. ./environ-xulrunner
GDK_SHARP=/usr/lib/cli/glib-sharp-3.0/:/usr/lib/cli/gtk-sharp-3.0/:/usr/lib/cli/gdk-sharp-3.0/:/usr/lib/cli/atk-sharp-3.0/:/usr/lib/cli/gio-sharp-3.0/
MONO_PATH="${GDK_SHARP}:${GECKOFX}"
MONO_DEBUG=explicit-null-checks
MONO_ENV_OPTIONS="-O=-gshared"
################################################################################################
# chmsee was phased out by Ubuntu in bionic (18.04), and supporting libraries by disco (19.04)
if [ -z "$MONO_HELP_VIEWER" ]; then
if [ -f /usr/bin/chmsee ]; then
export MONO_HELP_VIEWER=chmsee
elif [ -f /usr/bin/xchm ]; then
export MONO_HELP_VIEWER=xchm
elif [ -f /usr/bin/kchmviewer ]; then
export MONO_HELP_VIEWER=kchmviewer
fi
fi
################################################################################################
if [ "$RUNMODE" = "INSTALLED" ]
then
# Add the installation directory to the library paths
LD_LIBRARY_PATH="${BASE}:${LD_LIBRARY_PATH}"
MONO_PATH="${BASE}:${MONO_PATH}"
else
# Add the build output to paths
PATH="${BASE}/output/${BUILD}:${PATH}"
LD_LIBRARY_PATH="${BASE}/output/${BUILD}:${LD_LIBRARY_PATH}"
MONO_PATH="${BASE}/output/${BUILD}:${MONO_PATH}"
# if Bloom has been started from inside monodevelop, use Xephyr if it is available
if [ -e ${BASE}/Bloom.sln ] && (ps -q $PPID -o cmd= | grep monodevelop) && (ps -C Xephyr -o cmd= | grep 'Xephyr :2'); then
export DISPLAY=:2
fi
fi
################################################################################################
if [ "$RUNMODE" = "PACKAGE" -o "$RUNMODE" = "INSTALLED" ]
then
# Add packaged mono items to paths
PATH="${MONO_PREFIX}/bin:${PATH}"
LD_LIBRARY_PATH="${MONO_PREFIX}/lib:${LD_LIBRARY_PATH}"
PKG_CONFIG_PATH="${MONO_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
MONO_GAC_PREFIX="${MONO_PREFIX}:/usr"
else
# Add locally-built mono items to paths
# We also add the default values for PKG_CONFIG_PATH - MonoDevelop resets the PKG_CONFIG_PATH
# environment variable if we're running under a different Mono runtime so that some
# packages that got installed in standard locations can't be found otherwise.
PATH="${MONO_PREFIX}/bin:${PATH}"
LD_LIBRARY_PATH="${MONO_PREFIX}/lib:${LD_LIBRARY_PATH}"
PKG_CONFIG_PATH="${MONO_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/lib/pkgconfig:/usr/lib/pkgconfig"
MONO_GAC_PREFIX="${MONO_PREFIX}:/usr"
fi
# point to our private version of libtidy
LD_LIBRARY_PATH="/opt/tidy-sil/lib:${LD_LIBRARY_PATH}"
################################################################################################
MONO_TRACE_LISTENER="Console.Out"
#MONO_IOMAP=case
MONO_MWF_SCALING=disable
# if debugging for performance unset DEBUG_ENABLE_PTR_VALIDATION env var.
#export DEBUG_ENABLE_PTR_VALIDATION=1
export \
PATH LD_LIBRARY_PATH PKG_CONFIG_PATH LD_PRELOAD \
MONO_PATH \
MONO_PREFIX MONO_GAC_PREFIX \
MONO_TRACE_LISTENER MONO_IOMAP MONO_MWF_SCALING \
MONO_DEBUG MONO_ENV_OPTIONS
# prevent Gecko from printing scary message about "double free or corruption" on shutdown
# (See FWNX-1216.) Tom Hindle suggested this hack as a stopgap.
export MALLOC_CHECK_=0
# set HGRCPATH so that we ignore ~/.hgrc files which might have content that is
# incompatible with our version of Mercurial
export HGRCPATH=
#sets keyboard input method to none
unset XMODIFIERS