Skip to content

Commit

Permalink
[structure] Rework installation directory structure (#704)
Browse files Browse the repository at this point in the history
Context: #253 (comment)

The *intention* is that Jenkins-produced `oss-xamarin.android*.zip`
artifacts be usable on Windows, so that side-by-side testing can be
performed without replacing the system installation. Usage is in
[UsingJenkinsBuildArtifacts.md](Documentation/UsingJenkinsBuildArtifacts).

This isn't *entirely* the case. It was *apparently* the case at the
time of commit 87ca273, but things have bitrotten since. For
example, following the 87ca273 instructions would currently result
in an XA0020 `Could not find monodroid` error, because
`class-parse.exe` wasn't where Windows expects it to be (it was in
`lib/mandroid`, not `lib/xbuild/Xamarin/Android`).

This needs to be fixed.

Additionally, PR #253 mentions that, for filesystem organization, it
would be useful if the macOS/Linux directory structure --
`$prefix/bin`, `$prefix/lib/mandroid`,
`$prefix/lib/xbuild/Xamarin/Android`, `$prefix/lib/xbuild-frameworks`
-- more closely resembled the Windows directory structure of
`$MSBuild` and `$ReferenceAssemblies` (as seen in `.vsix` files).
This would turn macOS/Linux into using `$xa_prefix/xbuild` and
`$xa_prefix/xbuild-frameworks` directories.

`$prefix/bin` would only contain `xabuild`. What is currently in
`$prefix/lib/mandroid` would be merged with
`$xa_prefix/xbuild/Xamarin/Android`.

`$xa_prefix` would `$prefix/lib/xamarin.android`.

This would turn the current macOS structure:

        $prefix/bin/xabuild
        $prefix/bin/generator
        $prefix/bin/cross-arm
        $prefix/lib/mandroid/generator.exe
        $prefix/lib/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll
        $prefix/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets

Into:

        $prefix/bin/xabuild
        $prefix/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll
        $prefix/lib/xamarin.android/xbuild/Xamarin/Android/generator.exe
        $prefix/lib/xamarin.android/xbuild/Xamarin/Android/Xamarin.Android.Common.targets
        $prefix/lib/xamarin.android/xbuild/Xamarin/Android/Darwin/cross-arm

Other notes:

  * The `bundle-*.zip` filename has been has been changed to include a
    *hash* of the contents of various files, in particular
    `build-tools\mono-runtimes.*`. This was instigated via a
    conversation with @kumpera about making the filename more
    "idiot-proof": `mono-runtimes.props` contains *compiler flags*,
    and if any of those change, then *logically* the bundle should
    differ as well, as the mono runtimes may differ in significant
    ways. In theory, the `-vXX` version should be used to track this,
    but this is a manual change, easy to overlook. The new `-hHASH`
    part of the filename should be more automagic.

    The new `<HashFileContents/>` task in `xa-prep-tasks.dll` is
    responsible for creating the hash value.

  * `Configuration.Java.Interop.Override.props` was moved into
    `build-tools/scripts`, because that would cleanup the root
    directory a bit.

  * OS-specific binaries are now placed into
    `$prefix/lib/xamarin.android/xbuild/Xamarin/Android/$(HostOS)`.
    On a theoretical plus side, this means that the same build
    directory can contain OS-specific binaries for multiple operating
    systems. (I don't know if anyone shares a build tree between e.g.
    macOS and Linux, but if anyone *does*...)

    Unfortunately this requires a workaround for an `xbuild` bug:
    `%(_LlvmRuntime.InstallPath)` and
    `%(_MonoCrossRuntime.InstallPath)` *cannot* use MSBuild
    properties, e.g. `<InstallPath>$(HostOS)/</InstallPath>` doesn't
    work as desired; it's instead treated literally.
    Special-case `%(InstallPath)` until we fully migrate to MSBuild.

  * `$(MonoAndroidToolsDirectory)` should be considered *dead*, along
    with `$(MonoAndroidBinDirectory)`, as these should now *always*
    be the same directory as where `Xamarin.Android.Build.Tasks.dll`
    is located, or a `$(HostOS)` sub-directory.

  * `Xamarin.ProjectTools.csproj` needed to be updated to ensure that
    the build order was correct.

  * Remove all `[Obsolete]` and unreferenced members from
    `Xamarin.Android.Build.Utilities.dll`. There's too much in there,
    and it makes my head hurt trying to understand the
    interrelationships between it all. If it's not used, it's gone.

  * The changes to `src/monodroid/jni/Android.mk` are...weird. The
    removal of `-I$(topdir)/libmonodroid/zip`/etc. is to reduce use of
    non-existent paths, as `$(topdir)` isn't defined, so that's
    *actually* `-I/libmonodroid/zip`, which is nonsensical. So far,
    so good. What's *odd* is the addition of `$(LOCAL_PATH)` to
    `$(LOCAL_C_INCLUDES)`: This is needed so that
    `external/mono/support/zlib-helper.c` exports `CreateZStream` and
    related symbols, otherwise we get a unit test failure in
    `GzipStreamTest.Compression` due to an
    `EntryPointNotFoundException`, because `CreateZStream` isn't
    exported/public.

    What's odd here is that I don't understand what caused this
    behavior to change. Previous builds exported `CreateZStream`,
    otherwise the tests would fail, and I don't understand how any of
    the other changes in this PR would be at fault, though that's
    certainly the most plausible explanation.

    Regardless, `-Ijni` *first* (due to adding `$(LOCAL_PATH)` to
    `$(LOCAL_C_INCLUDES)`) is the desired behavior, so that
    `jni/config.h` is included, thus ensuring that `MONO_API` has the
    required definition when building `zlib-helper.c`.
  • Loading branch information
