From c4981a6f2342f69c9affea9df580509132e2cfd8 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Dec 2024 17:41:30 +0100 Subject: [PATCH 01/11] [CoreVideo] Add CVMetalBufferCache.TryCreate overloads and use these to improve tests. (#21757) Co-authored-by: GitHub Actions Autoformatter --- src/CoreVideo/CVMetalBufferCache.cs | 43 +++++++++-- .../CoreVideo/CVMetalBufferCacheTest.cs | 76 ++++++++++++++++--- .../CoreVideo/CVMetalBufferTest.cs | 4 +- 3 files changed, 103 insertions(+), 20 deletions(-) diff --git a/src/CoreVideo/CVMetalBufferCache.cs b/src/CoreVideo/CVMetalBufferCache.cs index ae0562fa29d..ecbb025b6f2 100644 --- a/src/CoreVideo/CVMetalBufferCache.cs +++ b/src/CoreVideo/CVMetalBufferCache.cs @@ -1,5 +1,8 @@ #if !WATCH using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using CoreFoundation; @@ -51,16 +54,44 @@ public static nint GetTypeId () static IntPtr Create (IMTLDevice device, NSDictionary? attributes) { - IntPtr handle; - CVReturn res; - unsafe { - res = CVMetalBufferCacheCreate (IntPtr.Zero, attributes.GetHandle (), device.GetNonNullHandle (nameof (device)), &handle); - } - if (res != CVReturn.Success) + if (!TryCreateHandle (device, attributes, out IntPtr handle, out var res)) throw new Exception ($"Could not create CVMetalBufferCache, CVMetalBufferCacheCreate returned: {res}"); return handle; } + /// Try to create a new instance. + /// The Metal device to create the instance for. + /// An optional dictionary of attributes to apply to the cache. + /// The new instance, if successful, null otherwise. + /// An error code if failed, or if successful. + /// True if successful, otherwise false. + public static bool TryCreate (IMTLDevice device, NSDictionary? attributes, [NotNullWhen (true)] out CVMetalBufferCache? metalBufferCache, out CVReturn status) + { + var rv = TryCreateHandle (device, attributes, out IntPtr handle, out status); + if (rv) { + metalBufferCache = new CVMetalBufferCache (handle, true); + } else { + metalBufferCache = null; + } + return rv; + } + + /// Try to create a new instance. + /// The Metal device to create the instance for. + /// An optional dictionary of attributes to apply to the cache. + /// The pointer to the new instance, if successful. + /// An error code if failed, or if successful. + /// True if successful, otherwise false. + [EditorBrowsable (EditorBrowsableState.Never)] + public static bool TryCreateHandle (IMTLDevice device, NSDictionary? attributes, out IntPtr handle, out CVReturn status) + { + handle = IntPtr.Zero; + unsafe { + status = CVMetalBufferCacheCreate (IntPtr.Zero, attributes.GetHandle (), device.GetNonNullHandle (nameof (device)), (IntPtr*) Unsafe.AsPointer (ref handle)); + } + return status == CVReturn.Success; + } + /// Create a new instance. /// The Metal device to create the instance for. /// An optional dictionary of attributes to apply to the cache. diff --git a/tests/monotouch-test/CoreVideo/CVMetalBufferCacheTest.cs b/tests/monotouch-test/CoreVideo/CVMetalBufferCacheTest.cs index d13352af1c8..d1bbb2e8ee5 100644 --- a/tests/monotouch-test/CoreVideo/CVMetalBufferCacheTest.cs +++ b/tests/monotouch-test/CoreVideo/CVMetalBufferCacheTest.cs @@ -19,6 +19,29 @@ namespace MonoTouchFixtures.CoreVideo { [Preserve (AllMembers = true)] public class CVMetalBufferCacheTests { + static bool? supported; + public static bool Supported { + get { + if (supported is null) { + using var device = MTLDevice.SystemDefault; + if (device is null) { + supported = false; + } else { + supported = CVMetalBufferCache.TryCreate (device, (NSDictionary) null, out var cache, out var _); + cache?.Dispose (); + } + } + return supported.Value; + } + } + + public static void AssertSupported () + { + if (Supported) + return; + Assert.Ignore ("CVMetalBufferCache is not supported on this machine."); + } + [Test] public void GetTypeIdTest () { @@ -31,24 +54,59 @@ public void GetTypeIdTest () public void CtorTest_NSDictionary () { TestRuntime.AssertXcodeVersion (16, 0); + AssertSupported (); using var device = MTLDevice.SystemDefault; - if (device is null) - Assert.Ignore ("Metal is not supported on this device."); - using var cache = new CVMetalBufferCache (device, (NSDictionary) null); Assert.IsNotNull (cache); } [Test] - public void CtorTest_CVMetalBufferCacheAttributes () + public void TryCreate () { TestRuntime.AssertXcodeVersion (16, 0); + using var device = MTLDevice.SystemDefault; + if (device is null) + Assert.Ignore ("Metal is not supported on this machine."); + + var rv = CVMetalBufferCache.TryCreate (device, (NSDictionary) null, out var metalBufferCache, out var status); + if (rv) { + Assert.AreEqual (CVReturn.Success, status, "Status A"); + Assert.IsNotNull (metalBufferCache, "MetalBufferCache A"); + } else { + Assert.AreEqual (CVReturn.Unsupported, status, "Status B"); + Assert.IsNull (metalBufferCache, "MetalBufferCache B"); + } + metalBufferCache?.Dispose (); + } + [Test] + public void TryCreateHandle () + { + TestRuntime.AssertXcodeVersion (16, 0); using var device = MTLDevice.SystemDefault; if (device is null) - Assert.Ignore ("Metal is not supported on this device."); + Assert.Ignore ("Metal is not supported on this machine."); + + var rv = CVMetalBufferCache.TryCreateHandle (device, (NSDictionary) null, out var metalBufferCache, out var status); + if (rv) { + Assert.AreEqual (CVReturn.Success, status, "Status A"); + Assert.AreNotEqual (IntPtr.Zero, metalBufferCache, "MetalBufferCache A"); + } else { + Assert.AreEqual (CVReturn.Unsupported, status, "Status B"); + Assert.AreEqual (IntPtr.Zero, metalBufferCache, "MetalBufferCache B"); + } + if (metalBufferCache != IntPtr.Zero) + TestRuntime.CFRelease (metalBufferCache); + } + + [Test] + public void CtorTest_CVMetalBufferCacheAttributes () + { + TestRuntime.AssertXcodeVersion (16, 0); + AssertSupported (); + using var device = MTLDevice.SystemDefault; using var cache = new CVMetalBufferCache (device, (CVMetalBufferCacheAttributes) null); Assert.IsNotNull (cache); } @@ -60,11 +118,9 @@ public void CreateBufferFromImageTest (CVPixelFormatType pft) { TestRuntime.AssertXcodeVersion (16, 0); TestRuntime.AssertNotSimulator (); // metal api not supported in the simulator + AssertSupported (); using var device = MTLDevice.SystemDefault; - if (device is null) - Assert.Ignore ("Metal is not supported on this device."); - using var cache = new CVMetalBufferCache (device, (CVMetalBufferCacheAttributes) null); var dict = new CVPixelBufferAttributes () { MetalCompatibility = true, @@ -79,11 +135,9 @@ public void CreateBufferFromImageTest (CVPixelFormatType pft) public void FlushTest () { TestRuntime.AssertXcodeVersion (16, 0); + AssertSupported (); using var device = MTLDevice.SystemDefault; - if (device is null) - Assert.Ignore ("Metal is not supported on this device."); - using var cache = new CVMetalBufferCache (device, (CVMetalBufferCacheAttributes) null); cache.Flush (); cache.Flush (CVOptionFlags.None); diff --git a/tests/monotouch-test/CoreVideo/CVMetalBufferTest.cs b/tests/monotouch-test/CoreVideo/CVMetalBufferTest.cs index 104d232fe54..aaa4694729b 100644 --- a/tests/monotouch-test/CoreVideo/CVMetalBufferTest.cs +++ b/tests/monotouch-test/CoreVideo/CVMetalBufferTest.cs @@ -35,11 +35,9 @@ public void GetMetalBufferTest (CVPixelFormatType pft) { TestRuntime.AssertXcodeVersion (16, 0); TestRuntime.AssertNotSimulator (); // metal api not supported in the simulator + CVMetalBufferCacheTests.AssertSupported (); using var device = MTLDevice.SystemDefault; - if (device is null) - Assert.Ignore ("Metal is not supported on this device."); - using var cache = new CVMetalBufferCache (device, (CVMetalBufferCacheAttributes) null); var dict = new CVPixelBufferAttributes () { MetalCompatibility = true, From 803d0fdae264a9dd3a517a026105df0548b53185 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Dec 2024 18:46:32 +0100 Subject: [PATCH 02/11] [Foundation] Fix memory leak in NSArray.ArrayFromHandle (#21749) --- src/Foundation/NSArray.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Foundation/NSArray.cs b/src/Foundation/NSArray.cs index 8dc5654cfe4..028be3f6c5d 100644 --- a/src/Foundation/NSArray.cs +++ b/src/Foundation/NSArray.cs @@ -407,7 +407,7 @@ static public T [] ArrayFromHandle (NativeHandle handle, Converter (NativeHandle handle, Converter creator, bool releaseHandle) { var rv = ArrayFromHandle (handle, creator); - if (releaseHandle && handle == NativeHandle.Zero) + if (releaseHandle && handle != NativeHandle.Zero) NSObject.DangerousRelease (handle); return rv; } From 55b75a4f8b19bb247e780b66a8599e1b604303d3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Dec 2024 18:46:45 +0100 Subject: [PATCH 03/11] Update DOWNLOADS doc regarding legacy Xamarin deprecation. (#21751) Fixes #21744. --- DOWNLOADS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DOWNLOADS.md b/DOWNLOADS.md index aa856d54429..d36c1c43a4f 100644 --- a/DOWNLOADS.md +++ b/DOWNLOADS.md @@ -1,3 +1,10 @@ +> [!NOTE] +> This page lists Xamarin.iOS and Xamarin.Mac downloads, which are both discontinued. +> +> If you're looking for how to install a specific version of the iOS, tvOS, Mac Catalyst or macOS workloads (for .NET), +> please [file an issue](https://github.com/xamarin/xamarin-macios/issues/new/choose) explaining what you need +> (they're shipped as .NET workloads, and not installable from packages). + # Xamarin.iOS | Date | Version | Package | Release Notes | From 3959953bb2fd64979c7755a3c6a853d0e51a902a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Dec 2024 18:49:36 +0100 Subject: [PATCH 04/11] Bump Xamarin.MacDev. (#21743) New commits in xamarin/Xamarin.MacDev: * xamarin/Xamarin.MacDev@25c687f Remove SQLite.cs (not used anymore) * xamarin/Xamarin.MacDev@7be3e79 Update NUnit to 4.x (and the tests) Diff: https://github.com/xamarin/Xamarin.MacDev/compare/bd3d13362bfda48a34fa0cc419744c4a1f4dc45a..25c687f14f4dacb90d13b7671c78c3742e3c06e5 From 001f1efceee0aafd6702044e5fcedac67f4bce56 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Dec 2024 18:56:48 +0100 Subject: [PATCH 05/11] [msbuild] Remove a lot of legacy logic + a few improvements. (#21742) * Remove a lot of legacy build logc. * Unify the installed files: we now install all files on all platforms (except files related to remote windows support). This simplifies the build logic, and doesn't increase the nupkg size in any significant way, because these are tiny text files. * Completely merge Xamarin.iOS.Tasks.dll and Xamarin.Mac.Tasks.dll into Xamarin.MacDev.Tasks.dll, and remove the two former assemblies. This also simplifies a lot of build logic. * Ship the translations for our task assemblies in .NET (seems like this was overlooked in the .NET migration). --- dotnet/Makefile | 4 +- .../targets/Microsoft.iOS.Sdk.props | 2 +- .../targets/Microsoft.iOS.Windows.Sdk.props | 4 +- .../targets/Microsoft.iOS.Windows.Sdk.targets | 16 +- dotnet/Workloads/SignList.xml | 22 +- dotnet/targets/Xamarin.Shared.Sdk.props | 3 +- dotnet/targets/Xamarin.Shared.Sdk.targets | 2 +- msbuild/ILMerge.targets | 5 +- msbuild/Makefile | 408 ++---------------- .../Xamarin.Messaging.Build.csproj | 6 +- msbuild/Xamarin.HotRestart.PreBuilt/Makefile | 6 +- .../Properties/AssemblyInfo.cs | 10 - .../Xamarin.Mac.Tasks.csproj | 41 -- msbuild/Xamarin.MacDev.Tasks.sln | 20 - .../Properties/AssemblyInfo.cs | 15 +- msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs | 2 +- .../Tasks/CompileAppManifest.cs | 15 +- .../Tasks/ComputeRemoteGeneratorProperties.cs | 46 +- .../Tasks/DetectSigningIdentity.cs | 11 +- .../Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs | 19 +- .../Tasks/XamarinToolTask.cs | 18 +- .../Xamarin.MacDev.Tasks.csproj | 41 +- .../Xamarin.ImplicitFacade.targets | 111 ----- .../Xamarin.Mac-Full-FrameworkList.xml.in | 191 -------- .../Xamarin.Mac-Mobile-FrameworkList.xml.in | 190 -------- .../Xamarin.Mac.AppExtension.CSharp.targets | 3 +- ...marin.Mac.AppExtension.VisualBasic.targets | 1 - .../Xamarin.Shared/Xamarin.Mac.CSharp.targets | 2 - .../Xamarin.Shared/Xamarin.Mac.Common.targets | 32 -- .../Xamarin.Mac.ObjCBinding.CSharp.targets | 20 +- .../Xamarin.Mac.VisualBasic.targets | 2 - .../Xamarin.MacCatalyst-FrameworkList.xml.in | 192 --------- .../Xamarin.MacCatalyst.CSharp.targets | 2 - .../Xamarin.MacCatalyst.Common.targets | 2 +- ...rin.MacCatalyst.ObjCBinding.CSharp.targets | 2 +- .../Xamarin.MacCatalyst.VisualBasic.targets | 2 - .../Xamarin.MonoTouch.CSharp.targets | 20 - .../Xamarin.MonoTouch.FSharp.targets | 20 - .../Xamarin.Shared.ObjCBinding.targets | 18 - msbuild/Xamarin.Shared/Xamarin.Shared.props | 30 +- msbuild/Xamarin.Shared/Xamarin.Shared.targets | 53 +-- .../Xamarin.TVOS-FrameworkList.xml.in | 191 -------- .../Xamarin.TVOS.AppExtension.CSharp.targets | 3 +- ...arin.TVOS.AppExtension.VisualBasic.targets | 1 - .../Xamarin.TVOS.CSharp.targets | 1 - .../Xamarin.TVOS.Common.targets | 2 +- .../Xamarin.TVOS.ObjCBinding.CSharp.targets | 4 +- .../Xamarin.TVOS.VisualBasic.targets | 1 - .../Xamarin.WatchOS-FrameworkList.xml.in | 187 -------- .../Xamarin.WatchOS.App.CSharp.targets | 1 - .../Xamarin.WatchOS.App.Common.targets | 2 +- ...amarin.WatchOS.AppExtension.CSharp.targets | 3 +- ...amarin.WatchOS.AppExtension.Common.targets | 4 +- .../Xamarin.WatchOS.CSharp.targets | 3 +- .../Xamarin.WatchOS.Common.targets | 4 +- ...Xamarin.WatchOS.ObjCBinding.CSharp.targets | 4 +- .../Xamarin.iOS-FrameworkList.xml.in | 191 -------- .../Xamarin.iOS.AppExtension.CSharp.targets | 3 +- ...marin.iOS.AppExtension.VisualBasic.targets | 1 - .../Xamarin.Shared/Xamarin.iOS.CSharp.targets | 1 - .../Xamarin.Shared/Xamarin.iOS.Common.props | 8 - .../Xamarin.Shared/Xamarin.iOS.Common.targets | 55 --- .../Xamarin.iOS.ObjCBinding.CSharp.targets | 3 +- .../Xamarin.iOS.VisualBasic.targets | 1 - .../Xamarin.iOS.WatchApp.CSharp.targets | 3 +- .../Xamarin.iOS.Common.After.targets | 16 +- .../Xamarin.iOS.Common.Before.targets | 2 +- .../Xamarin.iOS.HotRestart.targets | 12 +- ...marin.iOS.ObjCBinding.CSharp.After.targets | 2 +- .../Xamarin.iOS.Windows.props | 4 +- .../Properties/AssemblyInfo.cs | 10 - .../Xamarin.iOS.Tasks.csproj | 75 ---- .../Xamarin.MacDev.Tasks.Tests.csproj | 12 +- tools/autoformat.sh | 2 - 74 files changed, 193 insertions(+), 2228 deletions(-) delete mode 100644 msbuild/Xamarin.Mac.Tasks/Properties/AssemblyInfo.cs delete mode 100644 msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj delete mode 100644 msbuild/Xamarin.Shared/Xamarin.ImplicitFacade.targets delete mode 100644 msbuild/Xamarin.Shared/Xamarin.Mac-Full-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.Shared/Xamarin.Mac-Mobile-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.Shared/Xamarin.MacCatalyst-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.Shared/Xamarin.MonoTouch.CSharp.targets delete mode 100644 msbuild/Xamarin.Shared/Xamarin.MonoTouch.FSharp.targets delete mode 100644 msbuild/Xamarin.Shared/Xamarin.TVOS-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.Shared/Xamarin.WatchOS-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.Shared/Xamarin.iOS-FrameworkList.xml.in delete mode 100644 msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs delete mode 100644 msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj diff --git a/dotnet/Makefile b/dotnet/Makefile index baf94c9ceae..1e34e33d16d 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -58,7 +58,7 @@ $(foreach platform,$(DOTNET_WINDOWS_PLATFORMS),$(eval $(call DefineWindowsTarget ifdef INCLUDE_HOTRESTART iOS_WINDOWS_NUGET_TARGETS += \ - $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip \ + $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip \ endif @@ -511,7 +511,7 @@ clean-local:: $(Q) $(DOTNET) restore package/workaround-for-maccore-issue-2427/restore.csproj /bl:package/workaround-for-maccore-issue-2427/restore.binlog $(MSBUILD_VERBOSITY) $(Q) touch $@ -$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip: .stamp-install-workloads +$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip: .stamp-install-workloads $(Q) $(MAKE) -C $(TOP)/msbuild/Xamarin.HotRestart.PreBuilt all $(Q) touch $@ diff --git a/dotnet/Microsoft.iOS.Sdk/targets/Microsoft.iOS.Sdk.props b/dotnet/Microsoft.iOS.Sdk/targets/Microsoft.iOS.Sdk.props index ac5d7a75729..5caef63a2a1 100644 --- a/dotnet/Microsoft.iOS.Sdk/targets/Microsoft.iOS.Sdk.props +++ b/dotnet/Microsoft.iOS.Sdk/targets/Microsoft.iOS.Sdk.props @@ -3,7 +3,7 @@ <_PlatformName>iOS - $(MSBuildThisFileDirectory)..\tools\msbuild\iOS\ + $(MSBuildThisFileDirectory)..\tools\msbuild\ diff --git a/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.props b/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.props index 57f86c3eed6..dee6672eade 100644 --- a/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.props +++ b/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.props @@ -1,8 +1,8 @@ - - + + <_DotNetRootRemoteDirectory Condition="$(_DotNetRootRemoteDirectory) == ''">/usr/local/share/dotnet/ diff --git a/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.targets b/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.targets index 56d2e29bae7..1790114a195 100644 --- a/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.targets +++ b/dotnet/Microsoft.iOS.Windows.Sdk/targets/Microsoft.iOS.Windows.Sdk.targets @@ -1,17 +1,17 @@ - - + + diff --git a/dotnet/Workloads/SignList.xml b/dotnet/Workloads/SignList.xml index fae12d42c70..f90d7e6391e 100644 --- a/dotnet/Workloads/SignList.xml +++ b/dotnet/Workloads/SignList.xml @@ -3,17 +3,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index cdea9479e7f..badf92982b6 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -29,8 +29,7 @@ <_XamarinRelativeSdkRootDirectory Condition="'$(_XamarinRelativeSdkRootDirectory)' == ''">$(XamarinRelativeSdkRootDirectory) <_XamarinSdkRootDirectoryOnMac>$(_XamarinSdkRootDirectory) - <_XamarinTaskAssembly Condition="'$(_PlatformName)' != 'macOS'">$(_XamarinSdkRootDirectory)\tools\msbuild\iOS\Xamarin.iOS.Tasks.dll - <_XamarinTaskAssembly Condition="'$(_PlatformName)' == 'macOS'">$(_XamarinSdkRootDirectory)\tools\msbuild\macOS\Xamarin.Mac.Tasks.dll + <_XamarinTaskAssembly>$(_XamarinSdkRootDirectory)\tools\msbuild\Xamarin.MacDev.Tasks.dll - - + - + diff --git a/msbuild/Makefile b/msbuild/Makefile index 37ed2199d9c..c9c13719326 100644 --- a/msbuild/Makefile +++ b/msbuild/Makefile @@ -13,12 +13,10 @@ ifdef INCLUDE_MACCATALYST BUILD_IOS=1 endif -# -# To add a new MSBuild assembly, add the base name to the corresponding [IOS|MAC]_[BINDING]_TASK_ASSEMBLIES variable. # # New .targets and .props files are picked up automatically if they're in a directory with already -# existing .targets or .props files. If .targets or .props are added in a new directory, add that -# directory using a wildcard function to the corresponding [IOS|MAC]_TARGETS variable. +# existing .targets or .props files. If .targets or .props are added in a new directory, consider +# changing your mind and putting them with any existing .targets or .props files. # ## @@ -27,8 +25,6 @@ endif MSBUILD_PRODUCTS = MSBUILD_DIRECTORIES = -MSBUILD_SYMLINKS = -MSBUILD_TASK_ASSEMBLIES = ALL_SOURCES:= \ $(shell git ls-files | sed 's/ /\\ /g') \ @@ -41,379 +37,66 @@ CONFIG = Debug TARGETFRAMEWORK = netstandard2.0 WINDOWSRUNTIMEIDENTIFIER = win +LOCALIZATION_LANGUAGES=cs de es fr it ja ko pl pt-BR ru tr zh-Hans zh-Hant +TRANSLATED_ASSEMBLIES = $(foreach locale,$(LOCALIZATION_LANGUAGES),$(locale)/Xamarin.Localization.MSBuild) +LOCALIZATION_ASSEMBLIES = Xamarin.Localization.MSBuild + ## -## XI definitions +## iOS definitions ## -IOS_TARGETS = \ - $(wildcard Xamarin.Shared/Xamarin.MonoTouch.*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.iOS.*.props) \ - $(wildcard Xamarin.Shared/Xamarin.iOS.*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.Shared*.props) \ - $(wildcard Xamarin.Shared/Xamarin.Shared*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.ImplicitFacade.targets) \ - IOS_WINDOWS_TARGETS = \ $(wildcard Xamarin.iOS.Tasks.Windows/Xamarin.*.props) \ $(wildcard Xamarin.iOS.Tasks.Windows/Xamarin.*.targets) \ $(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/Xamarin.*.props) \ $(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/Xamarin.*.targets) \ -IOS_BINDING_TARGETS = $(wildcard Xamarin.ObjcBinding.Tasks/*.targets) - -LOCALIZATION_LANGUAGES=cs de es fr it ja ko pl pt-BR ru tr zh-Hans zh-Hant -TRANSLATED_ASSEMBLIES = $(foreach locale,$(LOCALIZATION_LANGUAGES),$(locale)/Xamarin.Localization.MSBuild) -LOCALIZATION_ASSEMBLIES = Xamarin.Localization.MSBuild -IOS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks $(LOCALIZATION_ASSEMBLIES) +TASK_ASSEMBLIES = Xamarin.MacDev.Tasks $(LOCALIZATION_ASSEMBLIES) IOS_WINDOWS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks.Windows IOS_WINDOWS_DEPENDENCIES = Xamarin.iOS.Windows.Client iSign.Core ws2_32 System.Diagnostics.Tracer System.Formats.Asn1 System.Buffers System.Memory System.Numerics.Vectors System.Runtime.CompilerServices.Unsafe System.Security.Cryptography.ProtectedData System.Security.Cryptography.Pkcs Microsoft.Win32.Registry System.Security.AccessControl System.Security.Principal.Windows IOS_WINDOWS_MOBILEDEVICE_TOOLS = iMobileDevice-net bz2 getopt ideviceactivation idevicebackup idevicebackup2 idevicecrashreport idevicedate idevicedebug idevicedebugserverproxy idevicediagnostics ideviceenterrecovery ideviceimagemounter ideviceinfo ideviceinstaller idevicename idevicenotificationproxy idevicepair ideviceprovision idevicerestore idevicescreenshot idevicesyslog idevice_id imobiledevice-net-lighthouse imobiledevice ios_webkit_debug_proxy iproxy irecovery irecovery libcharset libcurl LIBEAY32 libiconv libusb-1.0 libusb0 libxml2 lzma pcre pcreposix plist plistutil plist_cmp plist_test pthreadVC3 readline SSLEAY32 usbmuxd usbmuxd vcruntime140 zip zlib1 -IOS_DIRECTORIES = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/RedistList \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin \ - $(foreach language,$(LOCALIZATION_LANGUAGES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(language)) \ - -IOS_2_1_SYMLINKS = \ - $(foreach target,$(IOS_BINDING_TARGETS) ,$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/$(notdir $(target))) \ - -# these point to a file in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS -IOS_X_I_SYMLINKS = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS \ - -IOS_SYMLINKS = $(IOS_X_I_SYMLINKS) $(IOS_2_1_SYMLINKS) - -IOS_PRODUCTS = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml \ - $(foreach target,$(IOS_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \ - $(foreach target,$(IOS_BINDING_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \ - $(foreach dll,$(IOS_TASK_ASSEMBLIES) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).dll) \ - $(foreach dll,$(IOS_TASK_ASSEMBLIES) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).pdb) \ - $(foreach dll,$(TRANSLATED_ASSEMBLIES) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).resources.dll) \ - $(IOS_SYMLINKS) - -all-ios: $(IOS_PRODUCTS) -symlinks-ios: $(IOS_SYMLINKS) - -ifdef BUILD_IOS -MSBUILD_PRODUCTS += all-ios -MSBUILD_SYMLINKS += symlinks-ios -MSBUILD_TASK_ASSEMBLIES += $(IOS_TASK_ASSEMBLIES) $(IOS_WINDOWS_TASK_ASSEMBLIES) -MSBUILD_DIRECTORIES += $(IOS_DIRECTORIES) -endif - - -## -## MacCatalyst definitions -## - -MACCATALYST_TARGETS = \ - $(wildcard Xamarin.Shared/Xamarin.MacCatalyst.*.props) \ - $(wildcard Xamarin.Shared/Xamarin.MacCatalyst.*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.ImplicitFacade.targets) \ - -MACCATALYST_DIRECTORIES = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.MacCatalyst/RedistList \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.MacCatalyst/v1.0/RedistList \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst \ - -MACCATALYST_SYMLINKS = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.MacCatalyst/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.MacCatalyst/v1.0/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/MacCatalyst \ - -MACCATALYST_PRODUCTS += \ - $(MACCATALYST_SYMLINKS) \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/FrameworkList.xml \ - $(foreach target,$(MACCATALYST_TARGETS),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/$(notdir $(target))) \ - -all-maccatalyst: $(MACCATALYST_PRODUCTS) -symlinks-maccatalyst: $(MACCATALYST_SYMLINKS) - -ifdef INCLUDE_MACCATALYST -MSBUILD_PRODUCTS += all-maccatalyst -MSBUILD_DIRECTORIES += $(MACCATALYST_DIRECTORIES) -MSBUILD_SYMLINKS += symlinks-maccatalyst -endif - -## -## Xamarin.TVOS definitions -## - -TVOS_TARGETS = \ - $(wildcard Xamarin.Shared/Xamarin.TVOS.*.props) \ - $(wildcard Xamarin.Shared/Xamarin.TVOS.*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.ImplicitFacade.targets) \ - -TVOS_DIRECTORIES = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/RedistList \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS \ - -# Xamarin.TVOS symlinks the entire $(MONOTOUCH_PREFIX)/lib/msbuild/TVOS directory to -# /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS instead of -# each separate file (like XI does). - -TVOS_SYMLINKS = \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList/FrameworkList.xml \ - $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS \ - -TVOS_PRODUCTS = \ - $(TVOS_SYMLINKS) \ - $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/FrameworkList.xml \ - $(foreach target,$(TVOS_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/$(notdir $(target))) \ - -all-tvos: $(TVOS_PRODUCTS) -symlinks-tvos: $(TVOS_SYMLINKS) - -ifdef INCLUDE_TVOS -MSBUILD_PRODUCTS += all-tvos -MSBUILD_DIRECTORIES += $(TVOS_DIRECTORIES) -MSBUILD_SYMLINKS += symlinks-tvos -endif - -## -## XM definitions -## - -MAC_TARGETS = \ - $(wildcard Xamarin.Shared/Xamarin.Mac.*.props) \ - $(wildcard Xamarin.Shared/Xamarin.Mac.*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.Shared*.props) \ - $(wildcard Xamarin.Shared/Xamarin.Shared*.targets) \ - $(wildcard Xamarin.Shared/Xamarin.ImplicitFacade.targets) \ - -MAC_BINDING_TARGETS = - -MAC_TASK_ASSEMBLIES = Xamarin.Mac.Tasks $(LOCALIZATION_ASSEMBLIES) - -MAC_DIRECTORIES = \ - $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin \ - $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/RedistList \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/RedistList \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/4.5 \ - $(foreach language,$(LOCALIZATION_LANGUAGES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(language)) \ - -MAC_SYMLINKS = \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml \ - $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml \ - $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac \ - -MAC_PRODUCTS = \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/FrameworkList.xml \ - $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/RedistList/FrameworkList.xml \ - $(foreach target,$(MAC_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \ - $(foreach target,$(MAC_BINDING_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \ - $(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \ - $(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).pdb) \ - $(MAC_SYMLINKS) \ - $(foreach dll,$(TRANSLATED_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).resources.dll)\ - -all-mac: $(MAC_PRODUCTS) -symlinks-mac: $(MAC_SYMLINKS) - -ifdef INCLUDE_MAC -MSBUILD_PRODUCTS += all-mac -MSBUILD_DIRECTORIES += $(MAC_DIRECTORIES) -MSBUILD_SYMLINKS += symlinks-mac -MSBUILD_TASK_ASSEMBLIES += $(MAC_TASK_ASSEMBLIES) -endif - -## -## Common definitions -## - -## -## XI ## -## - -# Symlinks -# -# Everything in /Library/Frameworks/Mono.framework/External are links into /Library/Frameworks/Xamarin.iOS.framework/Versions/Current -# This makes it easy to switch XI, by just pointing /Library/Frameworks/Xamarin.iOS.framework/Versions/Current somewhere else - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList/FrameworkList.xml: | $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/$(notdir $@) $@ - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS: | $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin - $(Q) ln -Fhs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS $@ - -$(IOS_2_1_SYMLINKS): | $(IOS_DIRECTORIES) - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/$(notdir $@) $@ - -# The actual content goes into /Library/Frameworks/Xamarin.iOS.framework/Versions/Current - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml: Xamarin.Shared/Xamarin.iOS-FrameworkList.xml.in Makefile | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS - $(Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS@' $< > $@ +PROPS_AND_TARGETS = \ + $(wildcard Xamarin.Shared/*.props) \ + $(wildcard Xamarin.Shared/*.targets) \ + $(wildcard Xamarin.ObjcBinding.Tasks/*.targets) \ -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/RedistList/FrameworkList.xml: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml | $(IOS_DIRECTORIES) - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/$(notdir $@) $@ +MSBUILD_TASK_ASSEMBLIES += $(TASK_ASSEMBLIES) -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/%: Xamarin.ObjcBinding.Tasks/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS - $(Q) install -m 644 $< $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/%: Xamarin.MacDev.Tasks/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS - $(Q) install -m 644 $< $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/%: Xamarin.Shared/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS - $(Q) install -m 644 $< $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/%: Xamarin.iOS.Tasks/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS $(foreach language,$(LOCALIZATION_LANGUAGES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(language)) - $(Q) install -m 644 $< $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/%: Xamarin.Localization.MSBuild/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS - $(Q) install -m 644 $< $@ - -## -## MacCatalyst -## - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.MacCatalyst/v1.0/RedistList/FrameworkList.xml: | $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.MacCatalyst/v1.0/RedistList - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/MacCatalyst/$(notdir $@) $@ - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/MacCatalyst: | $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin - $(Q) ln -Fhs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/MacCatalyst $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/FrameworkList.xml: Xamarin.Shared/Xamarin.MacCatalyst-FrameworkList.xml.in Makefile | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst - $(Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.MacCatalyst@' $< > $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.MacCatalyst/RedistList/FrameworkList.xml: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/FrameworkList.xml | $(MACCATALYST_DIRECTORIES) - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/MacCatalyst/$(notdir $@) $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/%: Xamarin.Shared/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst - $(Q) install -m 644 $< $@ - -## -## Xamarin.TVOS -## - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList/FrameworkList.xml: | $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/TVOS/$(notdir $@) $@ - -$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS: $(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin - $(Q) ln -Fhs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/TVOS $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/FrameworkList.xml: Xamarin.Shared/Xamarin.TVOS-FrameworkList.xml.in Makefile | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS - $(Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS@' $< > $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/RedistList/FrameworkList.xml: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/FrameworkList.xml | $(TVOS_DIRECTORIES) - $(Q) ln -fs $(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/TVOS/$(notdir $@) $@ - -$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/%: Xamarin.Shared/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS - $(Q) install -m 644 $< $@ - -## -## XM ## -## - -# Symlinks -# -# Everything in /Library/Frameworks/Mono.framework/External are links into /Library/Frameworks/Xamarin.Mac.framework/Versions/Current -# This makes it easy to switch XM, by just pointing /Library/Frameworks/Xamarin.Mac.framework/Versions/Current somewhere else - -$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac: $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin - $(Q) ln -Fhs $(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/msbuild $@ - -$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml: | $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList - $(Q) ln -fs $(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/msbuild/$(notdir $@) $@ - -# The actual content goes into /Library/Frameworks/Xamarin.Mac.framework/Versions/Current - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/FrameworkList.xml: Xamarin.Shared/Xamarin.Mac-Mobile-FrameworkList.xml.in Makefile | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild - $(Q) sed 's@%TargetFrameworkDirectory%@$(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac@' $< > $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml: $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/FrameworkList.xml | $(MAC_DIRECTORIES) - $(Q) ln -fs $(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/msbuild/$(notdir $@) $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/RedistList/FrameworkList.xml: Xamarin.Shared/Xamarin.Mac-Full-FrameworkList.xml.in Makefile | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/RedistList - $(Q) sed 's@%TargetFrameworkDirectory%@$(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5@' $< > $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/%: Xamarin.Mac.Tasks/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild - $(Q) install -m 644 $< $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/%: Xamarin.Shared/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild - $(Q) install -m 644 $< $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/%: Xamarin.Mac.Tasks/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild $(foreach language,$(LOCALIZATION_LANGUAGES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(language)) - $(Q) install -m 644 $< $@ - -$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/%: Xamarin.Localization.MSBuild/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild - $(Q) install -m 644 $< $@ ## -## net5 targets ## +## .NET targets ## ## -# tvOS ships most of the iOS targets as well (for now, we don't need all of these, so this is optimizable) -DOTNET_SHARED_FILES = $(IOS_TARGETS) $(IOS_BINDING_TARGETS) $(foreach dll,$(IOS_TASK_ASSEMBLIES),$(dll).dll $(dll).pdb) -DOTNET_IOS_FILES = $(DOTNET_SHARED_FILES) FrameworkList.xml -DOTNET_TVOS_FILES = $(TVOS_TARGETS) FrameworkList.xml -DOTNET_MACOS_FILES = $(MAC_TARGETS) $(MAC_BINDING_TARGETS) $(foreach dll,$(MAC_TASK_ASSEMBLIES),$(dll).dll $(dll).pdb) FrameworkList.xml -DOTNET_MACCATALYST_FILES = $(MACCATALYST_TARGETS) FrameworkList.xml +DOTNET_SHARED_FILES = \ + $(PROPS_AND_TARGETS) \ + $(foreach dll,$(MSBUILD_TASK_ASSEMBLIES),$(dll).dll $(dll).pdb) -# iOS -ifdef INCLUDE_IOS -DOTNET_TARGETS += \ - $(foreach target,$(DOTNET_IOS_FILES) ,$(DOTNET_DESTDIR)/$(IOS_NUGET_SDK_NAME)/tools/msbuild/iOS/$(notdir $(target))) \ +define InstallFiles -endif - -# tvOS: contains all of the files for iOS as well (for now, we don't need all of them, so this is optimizable) -ifdef INCLUDE_TVOS DOTNET_TARGETS += \ - $(foreach target,$(DOTNET_SHARED_FILES) ,$(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/iOS/$(notdir $(target))) \ - $(foreach target,$(DOTNET_TVOS_FILES) ,$(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/tvOS/$(notdir $(target))) \ + $(foreach target,$(DOTNET_SHARED_FILES),$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/$(notdir $(target))) \ + $(foreach dll,$(TRANSLATED_ASSEMBLIES),$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/$(dll).resources.dll) \ -endif +DOTNET_DIRECTORIES_$(1) += \ + $(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild \ + $(foreach locale,$(LOCALIZATION_LANGUAGES),$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/$(locale)) \ -# macOS -ifdef INCLUDE_MAC -DOTNET_TARGETS += \ - $(foreach target,$(DOTNET_MACOS_FILES) ,$(DOTNET_DESTDIR)/$(MACOS_NUGET_SDK_NAME)/tools/msbuild/macOS/$(notdir $(target))) \ - -endif +DOTNET_DIRECTORIES += $$(DOTNET_DIRECTORIES_$(1)) -# Mac Catalyst -ifdef INCLUDE_MACCATALYST -DOTNET_TARGETS += \ - $(foreach target,$(DOTNET_SHARED_FILES) ,$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/iOS/$(notdir $(target))) \ - $(foreach target,$(DOTNET_MACCATALYST_FILES) ,$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/MacCatalyst/$(notdir $(target))) \ - -endif +$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/%: Xamarin.Shared/% | $(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild + $$(Q) install -m 644 $$< $$@ -DOTNET_DIRECTORIES += \ - $(DOTNET_DESTDIR)/$(IOS_NUGET_SDK_NAME)/tools/msbuild/iOS \ - $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS \ - $(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/iOS \ - $(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/tvOS \ - $(DOTNET_DESTDIR)/$(MACOS_NUGET_SDK_NAME)/tools/msbuild/macOS \ - $(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/iOS \ - $(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/MacCatalyst \ +$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/%: Xamarin.MacDev.Tasks/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $$(DOTNET_DIRECTORIES_$(1)) + $$(Q) install -m 644 $$< $$@ -$(DOTNET_DESTDIR)/$(MACOS_NUGET_SDK_NAME)/tools/msbuild/macOS/%: $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ +$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/%: Xamarin.Localization.MSBuild/bin/$(CONFIG)/$(TARGETFRAMEWORK)/% | $$(DOTNET_DIRECTORIES_$(1)) + $$(Q) install -m 644 $$< $$@ -$(DOTNET_DESTDIR)/$(IOS_NUGET_SDK_NAME)/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ +$(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild/%: Xamarin.ObjcBinding.Tasks/% | $(DOTNET_DESTDIR)/$($(2)_NUGET_SDK_NAME)/tools/msbuild + $$(Q) install -m 644 $$< $$@ +endef -$(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ - -$(DOTNET_DESTDIR)/$(TVOS_NUGET_SDK_NAME)/tools/msbuild/tvOS/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ - -$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ - -$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/MacCatalyst/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/MacCatalyst/% | $(DOTNET_DIRECTORIES) - $(Q) $(CP) $< $@ +$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call InstallFiles,$(platform),$(shell echo $(platform) | tr 'a-z' 'A-Z')))) MSBUILD_DIRECTORIES += $(DOTNET_DIRECTORIES) @@ -432,12 +115,12 @@ DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86 = $(foreach file,$(IOS_WINDOWS_MOBILED DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64 = $(foreach file,$(IOS_WINDOWS_MOBILEDEVICE_TOOLS),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/imobiledevice-x64/$(file).*) .copy-windows-files: .build-stamp - $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS - $(Q) $(CP) $(DOTNET_IOS_WINDOWS_FILES) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/ - $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/imobiledevice-x86 - $(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/imobiledevice-x86/ - $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/imobiledevice-x64 - $(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/imobiledevice-x64/ + $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild + $(Q) $(CP) $(DOTNET_IOS_WINDOWS_FILES) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/ + $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/imobiledevice-x86 + $(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/imobiledevice-x86/ + $(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/imobiledevice-x64 + $(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64) $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/imobiledevice-x64/ .dotnet-windows: .build-stamp .copy-windows-files @@ -462,16 +145,11 @@ all-local:: $(MSBUILD_PRODUCTS) .stamp-test-xml $(foreach dll,$(MSBUILD_TASK_ASSEMBLIES),$(dll)/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).dll $(dll)/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).pdb): .build-stamp $(foreach dll,$(TRANSLATED_ASSEMBLIES),Xamarin.Localization.MSBuild/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).resources.dll): .build-stamp -# Always remake the symlinks -.PHONY: $(MSBUILD_SYMLINKS) - # this is a directory-creating target. # we sort to remove duplicates, which can happen if MAC_DESTDIR and IOS_DESTDIR are the same (both create a '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin' target) -$(sort $(MSBUILD_DIRECTORIES)) build: +$(sort $(MSBUILD_DIRECTORIES)): $(Q) mkdir -p $@ -install-symlinks: $(MSBUILD_SYMLINKS) - install-local:: $(MSBUILD_PRODUCTS) .stamp-test-xml: $(wildcard */*.targets) $(wildcard */*.props) @@ -501,7 +179,3 @@ Versions.g.cs: Makefile $(TOP)/Make.config.inc $(Q) mv $@.tmp $@ dotnet:: $(DOTNET_TARGETS) - -# make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards -# marking those files as .SECONDARY will prevent that deletion. -.SECONDARY: $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),unbuild/$(file).dll) $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),build/$(file).dll) diff --git a/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj b/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj index b46d9a83e98..d568407094b 100644 --- a/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj +++ b/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj @@ -56,14 +56,14 @@ - + False False - - ..\..\Xamarin.iOS.Tasks\bin\$(Configuration)\netstandard2.0\Xamarin.iOS.Tasks.dll + + ..\..\Xamarin.MacDev.Tasks\bin\$(Configuration)\netstandard2.0\Xamarin.MacDev.Tasks.dll diff --git a/msbuild/Xamarin.HotRestart.PreBuilt/Makefile b/msbuild/Xamarin.HotRestart.PreBuilt/Makefile index c6f332b111f..0d9848230c5 100644 --- a/msbuild/Xamarin.HotRestart.PreBuilt/Makefile +++ b/msbuild/Xamarin.HotRestart.PreBuilt/Makefile @@ -16,10 +16,10 @@ $(TOP)/tests/dotnet/%: $(Q_GEN) if ! $(DOTNET) build Xamarin.PreBuilt.iOS/Xamarin.PreBuilt.iOS.csproj "/bl:$(abspath ./msbuild.binlog)" $(DOTNET_BUILD_VERBOSITY); then echo "Binlog: $(abspath ./msbuild.binlog)"; exit 1; fi $(Q) touch $@ -$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip: Xamarin.PreBuilt.iOS.app.zip +$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip: Xamarin.PreBuilt.iOS.app.zip $(Q) mkdir -p $(dir $@) $(Q) $(CP) $< $@ -all-local:: $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip +all-local:: $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip -install-local:: $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip +install-local:: $(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip diff --git a/msbuild/Xamarin.Mac.Tasks/Properties/AssemblyInfo.cs b/msbuild/Xamarin.Mac.Tasks/Properties/AssemblyInfo.cs deleted file mode 100644 index 552667a2136..00000000000 --- a/msbuild/Xamarin.Mac.Tasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyCompanyAttribute ("Microsoft Corp.")] -[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinMacVersion)] -[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinMacVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] -[assembly: AssemblyProductAttribute ("Xamarin.Mac.Tasks")] -[assembly: AssemblyTitleAttribute ("Xamarin.Mac.Tasks")] -[assembly: AssemblyVersionAttribute (VersionConstants.XamarinMacVersion)] diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj deleted file mode 100644 index 964685d2f06..00000000000 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - netstandard2.0 - false - true - ../../product.snk - $(NoWarn);8002 - latest - Nullable - $(NoWarn);NU1603 - $(NoWarn);MSB3277 - enable - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - diff --git a/msbuild/Xamarin.MacDev.Tasks.sln b/msbuild/Xamarin.MacDev.Tasks.sln index 6e2e63e8122..4b23455cffd 100644 --- a/msbuild/Xamarin.MacDev.Tasks.sln +++ b/msbuild/Xamarin.MacDev.Tasks.sln @@ -7,10 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.MacDev", "..\extern EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.MacDev.Tasks", "Xamarin.MacDev.Tasks\Xamarin.MacDev.Tasks.csproj", "{534D7C5A-0E1C-4C58-9E48-21B1A98919EB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Mac.Tasks", "Xamarin.Mac.Tasks\Xamarin.Mac.Tasks.csproj", "{C8D98DC1-5122-4B10-A152-17196C7BD9AC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.iOS.Tasks", "Xamarin.iOS.Tasks\Xamarin.iOS.Tasks.csproj", "{44605724-8002-48E1-895F-7CB068099B6A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Localization.MSBuild", "Xamarin.Localization.MSBuild\Xamarin.Localization.MSBuild.csproj", "{947E3C4C-8891-49D7-B665-23F785489D3F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D669990B-EE95-4282-AAC4-17CA05AE0575}" @@ -49,22 +45,6 @@ Global {534D7C5A-0E1C-4C58-9E48-21B1A98919EB}.Debug-net461|Any CPU.Build.0 = Debug|Any CPU {534D7C5A-0E1C-4C58-9E48-21B1A98919EB}.Debug-netstandard2.0|Any CPU.ActiveCfg = Debug|Any CPU {534D7C5A-0E1C-4C58-9E48-21B1A98919EB}.Debug-netstandard2.0|Any CPU.Build.0 = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Release|Any CPU.Build.0 = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug-net461|Any CPU.ActiveCfg = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug-net461|Any CPU.Build.0 = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug-netstandard2.0|Any CPU.ActiveCfg = Debug|Any CPU - {C8D98DC1-5122-4B10-A152-17196C7BD9AC}.Debug-netstandard2.0|Any CPU.Build.0 = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Release|Any CPU.Build.0 = Release|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug-net461|Any CPU.ActiveCfg = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug-net461|Any CPU.Build.0 = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug-netstandard2.0|Any CPU.ActiveCfg = Debug|Any CPU - {44605724-8002-48E1-895F-7CB068099B6A}.Debug-netstandard2.0|Any CPU.Build.0 = Debug|Any CPU {947E3C4C-8891-49D7-B665-23F785489D3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {947E3C4C-8891-49D7-B665-23F785489D3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {947E3C4C-8891-49D7-B665-23F785489D3F}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs b/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs index 095d5877726..96ec1eed3bc 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs @@ -32,20 +32,25 @@ [assembly: AssemblyTitle ("Xamarin.MacDev.Tasks")] [assembly: AssemblyDescription ("")] [assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("Xamarin Inc.")] -[assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("Xamarin Inc.")] -[assembly: AssemblyTrademark ("Xamarin Inc.")] +[assembly: AssemblyCompany ("Microsoft Corp.")] +[assembly: AssemblyProduct ("Xamarin.MacDev.Tasks")] +[assembly: AssemblyCopyright ("Microsoft Corp.")] +[assembly: AssemblyTrademark ("Microsoft Corp.")] [assembly: AssemblyCulture ("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.0.0.0")] +// We use the iOS version on all platforms (this way we only have to compile the tasks once) + +[assembly: AssemblyVersion (VersionConstants.XamarinIOSVersion)] +[assembly: AssemblyFileVersion (VersionConstants.XamarinIOSVersion)] +[assembly: AssemblyInformationalVersion (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] //[assembly: AssemblyKeyFile("")] + diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs index c64f862ea42..d49de77d7a0 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs @@ -192,7 +192,7 @@ public override bool Execute () //arInfo.Add ("AppStoreFileSize", new PNumber (65535)); var props = new PDictionary (); props.Add ("ApplicationPath", new PString (string.Format ("Applications/{0}", Path.GetFileName (AppBundleDir.ItemSpec)))); - if (!string.IsNullOrEmpty (RuntimeIdentifiers) && IsDotNet) { + if (!string.IsNullOrEmpty (RuntimeIdentifiers)) { var rids = RuntimeIdentifiers.Split (new char [] { ';' }, StringSplitOptions.RemoveEmptyEntries); var array = new PArray (); foreach (var rid in rids) { diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs index f5daed95b54..1834210211c 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs @@ -183,21 +183,10 @@ void AddXamarinVersionNumber (PDictionary plist) if (IsWatchApp) return; - string name; - string value; - // This key is our supported way of determining if an app // was built with Xamarin, so it needs to be present in all apps. - if (TargetFramework.IsDotNet) { - value = DotNetVersion; - name = "com.microsoft." + Platform.AsString ().ToLowerInvariant (); - } else if (Platform != ApplePlatform.MacOSX) { - var version = Sdks.XamIOS.ExtendedVersion; - value = string.Format ("{0} ({1}: {2})", version.Version, version.Branch, version.Hash); - name = "com.xamarin.ios"; - } else { - return; - } + var value = DotNetVersion; + var name = "com.microsoft." + Platform.AsString ().ToLowerInvariant (); var dict = new PDictionary (); dict.Add ("Version", new PString (value)); diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeRemoteGeneratorProperties.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeRemoteGeneratorProperties.cs index bbd2f68a456..a4bc99bc181 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeRemoteGeneratorProperties.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeRemoteGeneratorProperties.cs @@ -55,63 +55,33 @@ void ComputeProperties () var projectPath = Path.Combine (projectDir, "ComputeRemoteGeneratorProperties.csproj"); var outputFile = Path.Combine (projectDir, "ComputedProperties.txt"); var binlog = Path.Combine (projectDir, "ComputeRemoteGeneratorProperties.binlog"); - string executable; string csproj; if (Directory.Exists (projectDir)) Directory.Delete (projectDir, true); Directory.CreateDirectory (projectDir); - if (IsDotNet) { - csproj = $@" + csproj = $@" net{TargetFramework.Version}-{PlatformName.ToLower ()} true "; - } else { - string targetsFile; - switch (Platform) { - case ApplePlatform.iOS: - targetsFile = $"$(MSBuildExtensionsPath)/Xamarin/iOS/Xamarin.iOS.ObjCBinding.CSharp.targets"; - break; - case ApplePlatform.TVOS: - targetsFile = $"$(MSBuildExtensionsPath)/Xamarin/iOS/Xamarin.TVOS.ObjCBinding.CSharp.targets"; - break; - case ApplePlatform.WatchOS: - targetsFile = $"$(MSBuildExtensionsPath)/Xamarin/iOS/Xamarin.WatchOS.ObjCBinding.CSharp.targets"; - break; - case ApplePlatform.MacOSX: - targetsFile = "$(MSBuildExtensionsPath)/Xamarin/Mac/Xamarin.Mac.ObjCBinding.CSharp.targets"; - break; - default: - throw new InvalidOperationException (string.Format (MSBStrings.InvalidPlatform, Platform)); - } - csproj = $@" - - -"; - } + File.WriteAllText (projectPath, csproj); var arguments = new List (); var environment = default (Dictionary); - string? workingDirectory = null; + var executable = this.GetDotNetPath (); + var workingDirectory = Path.GetDirectoryName (executable); - if (IsDotNet) { - executable = this.GetDotNetPath (); - workingDirectory = Path.GetDirectoryName (executable); + arguments.Add ("build"); - arguments.Add ("build"); + var customHome = Environment.GetEnvironmentVariable ("DOTNET_CUSTOM_HOME"); - var customHome = Environment.GetEnvironmentVariable ("DOTNET_CUSTOM_HOME"); - - if (!string.IsNullOrEmpty (customHome)) { - environment = new Dictionary { { "HOME", customHome } }; - } - } else { - executable = "/Library/Frameworks/Mono.framework/Commands/msbuild"; + if (!string.IsNullOrEmpty (customHome)) { + environment = new Dictionary { { "HOME", customHome } }; } arguments.Add ("/p:OutputFilePath=" + outputFile); diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs index 12ddcdac336..6c2ee24e857 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs @@ -189,14 +189,9 @@ public bool HasEntitlements { // If no CodesignEntitlements was specified, we don't have any entitlements hasEntitlements = false; } else { - if (IsDotNet) { - // .NET: Check the file to see if there are any entitlements inside - var entitlements = PDictionary.FromFile (CodesignEntitlements.ItemSpec); - hasEntitlements = entitlements.Count > 0; - } else { - // Legacy Xamarin: to preserve backwards compat, consider the presence of a file enough to say we have entitlements. - hasEntitlements = true; - } + // Check the file to see if there are any entitlements inside + var entitlements = PDictionary.FromFile (CodesignEntitlements.ItemSpec); + hasEntitlements = entitlements.Count > 0; } } return hasEntitlements.Value; diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs index b4915d16b06..5264ede83cc 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs @@ -32,20 +32,7 @@ void VerifyTargetFrameworkMoniker () public string Product { get { - if (IsDotNet) - return "Microsoft." + PlatformName; - - switch (Platform) { - case ApplePlatform.iOS: - case ApplePlatform.TVOS: - case ApplePlatform.WatchOS: - case ApplePlatform.MacCatalyst: - return "Xamarin.iOS"; - case ApplePlatform.MacOSX: - return "Xamarin.Mac"; - default: - throw new InvalidOperationException (string.Format (MSBStrings.InvalidPlatform, Platform)); - } + return "Microsoft." + PlatformName; } } @@ -71,10 +58,6 @@ public TargetFramework TargetFramework { } } - public bool IsDotNet { - get { return TargetFramework.IsDotNet; } - } - public string PlatformName { get { switch (Platform) { diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinToolTask.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinToolTask.cs index 807f12d3597..bd85228b703 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinToolTask.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinToolTask.cs @@ -27,19 +27,7 @@ void VerifyTargetFrameworkMoniker () public string Product { get { - if (IsDotNet) - return "Microsoft." + PlatformName; - - switch (Platform) { - case ApplePlatform.iOS: - case ApplePlatform.TVOS: - case ApplePlatform.WatchOS: - return "Xamarin.iOS"; - case ApplePlatform.MacOSX: - return "Xamarin.Mac"; - default: - throw new InvalidOperationException (string.Format (MSBStrings.InvalidPlatform, Platform)); - } + return "Microsoft." + PlatformName; } } @@ -63,10 +51,6 @@ public TargetFramework TargetFramework { } } - public bool IsDotNet { - get { return TargetFramework.IsDotNet; } - } - public string PlatformName { get { switch (Platform) { diff --git a/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj b/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj index 1e4b3dba3a6..d9c8ba3c26b 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj +++ b/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj @@ -4,12 +4,15 @@ netstandard2.0 false compile + true + ../../product.snk true latest Nullable $(DefineConstants);MSBUILD_TASKS $(NoWarn);NU1603 $(NoWarn);MSB3277 + $(NoWarn);8002 enable @@ -19,17 +22,14 @@ - - - - - + + + + + - - - @@ -45,6 +45,31 @@ $(PkgMicrosoft_NET_Runtime_MonoTargets_Sdk)\tasks\net472\MonoTargetsTasks.dll + + + + + + + + + + + + + + + + + + + + + + + + + ApplePlatform.cs diff --git a/msbuild/Xamarin.Shared/Xamarin.ImplicitFacade.targets b/msbuild/Xamarin.Shared/Xamarin.ImplicitFacade.targets deleted file mode 100644 index 89eb410958e..00000000000 --- a/msbuild/Xamarin.Shared/Xamarin.ImplicitFacade.targets +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - true - true - - - $(ResolveReferencesDependsOn); - ImplicitlyExpandDesignTimeFacades - - - - $(ImplicitlyExpandDesignTimeFacadesDependsOn); - GetReferenceAssemblyPaths - - - <_NETBuildExtensionsTaskAssembly>$(MSBuildExtensionsPath)\Microsoft\Microsoft.NET.Build.Extensions\tools\net472\Microsoft.NET.Build.Extensions.Tasks.dll - - - - - - - - - <_Xamarin_CandidateNETStandardReferences Include="@(Reference);@(_ResolvedProjectReferencePaths)" /> - <_Xamarin_InboxNETStandardFolders Include="$(TargetFrameworkDirectory)" /> - - - - - <_HasReferenceToSystemRuntime Condition="'$(DependsOnSystemRuntime)' == 'true'">true - <_HasReferenceToSystemRuntime Condition="'%(_ResolvedProjectReferencePaths.TargetPlatformIdentifier)' == 'Portable'">true - <_HasReferenceToSystemRuntime Condition="'%(ReferenceDependencyPaths.Filename)' == 'System.Runtime'">true - - <_Xamarin_NETStandardInbox Condition="'$(_Xamarin_NETStandardInbox)' == '' and Exists('%(_Xamarin_InboxNETStandardFolders.Identity)\netstandard.dll')">true - - - <_Xamarin_DependsOnNETStandard Condition="'$(_Xamarin_DependsOnNETStandard)' == ''">$(_DependsOnNETStandard) - - - - - - - - - <_DesignTimeFacadeAssemblies Include="%(DesignTimeFacadeDirectories.Identity)*.dll"/> - - <_DesignTimeFacadeAssemblies_Names Include="@(_DesignTimeFacadeAssemblies->'%(FileName)')"> - %(_DesignTimeFacadeAssemblies.Identity) - - - <_ReferencePath_Names Include="@(ReferencePath->'%(FileName)')"> - %(ReferencePath.Identity) - - - <_DesignTimeFacadeAssemblies_Names Remove="@(_ReferencePath_Names)"/> - - - false - false - ImplicitlyExpandDesignTimeFacades - - <_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandDesignTimeFacades'" /> - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Mac-Full-FrameworkList.xml.in b/msbuild/Xamarin.Shared/Xamarin.Mac-Full-FrameworkList.xml.in deleted file mode 100644 index a97f4642477..00000000000 --- a/msbuild/Xamarin.Shared/Xamarin.Mac-Full-FrameworkList.xml.in +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/msbuild/Xamarin.Shared/Xamarin.Mac-Mobile-FrameworkList.xml.in b/msbuild/Xamarin.Shared/Xamarin.Mac-Mobile-FrameworkList.xml.in deleted file mode 100644 index 47ddc8075a6..00000000000 --- a/msbuild/Xamarin.Shared/Xamarin.Mac-Mobile-FrameworkList.xml.in +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/msbuild/Xamarin.Shared/Xamarin.Mac.AppExtension.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.Mac.AppExtension.CSharp.targets index ebc7aac79d7..a7191083812 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Mac.AppExtension.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Mac.AppExtension.CSharp.targets @@ -1,4 +1,4 @@ - - - - - v2.0 - Xamarin.Mac - - - - - v4.5 - true - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Mac.VisualBasic.targets b/msbuild/Xamarin.Shared/Xamarin.Mac.VisualBasic.targets index eefbf4af7a3..35c87258aee 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Mac.VisualBasic.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Mac.VisualBasic.targets @@ -27,8 +27,6 @@ Copyright (C) 2014 Xamarin. All rights reserved. true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.CSharp.targets index ff147b8fe5f..34f1f243fb7 100644 --- a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.CSharp.targets @@ -23,8 +23,6 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved. v1.0 - - xamarinios10;$(AssetTargetFallback) - + diff --git a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.ObjCBinding.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.ObjCBinding.CSharp.targets index b54015742d4..b10c0f80037 100644 --- a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.ObjCBinding.CSharp.targets @@ -28,7 +28,7 @@ Copyright (C) 2015-2016 Xamarin Inc. All rights reserved. xamarinios10;$(AssetTargetFallback) - + diff --git a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.VisualBasic.targets b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.VisualBasic.targets index 0c27ebabf29..a5ff6996f51 100644 --- a/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.VisualBasic.targets +++ b/msbuild/Xamarin.Shared/Xamarin.MacCatalyst.VisualBasic.targets @@ -23,8 +23,6 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved. v1.0 - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.MonoTouch.FSharp.targets b/msbuild/Xamarin.Shared/Xamarin.MonoTouch.FSharp.targets deleted file mode 100644 index 04e22127af4..00000000000 --- a/msbuild/Xamarin.Shared/Xamarin.MonoTouch.FSharp.targets +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets index 0859ac813c6..c1d1fc9408d 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets @@ -18,24 +18,6 @@ Copyright (C) 2020 Microsoft. All rights reserved. - - - - BuildOnlySettings; - _CreateGeneratedSourcesDir; - _CreateEmbeddedResources; - $(BuildDependsOn) - - - - - - - _CleanGeneratedSources; - $(CleanDependsOn) - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.props b/msbuild/Xamarin.Shared/Xamarin.Shared.props index de3df76b9fa..b49c25e93ff 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.props +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.props @@ -92,15 +92,7 @@ Copyright (C) 2020 Microsoft. All rights reserved. <_XamarinBclPath Condition="'$(_PlatformName)' == 'tvOS'">$(_XamarinSdkRoot)/lib/mono/Xamarin.TVOS/ <_XamarinBclPath Condition="'$(_PlatformName)' == 'watchOS'">$(_XamarinSdkRoot)/lib/mono/Xamarin.WatchOS/ - - <_XamarinPlatformAssemblyName Condition="'$(_PlatformName)' == 'MacCatalyst'">Xamarin.MacCatalyst.dll - <_XamarinPlatformAssemblyName Condition="'$(_PlatformName)' == 'iOS'">Xamarin.iOS.dll - <_XamarinPlatformAssemblyName Condition="'$(_PlatformName)' == 'tvOS'">Xamarin.TVOS.dll - <_XamarinPlatformAssemblyName Condition="'$(_PlatformName)' == 'watchOS'">Xamarin.WatchOS.dll - <_XamarinPlatformAssemblyName Condition="'$(_PlatformName)' == 'macOS'">Xamarin.Mac.dll - <_XamarinPlatformAssemblyPath>$(_XamarinBclPath)$(_XamarinPlatformAssemblyName) - - + <_XamarinPlatformAssemblyPath>$(_XamarinBclPath)$(_PlatformAssemblyName).dll @@ -134,7 +126,7 @@ Copyright (C) 2020 Microsoft. All rights reserved. Then we'll automatically set the CodesignEntitlements property to "Entitlements.plist" --> - Entitlements.plist + Entitlements.plist @@ -178,26 +170,10 @@ Copyright (C) 2020 Microsoft. All rights reserved. <_SpecifiedCodesignKey Condition="'$(_SpecifiedCodesignKey)' == ''">$(CodeSigningKey) <_SpecifiedCodesignKey Condition="'$(_SpecifiedCodesignKey)' == ''">$(CodesignKey) - - - false - false - - - $(XamMacArch) - $(MtouchArch) - - x86_64 - - x86_64 - ARMv7k - ARM64 - - false false @@ -334,7 +310,7 @@ Copyright (C) 2020 Microsoft. All rights reserved. latest - true + true diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index 78529826d09..0de60c406da 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -19,8 +19,9 @@ Copyright (C) 2018 Microsoft. All rights reserved. - <_TaskAssemblyName Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildThisFileDirectory)..\iOS\Xamarin.iOS.Tasks.dll - <_TaskAssemblyName Condition="'$(_PlatformName)' == 'macOS'">$(MSBuildThisFileDirectory)Xamarin.Mac.Tasks.dll + <_TaskAssemblyFileName>Xamarin.MacDev.Tasks.dll + <_TaskAssemblyFileNameWindows>Xamarin.iOS.Tasks.Windows.dll + <_TaskAssemblyName>$(MSBuildThisFileDirectory)\$(_TaskAssemblyFileName) @@ -93,7 +94,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. - + @@ -184,8 +185,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. The default is 'false' for legacy Xamarin projects (for compatibility) and 'auto' for .NET projects (NuGet doesn't handle symlinks properly, so this way it's not necessary to set this property to create NuGets that work) --> - auto - false + auto - - - <_NuGetShortFolderName Condition="'$(TargetFrameworkIdentifier)' == 'Xamarin.iOS'">xamarinios10 - <_NuGetShortFolderName Condition="'$(TargetFrameworkIdentifier)' == 'Xamarin.TVOS'">xamarintvos10 - <_NuGetShortFolderName Condition="'$(TargetFrameworkIdentifier)' == 'Xamarin.WatchOS'">xamarinwatch10 - <_NuGetShortFolderName Condition="'$(TargetFrameworkIdentifier)' == 'Xamarin.Mac'">xamarinmac10 - - - - - - - - - - + @@ -1264,7 +1249,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. <_ProcessedTextureAtlasesPath Condition="'$(_ProcessedTextureAtlasesPath)' == ''">$(DeviceSpecificIntermediateOutputPath)atlas\_ProcessedTextureAtlasesPath.items <_ProcessedCoreMLModelsPath Condition="'$(_ProcessedCoreMLModelsPath)' == ''">$(DeviceSpecificIntermediateOutputPath)coremlc\_ProcessedCoreMLModelsPath.items <_CompiledEntitlementsPath Condition="'$(_CompiledEntitlementsPath)' == ''">$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent - <_SaveProcessedItems Condition="'$(RuntimeIdentifiers)' != '' And '$(UsingAppleNETSdk)' == 'true'">true + <_SaveProcessedItems Condition="'$(RuntimeIdentifiers)' != ''">true @@ -1589,7 +1574,6 @@ Copyright (C) 2018 Microsoft. All rights reserved. > - <_AppBundleManifestPath>$(_AppBundlePath)$(_AppBundleManifestRelativePath)Info.plist @@ -1754,12 +1738,12 @@ Copyright (C) 2018 Microsoft. All rights reserved. $(_GenerateBindingsDependsOn); - <_GenerateBindingsDependsOn Condition="'$(UsingAppleNETSdk)' == 'true'"> + <_GenerateBindingsDependsOn> _CompileApiDefinitions; $(_GenerateBindingsDependsOn); - <_WriteGeneratorPropertiesDependsOn Condition="'$(UsingAppleNETSdk)' == 'true'"> + <_WriteGeneratorPropertiesDependsOn> $(_WriteGeneratorPropertiesDependsOn); _ComputeBindingVariables; @@ -1778,7 +1762,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. - <_ComputeCompileApiDefinitionsInputsDependsOn Condition="'$(UsingAppleNETSdk)' == 'true'"> + <_ComputeCompileApiDefinitionsInputsDependsOn> $(_ComputeCompileApiDefinitionsInputsDependsOn); _ComputeBindingVariables; @@ -1796,11 +1780,11 @@ Copyright (C) 2018 Microsoft. All rights reserved. <_CompiledApiDefinitionDocumentationFile>$(DeviceSpecificIntermediateOutputPath)compiled-api-definitions.xml <_CompiledApiDefinitionNoWarn>$(_CompiledApiDefinitionNoWarn);1591 <_CompiledApiDefinitionDefines>$(DefineConstants) - <_CompiledApiDefinitionDefines Condition="'$(UsingAppleNETSdk)' == 'true'">$(_CompiledApiDefinitionDefines);NET + <_CompiledApiDefinitionDefines>$(_CompiledApiDefinitionDefines);NET <_CompiledApiDefinitionLibPaths>$(AdditionalLibPaths);$([System.IO.Path]::GetDirectoryName('$(BaseLibDllPath)')) - <_CompiledApiDefinitionGlobalUsingsFile Condition="'$(UsingAppleNETSdk)' == 'true' And '$(NoNFloatUsing)' != 'true'">$(DeviceSpecificIntermediateOutputPath)compiled-api-definitions-usings.cs + <_CompiledApiDefinitionGlobalUsingsFile Condition="'$(NoNFloatUsing)' != 'true'">$(DeviceSpecificIntermediateOutputPath)compiled-api-definitions-usings.cs @@ -2475,14 +2459,6 @@ Copyright (C) 2018 Microsoft. All rights reserved. - - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' == 'macOS'">$(LinkMode) - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' != 'macOS'">$(MtouchLink) - <_LinkMode Condition="'$(_LinkMode)' == ''">$(_DefaultLinkMode) - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' == 'macOS'">None - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' != 'macOS'">SdkOnly - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.TVOS.AppExtension.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.TVOS.AppExtension.CSharp.targets index 30f1a7e4e29..902799c5ddf 100644 --- a/msbuild/Xamarin.Shared/Xamarin.TVOS.AppExtension.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.TVOS.AppExtension.CSharp.targets @@ -1,4 +1,4 @@ - true - True - + diff --git a/msbuild/Xamarin.Shared/Xamarin.WatchOS.AppExtension.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.WatchOS.AppExtension.CSharp.targets index b6e547010b1..843cf051eba 100644 --- a/msbuild/Xamarin.Shared/Xamarin.WatchOS.AppExtension.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.WatchOS.AppExtension.CSharp.targets @@ -1,4 +1,4 @@ - true - true - + diff --git a/msbuild/Xamarin.Shared/Xamarin.WatchOS.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.WatchOS.CSharp.targets index ca0914e960e..0e4b3f0413e 100644 --- a/msbuild/Xamarin.Shared/Xamarin.WatchOS.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.WatchOS.CSharp.targets @@ -1,4 +1,4 @@ - true - - + diff --git a/msbuild/Xamarin.Shared/Xamarin.WatchOS.ObjCBinding.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.WatchOS.ObjCBinding.CSharp.targets index 96ff4c41081..d570827bf5b 100644 --- a/msbuild/Xamarin.Shared/Xamarin.WatchOS.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.WatchOS.ObjCBinding.CSharp.targets @@ -1,4 +1,4 @@ - true - true - true - False False False - False False False $(MSBuildProjectDirectory) 2 False - False @@ -57,12 +55,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved. - - - $([System.String]::Copy('$(AssemblySearchPaths)').Replace('{GAC}','')) - $(AssemblySearchPaths.Split(';')) - - diff --git a/msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets b/msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets index d2483014ceb..7ba92143423 100644 --- a/msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets +++ b/msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets @@ -29,61 +29,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved. <_PreparedResourceRules> - - - - BuildOnlySettings; - PrepareForBuild; - _CollectBundleResources; - _OptimizePngImages; - _OptimizePropertyLists; - _OptimizeLocalizationFiles; - _PackLibraryResources; - _UnpackLibraryResources; - $(BuildDependsOn); - _GenerateBundleName; - _CleanUploaded; - _CreateAppBundle; - Codesign; - CreateIpa; - Archive; - - - - $(CleanDependsOn); - _ComputeTargetArchitectures; - _CleanUploaded; - - - - - - $(CreateAppBundleDependsOn); - _DetectSigningIdentity; - _CopyResourcesToBundle; - _CreateAssetPackManifest; - _SmeltMetal; - _TemperMetal; - _CompileCoreMLModels; - _PrepareResourceRules; - _CompileEntitlements; - _WriteAppManifest; - _GetNativeExecutableName; - _ParseBundlerArguments; - _CompileToNative; - _CompileITunesMetadata; - _CollectITunesArtwork; - _CopyITunesArtwork; - _CreateDebugSettings; - _CreateDebugConfiguration; - _CreatePkgInfo; - _CopyAppExtensionsToBundle; - _CopyWatchOS2AppsToBundle; - _PostProcessAppBundle; - _ValidateAppBundle; - - - $(_CodesignAppBundleDependsOn); diff --git a/msbuild/Xamarin.Shared/Xamarin.iOS.ObjCBinding.CSharp.targets b/msbuild/Xamarin.Shared/Xamarin.iOS.ObjCBinding.CSharp.targets index c4caac30bce..40793f58305 100644 --- a/msbuild/Xamarin.Shared/Xamarin.iOS.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.Shared/Xamarin.iOS.ObjCBinding.CSharp.targets @@ -1,4 +1,4 @@ - true - true - - - - - - - - - + + + + + + + + diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.Before.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.Before.targets index 6b0915256fd..de017620711 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.Before.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.Before.targets @@ -14,7 +14,7 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved. - + diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets index e091f69fc75..f543eaef393 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets @@ -1,11 +1,11 @@ - - - - - - + + + + + + diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.ObjCBinding.CSharp.After.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.ObjCBinding.CSharp.After.targets index 3cfba889961..d0ea8d93ef4 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.ObjCBinding.CSharp.After.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.ObjCBinding.CSharp.After.targets @@ -18,7 +18,7 @@ Copyright (C) 2013-2016 Xamarin Inc. All rights reserved. - + diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Windows.props b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Windows.props index 37ed00836aa..dd5f117865b 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Windows.props +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Windows.props @@ -13,10 +13,8 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved. --> - - $(MSBuildThisFileDirectory) - $(CoreiOSSdkDirectory)Xamarin.iOS.Tasks.dll + $(CoreiOSSdkDirectory)Xamarin.MacDev.Tasks.dll $(MSBuildThisFileDirectory) diff --git a/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs b/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs deleted file mode 100644 index f4fbada51c3..00000000000 --- a/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyCompanyAttribute ("Microsoft Corp.")] -[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinIOSVersion)] -[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] -[assembly: AssemblyProductAttribute ("Xamarin.iOS.Tasks")] -[assembly: AssemblyTitleAttribute ("Xamarin.iOS.Tasks")] -[assembly: AssemblyVersionAttribute (VersionConstants.XamarinIOSVersion)] diff --git a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj b/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj deleted file mode 100644 index ddebf2c99e6..00000000000 --- a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj +++ /dev/null @@ -1,75 +0,0 @@ - - - - netstandard2.0 - false - compile - true - ../../product.snk - $(NoWarn);8002 - latest - Nullable - $(NoWarn);NU1603 - $(NoWarn);MSB3277 - enable - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj index 33be922235b..4a8bafb836c 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj @@ -14,9 +14,9 @@