From 3ae51104414d40b06a592750e42cfad1a950f221 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Wed, 16 Dec 2015 16:34:47 -0800 Subject: [PATCH] probe for Mono reference assemblies in DorkBuild --- KoreBuild-dotnet/build/KoreBuild.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/KoreBuild-dotnet/build/KoreBuild.sh b/KoreBuild-dotnet/build/KoreBuild.sh index 07d587b1fc..4dd048c88a 100644 --- a/KoreBuild-dotnet/build/KoreBuild.sh +++ b/KoreBuild-dotnet/build/KoreBuild.sh @@ -40,4 +40,19 @@ else fi # ============ -mono $koreBuildFolder/build/Sake/tools/Sake.exe -I $koreBuildFolder/build -f $makefilePath "$@" \ No newline at end of file +# Probe for Mono Reference assemblies +if test -z "$DOTNET_REFERENCE_ASSEMBLIES_PATH"; then + if test $(uname) == Darwin; then + if test -d "/Library/Frameworks/Mono.framework/Version/Current/lib/mono/xbuild-frameworks"; then + export DOTNET_REFERENCE_ASSEMBLIES_PATH="/Library/Frameworks/Mono.framework/Version/Current/lib/mono/xbuild-frameworks" + fi + else + if test -d "/usr/local/lib/mono/xbuild-frameworks"; then + export DOTNET_REFERENCE_ASSEMBLIES_PATH="/usr/local/lib/mono/xbuild-frameworks" + else if test -d "/usr/lib/mono/xbuild-frameworks"; then + export DOTNET_REFERENCE_ASSEMBLIES_PATH="/usr/lib/mono/xbuild-frameworks" + fi + fi +fi + +mono $koreBuildFolder/build/Sake/tools/Sake.exe -I $koreBuildFolder/build -f $makefilePath "$@"