jonpryor authored Jul 28, 2017
1 parent 0667a2b commit 97f08f7
Show file tree
Hide file tree
Showing 67 changed files with 436 additions and 516 deletions.
1 change: 1 addition & 0 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PropertyGroup>
<AutoProvision Condition=" '$(AutoProvision)' == '' ">False</AutoProvision>
<AutoProvisionUsesSudo Condition=" '$(AutoProvisionUsesSudo)' == '' ">False</AutoProvisionUsesSudo>
<XAInstallPrefix Condition=" '$(XAInstallPrefix)' == '' ">$(MSBuildThisFileDirectory)\bin\$(Configuration)\lib\xamarin.android\</XAInstallPrefix>
<HostOS Condition=" '$(HostOS)' == '' And '$(OS)' == 'Windows_NT' ">Windows</HostOS>
<HostCc Condition=" '$(HostCc)' == '' ">$(HostCc64)</HostCc>
<HostCxx Condition=" '$(HostCxx)' == '' ">$(HostCxx64)</HostCxx>
Expand Down
4 changes: 2 additions & 2 deletions Documentation/DevelopmentTips.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For example, to rebuild Mono for armeabi-v7a:

$ make -C build-tools/mono-runtimes/obj/Debug/armeabi-v7a

# This updates bin/$(Configuration)/lib/xbuild/Xamarin/Android/lib/armeabi-v7a/libmonosgen-2.0.so
# This updates bin/$(Configuration)/lib/xamarin.android/xbuild/Xamarin/Android/lib/armeabi-v7a/libmonosgen-2.0.so
$ xbuild /t:_InstallRuntimes build-tools/mono-runtimes/mono-runtimes.mdproj

# How do I rebuild BCL assemblies?
Expand All @@ -65,7 +65,7 @@ varies based on the operating system you're building from:
Once the assemblies have been rebuilt, they can be copied into the appropriate
Xamarin.Android SDK directory by using the `_InstallBcl` target:

# This updates bin/$(Configuration)/lib/xbuild-frameworks/MonoAndroid/v1.0/ASSEMBLY.dll
# This updates bin/$(Configuration)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/ASSEMBLY.dll
$ xbuild build-tools/mono-runtimes/mono-runtimes.mdproj /t:_InstallBcl

