-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[structure] Rework installation directory structure
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 perfomed 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, and/or the support was always insufficient. For example, 87ca273 states that it should be possible to use `msbuild /t:TargetFrameworkRootPath=...` to specify the `lib\xbuild-frameworks` directory as the location to find `Mono.Android` framework assemblies. ...and this works! So long as your project *only* uses Xamarin.Android assemblies and projects. PCL assemblies and projects do *not* fall under this umbrella. Consequently, attempting to use PCL assemblies while overriding `$(TargetFrameworkRootPath)` results in a gnarly error: error MSB3644: The reference assemblies for framework ".NETPortable,Version=v4.5,Profile=Profile259" were not found. This significantly reduces the usefulness of `oss-xamarin.android*.zip` on Windows. Fix this by TODO ARGH. 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`, meanwhile, could become `$prefix/lib/oss-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 `-v18` 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`, becauase 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*...) * `$(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. * Work around an `xbuild`-ism: `%(_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.
- Loading branch information
Showing
67 changed files
with
435 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.