2015-11-02 18:53:16 +00:00
|
|
|
#!/usr/bin/env bash
|
2015-11-16 19:21:57 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
#
|
2015-11-02 18:53:16 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
BIN_DIR="$( cd $1 && pwd )"
|
|
|
|
|
|
|
|
UNAME=`uname`
|
|
|
|
|
|
|
|
if [ -z "$RID" ]; then
|
|
|
|
if [ "$UNAME" == "Darwin" ]; then
|
|
|
|
RID=osx.10.10-x64
|
|
|
|
elif [ "$UNAME" == "Linux" ]; then
|
|
|
|
RID=ubuntu.14.04-x64
|
|
|
|
else
|
|
|
|
echo "Unknown OS: $UNAME" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Replace with a robust method for finding the right crossgen.exe
|
2015-11-04 19:11:38 +00:00
|
|
|
CROSSGEN_UTIL=~/.dnx/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-beta-23504/tools/crossgen
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
cd $BIN_DIR
|
2015-11-02 18:53:16 +00:00
|
|
|
|
|
|
|
# Crossgen currently requires itself to be next to mscorlib
|
|
|
|
cp $CROSSGEN_UTIL $BIN_DIR
|
|
|
|
chmod +x crossgen
|
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR mscorlib.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR System.Collections.Immutable.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR System.Reflection.Metadata.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.CSharp.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-11 01:30:01 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.VisualBasic.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-18 07:37:39 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR csc.dll
|
2015-11-11 01:30:01 +00:00
|
|
|
[ -e csc.ni.exe ] && [ ! -e csc.ni.dll ] && mv csc.ni.exe csc.ni.dll
|
2015-11-02 18:53:16 +00:00
|
|
|
|
2015-11-18 07:37:39 +00:00
|
|
|
./crossgen -nologo -platform_assemblies_paths $BIN_DIR vbc.dll
|
2015-11-11 01:30:01 +00:00
|
|
|
[ -e vbc.ni.exe ] && [ ! -e vbc.ni.dll ] && mv vbc.ni.exe vbc.ni.dll
|