# Update Directory
Expand Down
6 changes: 3 additions & 3 deletions Documentation/UsingJenkinsBuildArtifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ For example (using the paths from [Android SDK Setup](#Android_SDK_Setup)):

msbuild /p:AndroidSdkDirectory="C:\xa-sdk\android-sdk" ^
/p:AndroidNdkDirectory="C:\xa-sdk\android-ndk\android-ndk-r14" ^
/p:MonoAndroidBinDirectory="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xbuild\Xamarin\Android" ^
/p:MonoAndroidToolsDirectory="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xbuild\Xamarin\Android" ^
/p:TargetFrameworkRootPath="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xbuild-frameworks" ^
/p:MonoAndroidBinDirectory="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xamarin.android\xbuild\Xamarin\Android" ^
/p:MonoAndroidToolsDirectory="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xamarin.android\xbuild\Xamarin\Android" ^
/p:TargetFrameworkRootPath="C:\xa-sdk\oss-xamarin.android_v7.2.99.19_Darwin-x86_64_master_3b893cd\bin\Debug\lib\xamarin.android\xbuild-frameworks" ^
/t:SignAndroidPackage ^
samples\HelloWorld\HelloWorld.csproj

Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ install::
echo "run 'make all' before you execute 'make install'!"; \
exit 1; \
fi
-mkdir -p "$(prefix)/bin"
-mkdir -p "$(prefix)/lib/mono/xbuild-frameworks"
-mkdir -p "$(prefix)/lib/xamarin.android"
-mkdir -p "$(prefix)/lib/mono/xbuild/Xamarin/"
cp -a "bin/$(CONFIGURATION)/." "$(prefix)/lib/xamarin.android/"
cp -a "bin/$(CONFIGURATION)/lib/xamarin.android/." "$(prefix)/lib/xamarin.android/"
cp tools/scripts/xabuild "$(prefix)/bin/xabuild"
-rm -rf "$(prefix)/lib/mono/xbuild/Xamarin/Android"
-rm -rf "$(prefix)/lib/mono/xbuild-frameworks/MonoAndroid"
ln -s "$(prefix)/lib/xamarin.android/lib/xbuild/Xamarin/Android/" "$(prefix)/lib/mono/xbuild/Xamarin/Android"
ln -s "$(prefix)/lib/xamarin.android/lib/xbuild-frameworks/MonoAndroid/" "$(prefix)/lib/mono/xbuild-frameworks/MonoAndroid"
ln -s "$(prefix)/lib/xamarin.android/xbuild/Xamarin/Android/" "$(prefix)/lib/mono/xbuild/Xamarin/Android"
ln -s "$(prefix)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/" "$(prefix)/lib/mono/xbuild-frameworks/MonoAndroid"

uninstall::
rm -rf "$(prefix)/lib/xamarin.android/" "$(prefix)/bin/xabuild"
Expand Down Expand Up @@ -90,7 +91,7 @@ prepare-external: prepare-deps
(cd $(call GetPath,JavaInterop) && make bin/BuildDebug/JdkInfo.props)

prepare-props: prepare-external
cp Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
cp build-tools/scripts/Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
cp $(call GetPath,MonoSource)/mcs/class/msfinal.pub .

prepare-msbuild: prepare-props
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ The `bin\$(Configuration)` directory, e.g. `bin\Debug`, contains
acts as a *local installation prefix*, in which the directory structure
mirrors that of the OS X Xamarin.Android.framework directory structure:

* `bin\$(Configuration)\lib\xbuild\Xamarin\Android`: MSBuild-related support
* `bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android`: MSBuild-related support
files and required runtimes used by the MSBuild tooling.
* `bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid`: Xamarin.Android
* `bin\$(Configuration)\lib\xamarin.android\xbuild-frameworks\MonoAndroid`: Xamarin.Android
profiles.
* `bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\v1.0`: Xamarin.Android
* `bin\$(Configuration)\lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0`: Xamarin.Android
Base Class Library assemblies such as `mscorlib.dll`.
* `bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\*`: Contains
* `bin\$(Configuration)\lib\xamarin.android\xbuild-frameworks\MonoAndroid\*`: Contains
`Mono.Android.dll` for a given Xamarin.Android `$(TargetFrameworkVersion)`.

# Xamarin.Android `$(TargetFrameworkVersion)`s
Expand Down Expand Up @@ -354,7 +354,7 @@ For example, to generate `Mono.Android.dll` for API-19 (Android 4.4):

cd src/Mono.Android
xbuild /p:AndroidApiLevel=19 /p:AndroidFrameworkVersion=v4.4
# creates bin\Debug\lib\xbuild-frameworks\MonoAndroid\v4.4\Mono.Android.dll
# creates bin\Debug\lib\xamarin.android\xbuild-frameworks\MonoAndroid\v4.4\Mono.Android.dll

<a name="Samples" />

Expand Down
4 changes: 2 additions & 2 deletions build-tools/api-xml-adjuster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ANDROID_SDK_PATH=$(shell find ~/ -maxdepth 1 -name android-sdk-*)

DOCS_DIR=~/android-toolchain/docs

MANDROID = ../../bin/$(CONFIGURATION)/lib/mandroid
MANDROID = ../../bin/$(CONFIGURATION)/lib/xamarin.anroid/xbuild/Xamarin/Android
BUILDBIN = ../../bin/Build$(CONFIGURATION)

CLASS_PARSE = $(MANDROID)/class-parse.exe
Expand Down Expand Up @@ -62,7 +62,7 @@ $(ANALYZED_XML): $(API_XML_TOOL) $(CLASS_PARSE_XML)
$(RUN_API_XML_TOOL) $(CLASS_PARSE_XML) $(ANALYZED_XML) || rm -f $(ANALYZED_XML)

$(CLASS_PARSE):
cd $(JAVA_INTEROP_PATH)/tools/class-parse && $(XBUILD) /p:OutputPath=$(TOP)/out/lib/mandroid
cd $(JAVA_INTEROP_PATH)/tools/class-parse && $(XBUILD) /p:OutputPath=$(TOP)/out/lib/xamarin.android/xbuild/Xamarin.Android/

$(API_XML_TOOL):
$(XBUILD)
Expand Down
11 changes: 10 additions & 1 deletion build-tools/bundle/bundle-path.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitHash" />
<UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.HashFileContents" />
<Target Name="_GetHashes">
<GitCommitHash
WorkingDirectory="$(LibZipSourceFullPath)"
Expand All @@ -20,11 +21,19 @@
ToolExe="$(GitToolExe)">
<Output TaskParameter="AbbreviatedCommitHash" PropertyName="_MonoHash" />
</GitCommitHash>
<!-- Files which contribute to the bundle "version" -->
<ItemGroup>
<VersionFile Include="..\mono-runtimes\mono-runtimes.*" />
</ItemGroup>
<HashFileContents
Files="@(VersionFile)">
<Output TaskParameter="AbbreviatedCompleteHash" PropertyName="_VersionHash"/>
</HashFileContents>
</Target>
<Target Name="GetBundleFileName"
DependsOnTargets="_GetHashes">
<PropertyGroup>
<XABundleFileName>bundle-v18-$(Configuration)-$(HostOS)-libzip=$(_LibZipHash),llvm=$(_LlvmHash),mono=$(_MonoHash).zip</XABundleFileName>
<XABundleFileName>bundle-v19-h$(_VersionHash)-$(Configuration)-$(HostOS)-libzip=$(_LibZipHash),llvm=$(_LlvmHash),mono=$(_MonoHash).zip</XABundleFileName>
</PropertyGroup>
</Target>
</Project>
2 changes: 0 additions & 2 deletions build-tools/bundle/bundle.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.Zip" />
<Import Project="..\mono-runtimes\mono-runtimes.props" />
<Import Project="..\mono-runtimes\mono-runtimes.projitems" />
<Import Project="..\mono-runtimes\mono-runtimes.targets" />
<Import Project="..\libzip\libzip.props" />
<Import Project="..\libzip-windows\libzip-windows.props" />
Expand Down
7 changes: 4 additions & 3 deletions build-tools/create-vsix/create-vsix.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$(PrepareForBuildDependsOn);
AddContent
</PrepareForBuildDependsOn>
<LibDir>..\..\bin\$(Configuration)\lib\</LibDir>
<LibDir>..\..\bin\$(Configuration)\lib\xamarin.android\</LibDir>
</PropertyGroup>
<ItemDefinitionGroup>
<MSBuild>
Expand All @@ -36,16 +36,17 @@
</MSBuild>
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\lib\host-Darwin\**\*.*" />
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\lib\host-Linux\**\*.*" />
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\Darwin\**\*.*" />
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\Linux\**\*.*" />
<MSBuild Include="..\..\src\Xamarin.Android.Build.Tasks\MSBuild\Xamarin\**\*.*" />
<MSBuild>
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Xamarin/%(RecursiveDir)</VSIXSubPath>
</MSBuild>
<MSBuild Include="..\..\bin\$(Configuration)\lib\mandroid\**\*.*" />
<MSBuild Remove="..\..\bin\$(Configuration)\lib\mandroid\**\*.d.exe" />
<MSBuild>
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Xamarin/Android/%(RecursiveDir)</VSIXSubPath>
</MSBuild>
<MSBuild Remove="$(LibDir)xbuild\**\*.d.dll" />
<MSBuild Remove="$(LibDir)xbuild\**\*.d.exe" />
<ReferenceAssemblies Include="$(LibDir)xbuild-frameworks\**\*.*" />
<ReferenceAssemblies>
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Microsoft/Framework/%(RecursiveDir)</VSIXSubPath>
Expand Down
5 changes: 3 additions & 2 deletions build-tools/libzip-windows/libzip-windows.mdproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>
<Import Project="..\..\Configuration.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
<OutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
<OutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</OutputPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
<PropertyGroup>
Expand All @@ -24,6 +24,7 @@
<Import Project="libzip-windows.props" />
<Import Project="libzip-windows.projitems" />
<Import Project="libzip-windows.targets" />
<Import Project="..\libzip\libzip.targets" />
<ItemGroup>
<ProjectReference Include="..\android-toolchain\android-toolchain.mdproj">
<Project>{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}</Project>
Expand Down
1 change: 0 additions & 1 deletion build-tools/libzip-windows/libzip-windows.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\libzip\libzip.targets" />
</Project>
4 changes: 2 additions & 2 deletions build-tools/libzip/libzip.mdproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>
<Import Project="..\..\Configuration.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
<OutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
<OutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</OutputPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
<PropertyGroup>
Expand Down
7 changes: 4 additions & 3 deletions build-tools/libzip/libzip.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
_Configure;
_Make
</ForceBuildDependsOn>
<_LibZipOutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</_LibZipOutputPath>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Clean" />
Expand All @@ -29,7 +30,7 @@
/>
</Target>
<ItemGroup>
<Content Include="@(_LibZipTarget->'$(OutputPath)\lib\xbuild\Xamarin\Android\%(OutputLibrary)')">
<Content Include="@(_LibZipTarget->'$(_LibZipOutputPath)%(OutputLibrary)')">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand All @@ -43,7 +44,7 @@
/>
<Copy
SourceFiles="@(_LibZipTarget->'$(IntermediateOutputPath)\%(Identity)\%(OutputLibraryPath)')"
DestinationFiles="@(_LibZipTarget->'$(OutputPath)\lib\xbuild\Xamarin\Android\%(OutputLibrary)')"
DestinationFiles="@(_LibZipTarget->'$(_LibZipOutputPath)%(OutputLibrary)')"
/>
<Touch Files="@(Content)" />
</Target>
Expand Down Expand Up @@ -73,6 +74,6 @@
<Target Name="_CleanBinaries"
AfterTargets="Clean">
<RemoveDir Directories="$(IntermediateOutputPath)\%(_LibZipTarget.Identity)" />
<Delete Files="@(_LibZipTarget->'$(OutputPath)\lib\xbuild\Xamarin\Android\%(OutputLibrary)')" />
<Delete Files="@(_LibZipTarget->'$(_LibZipOutputPath)%(OutputLibrary)')" />
</Target>
</Project>
5 changes: 3 additions & 2 deletions build-tools/mono-runtimes/mono-runtimes.mdproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
<ItemType>GenericProject</ItemType>
<ProjectGuid>{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}</ProjectGuid>
</PropertyGroup>
<Import Project="..\..\Configuration.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\bin\Debug</OutputPath>
<OutputPath>$(XAInstallPrefix)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\bin\Release</OutputPath>
<OutputPath>$(XAInstallPrefix)</OutputPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
<PropertyGroup>
Expand Down
30 changes: 18 additions & 12 deletions build-tools/mono-runtimes/mono-runtimes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@
<BuildEnvironment></BuildEnvironment>
<ExeSuffix></ExeSuffix>
<InstallBinaries>true</InstallBinaries>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
</_LlvmRuntime>

<_LlvmRuntime Include="llvm64" Condition=" '$(_LlvmNeeded)' != '' And '$(_LlvmCanBuild64)' == 'yes' ">
Expand All @@ -271,7 +272,8 @@
<BuildEnvironment></BuildEnvironment>
<ExeSuffix></ExeSuffix>
<InstallBinaries>true</InstallBinaries>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
</_LlvmRuntime>

<_LlvmRuntime Include="llvmwin32" Condition=" '$(_LlvmNeeded)' != '' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win32:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':linux-Win32:'))) ">
Expand All @@ -282,7 +284,7 @@
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ExeSuffix>.exe</ExeSuffix>
<InstallBinaries>true</InstallBinaries>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
</_LlvmRuntime>

<_LlvmRuntime Include="llvmwin64" Condition=" '$(_LlvmNeeded)' != '' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win64:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':linux-Win64:'))) ">
Expand All @@ -293,7 +295,7 @@
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ExeSuffix>.exe</ExeSuffix>
<InstallBinaries>false</InstallBinaries>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
</_LlvmRuntime>
</ItemGroup>

Expand All @@ -318,7 +320,8 @@
<ExeSuffix></ExeSuffix>
<BuildEnvironment></BuildEnvironment>
<ConfigureEnvironment></ConfigureEnvironment>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
<CrossMonoName>cross-arm</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -341,7 +344,8 @@
<ExeSuffix></ExeSuffix>
<BuildEnvironment></BuildEnvironment>
<ConfigureEnvironment></ConfigureEnvironment>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
<CrossMonoName>cross-arm64</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -364,7 +368,8 @@
<ExeSuffix></ExeSuffix>
<BuildEnvironment></BuildEnvironment>
<ConfigureEnvironment></ConfigureEnvironment>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
<CrossMonoName>cross-x86</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -387,7 +392,8 @@
<ExeSuffix></ExeSuffix>
<BuildEnvironment></BuildEnvironment>
<ConfigureEnvironment></ConfigureEnvironment>
<InstallPath>bin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">Darwin/</InstallPath>
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
<CrossMonoName>cross-x86_64</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -410,7 +416,7 @@
<ExeSuffix>.exe</ExeSuffix>
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ConfigureEnvironment>$(_LlvmConfigureEnvironmentWin32)</ConfigureEnvironment>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
<CrossMonoName>cross-arm</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -433,7 +439,7 @@
<ExeSuffix>.exe</ExeSuffix>
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ConfigureEnvironment>$(_LlvmConfigureEnvironmentWin64)</ConfigureEnvironment>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
<CrossMonoName>cross-arm64</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -456,7 +462,7 @@
<ExeSuffix>.exe</ExeSuffix>
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ConfigureEnvironment>$(_LlvmConfigureEnvironmentWin32)</ConfigureEnvironment>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
<CrossMonoName>cross-x86</CrossMonoName>
</_MonoCrossRuntime>

Expand All @@ -479,7 +485,7 @@
<ExeSuffix>.exe</ExeSuffix>
<BuildEnvironment>PATH="$(AndroidMxeFullPath)\bin:$(PATH)"</BuildEnvironment>
<ConfigureEnvironment>$(_LlvmConfigureEnvironmentWin32)</ConfigureEnvironment>
<InstallPath>lib/mandroid/</InstallPath>
<InstallPath></InstallPath>
<CrossMonoName>cross-x86_64</CrossMonoName>
</_MonoCrossRuntime>
</ItemGroup>
Expand Down
Loading

0 comments on commit 97f08f7

Please sign in to comment.