-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from sillsdev/UpdateLinuxBuildScripts
Update Linux build script and instructions
- Loading branch information
Showing
4 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
cd "$(dirname "$0")/.." | ||
build/buildupdate.mono.sh | ||
. environ | ||
root=$PWD | ||
cd build | ||
xbuild "/target:${2:-Clean;Compile}" /property:Configuration="${1:-Debug}Mono" /property:RootDir=$root /property:BUILD_NUMBER="1.5.1.abcd" Chorus.proj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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/mono-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# MonoDevelop seems to set PKG_CONFIG_LIBDIR to the empty string, which is bad | ||
# for us because that eliminates most packages, including geckofx29. | ||
# 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 | ||
|
||
if [ -z "$XULRUNNER" ]; then | ||
if [ -d /usr/lib/xulrunner-geckofx-29 ]; then | ||
export XULRUNNER=/usr/lib/xulrunner-geckofx-29 | ||
else | ||
export XULRUNNER=/usr/lib/xulrunner-29 | ||
fi | ||
fi | ||
LD_LIBRARY_PATH="${XULRUNNER}:${LD_LIBRARY_PATH}" | ||
GECKOFX="$(pkg-config --variable assemblies_dir Geckofx-Core)" | ||
export LD_PRELOAD=${GECKOFX}/geckofix.so | ||
|
||
if [ "${OLD_PKG_CONFIG_LIBDIR+set}" = set ]; then | ||
export PKG_CONFIG_LIBDIR="${OLD_PKG_CONFIG_LIBDIR}" | ||
unset OLD_PKG_CONFIG_LIBDIR | ||
fi |