-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
environ
85 lines (70 loc) · 3.28 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
# Environment settings for running programs with the SIL version of mono
# Set MONO_ENVIRON to this file's pathname, then run, for example,
# /opt/mono-sil/bin/mono --debug Bloom.exe
# These setting assume that the packaged SIL Mono is installed in /opt/mono-sil.
# This may well change to /opt, simplifying the script to not need to distinguish as much
# between RUNMODE values. (The first if below may still be needed, but not the second?)
# 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/gdk-sharp-2.0
MONO_RUNTIME=v4.0.30319
MONO_PATH="${GDK_SHARP}:${GECKOFX}"
MONO_DEBUG=explicit-null-checks
MONO_ENV_OPTIONS="-O=-gshared"
################################################################################################
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}"
fi
################################################################################################
if [ "$RUNMODE" = "PACKAGE" -o "$RUNMODE" = "INSTALLED" ]
then
# Add packaged mono items to paths
PATH="/opt/mono-sil/bin:${PATH}"
LD_LIBRARY_PATH="/opt/mono-sil/lib:${LD_LIBRARY_PATH}"
PKG_CONFIG_PATH="/opt/mono-sil/lib/pkgconfig:${PKG_CONFIG_PATH}"
MONO_GAC_PREFIX="/opt/mono-sil:/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
################################################################################################
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_RUNTIME 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