提交 6c08adb7 编写于 作者: J Joshua Peterson

Merge pull request #314 from hkr/unity-staging

Fix NullReferenceExceptions on Android/x86 (L and M)
......@@ -138,6 +138,12 @@ our $ndks =
"macosx" => "android-ndk-r9-darwin-x86.tar.bz2",
"linux" => "android-ndk-r9-linux-x86.tar.bz2",
},
"r10e" =>
{
"windows" => "android-ndk-r10e-windows-x86.exe",
"macosx" => "android-ndk-r10e-darwin-x86_64.bin",
"linux" => "android-ndk-r10e-linux-x86.bin",
},
};
our ($HOST_ENV, $TMP, $HOME, $WINZIP);
......@@ -241,7 +247,7 @@ if ($ndk)
$export = "set";
}
if ($setenv and ($ENV{$SDK_ROOT_ENV} or $ENV{$SDK_ROOT_ENV}))
if ($setenv and ($ENV{$SDK_ROOT_ENV} or $ENV{$NDK_ROOT_ENV}))
{
print "Outputing updated environment:\n";
print "\t'$setenv'\n";
......@@ -392,6 +398,14 @@ sub DownloadAndUnpackArchive
{
system("tar", "-xf", $temporary_download_path, "-C", $temporary_unpack_path);
}
elsif (lc $suffix eq '.bin')
{ chmod(0755, $temporary_download_path);
system($temporary_download_path, "-o" . $temporary_unpack_path);
}
elsif (lc $suffix eq '.exe')
{ chmod(0755, $temporary_download_path);
system($temporary_download_path, "-o" . $temporary_unpack_path);
}
else
{
die "Unknown file extension '" . $suffix . "'\n";
......
......@@ -11,7 +11,7 @@ CWD="$(pwd)"
PREFIX="$CWD/builds/android"
BUILDSCRIPTSDIR=external/buildscripts
perl ${BUILDSCRIPTSDIR}/PrepareAndroidSDK.pl -ndk=r9 -env=envsetup.sh && source envsetup.sh
perl ${BUILDSCRIPTSDIR}/PrepareAndroidSDK.pl -ndk=r10e -env=envsetup.sh && source envsetup.sh
NDK_ROOT=`cd $ANDROID_NDK_ROOT && pwd`
......@@ -23,10 +23,10 @@ fi
HOST_ENV=`uname -s`
case "$HOST_ENV" in
Darwin)
HOST_ENV=darwin-x86
HOST_ENV=darwin
;;
Linux)
HOST_ENV=linux-x86
HOST_ENV=linux
;;
CYGWIN*|*_NT-*)
HOST_ENV=windows
......@@ -40,6 +40,13 @@ esac
PLATFORM_ROOT=$NDK_ROOT/platforms/$ANDROID_PLATFORM/arch-arm
TOOLCHAIN=$NDK_ROOT/toolchains/$GCC_PREFIX$GCC_VERSION/prebuilt/$HOST_ENV
if [ ! -d $TOOLCHAIN ]; then
TOOLCHAIN=${TOOLCHAIN}-x86
if [ ! -d $TOOLCHAIN ]; then
TOOLCHAIN=${TOOLCHAIN}_64
fi
fi
if [ ! -a $TOOLCHAIN -o ! -a $PLATFORM_ROOT ]; then
NDK_NAME=`basename $NDK_ROOT`
echo "Failed to locate toolchain/platform; $NDK_NAME | $HOST_ENV | $GCC_PREFIX$GCC_VERSION | $ANDROID_PLATFORM"
......
......@@ -19,10 +19,10 @@ fi
HOST_ENV=`uname -s`
case "$HOST_ENV" in
Darwin)
HOST_ENV=darwin-x86
HOST_ENV=darwin
;;
Linux)
HOST_ENV=linux-x86
HOST_ENV=linux
;;
CYGWIN*|*_NT-*)
HOST_ENV=windows
......@@ -36,6 +36,13 @@ esac
PLATFORM_ROOT=$NDK_ROOT/platforms/$ANDROID_PLATFORM/arch-x86
TOOLCHAIN=$NDK_ROOT/toolchains/x86-$GCC_VERSION/prebuilt/$HOST_ENV
if [ ! -d $TOOLCHAIN ]; then
TOOLCHAIN=${TOOLCHAIN}-x86
if [ ! -d $TOOLCHAIN ]; then
TOOLCHAIN=${TOOLCHAIN}_64
fi
fi
if [ ! -a $TOOLCHAIN -o ! -a $PLATFORM_ROOT ]; then
NDK_NAME=`basename $NDK_ROOT`
echo "Failed to locate toolchain/platform; $NDK_NAME | $HOST_ENV | $GCC_VERSION | $ANDROID_PLATFORM"
......
......@@ -44,7 +44,7 @@ LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep);
#endif /* PLATFORM_WIN32 */
#if defined( __linux__) && !defined(ANDROID) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
#if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNXNTO__)
#define MONO_ARCH_USE_SIGACTION
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册