From b4cbd9dbdc9f1850e5953bc785d2abb6cf0f69c3 Mon Sep 17 00:00:00 2001 From: Cyd Haselton Date: Thu, 8 Jun 2017 17:34:04 -0500 Subject: First steps for generating nuget packages for ARM64/Android. (#10286) * First steps for generating nuget packages for ARM64/Android. Adds Android RIDS and related conditionals to appropriate files * Additional changes for Android package build * Revert addition of Android to supported packages * Allow Android .nuget package build Adding runtime.Android files for package generation Adding TODO for reliable generation of __DistroRid for Android * Added/corrected logic for detecting __DistroRid at commandline Removed hack and TODO * Removed newline * Revert unintentional change to osx rid * Removed commenting of __DistroRid initialization * Latest fixes for __DistroRid cmdline detection Removed __DistroRid initialization (clobbers value set at cmdline) Removed echo test of __DistroRid in generate nuget pkg function (Hopefully) fixed cross-build os-release detection * Removed android.21-arm from supported RIDs Removed arm32 from supported RIDs until test build can be done or CI for arm32 added (?) * Fixes for package generation for android Modified build-android-rootfs.sh so it would generate file w/platform info Reverted all prior changes to initTargetDistroRid, added new android platform detection * Fixed conditional for Android * Added platform generation for Android portable build, if ever needed * Added information about android_platform Added help info about android_platform file Added TODO for dynamic generation of RID based on $__ApiLevel and $__BuildArch * Syntax cleanup for build.sh Removed extra space in initTargetDistroRid() logic * Recommended review changes removed Android-specific runtime files for packaging added conditional to have Android use Linux runtime files * Updated topic branch from master, resolving SPC.ni.dll file nuget pkg issue * ericstj review changes Fixed accidental fedora version change Fixed indenting * Removed TODO comment; logic already in place, added in earlier commit * Removed Android OfficialBuildRID --- build.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 3385a8760a..a85b137789 100755 --- a/build.sh +++ b/build.sh @@ -73,8 +73,13 @@ initTargetDistroRid() if [ $__CrossBuild == 1 ]; then if [ "$__BuildOS" == "Linux" ]; then if [ ! -e $ROOTFS_DIR/etc/os-release ]; then - echo "WARNING: Can not determine runtime id for current distro." - export __DistroRid="" + if [ -e $ROOTFS_DIR/android_platform ]; then + source $ROOTFS_DIR/android_platform + export __DistroRid="$RID" + else + echo "WARNING: Can not determine runtime id for current distro." + export __DistroRid="" + fi else source $ROOTFS_DIR/etc/os-release export __DistroRid="$ID.$VERSION_ID-$__BuildArch" @@ -484,7 +489,8 @@ generate_NugetPackages() fi echo "Generating nuget packages for "$__BuildOS - + echo "DistroRid is "$__DistroRid + echo "ROOTFS_DIR is "$ROOTFS_DIR # Build the packages $__ProjectRoot/run.sh build -Project=$__SourceDir/.nuget/packages.builds -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false $__RunArgs $__UnprocessedBuildArgs -- cgit v1.2.3