Граф коммитов

354 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a40c21cd88
[msbuild] Don't use exceptions as control flow in CollectITunesArtworkTaskBase. (#9837)
* It's slow (because exceptions are way slower than just returning a value).
* It's annoying when debugging with breakpoints on exceptions.
2020-10-13 09:14:40 +02:00
Rolf Bjarne Kvinge eb5733ab93
[msbuild] Remove some watchOS 1 code. (#9797) 2020-10-09 14:11:04 +02:00
Rolf Bjarne Kvinge 3d906e7000
[dotnet] Add support for 'dotnet build -t:run'. (#9823)
* Ship mlaunch in the iOS, tvOS and watchOS NuGets. It should probably go into
  a separate NuGet (to avoid shipping the same mlaunch executable in three different
  packages), but that can be done at a later stage.

* Add a GetMlaunchArguments task that computes the mlaunch arguments to install
  or launch an app in either the simulator or on device.

* Implement the MSBuild logic to make the Run target (provided by .NET) launch
  mlaunch (for iOS, tvOS and watchOS) or the built app (for macOS). This is done
  by setting the RunCommand and RunArguments properties (which the Run target uses)
  to the correct values.

Ideally I'd would make 'dotnet run' work too, but that runs into a different problem which
I haven't figured out yet:

    A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/'.
    Failed to run as a self-contained app.
      - The application was run as a self-contained app because '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/MySingleView.runtimeconfig.json' did not specify a framework.
      - If this should be a framework-dependent app, specify the appropriate framework in '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/MySingleView.runtimeconfig.json'.

That's for a different pull request though.

Ref: https://github.com/xamarin/net6-samples/issues/35.
2020-10-09 13:01:13 +02:00
Rolf Bjarne Kvinge caba0a66be
[msbuild] Move PathUtils.cs to tools/common so that other code can use it too. (#9801)
In particular the code to resolve symlinks and relative paths is useful.
2020-10-09 08:32:10 +02:00
Rolf Bjarne Kvinge dd97579e3a
[msbuild] Share the *CompileCoreMLModels targets between Xamarin.iOS and Xamarin.Mac. (#9792)
Xamarin.Mac didn't have support for CoreML models before, so this effectively adds
support for CoreML models to Xamarin.Mac.

Also add a test to make sure it actually works.
2020-10-07 08:42:17 +02:00
Rolf Bjarne Kvinge 8b06e4f37e
[msbuild] Include all the *.targets and *.props files from the Xamarin.Shared directory in the XI and XM tasks projects. (#9787)
This way these files end up copied to the output directory, and from there
they're included in msbuild.zip which our Windows support needs.
2020-10-06 15:56:56 +02:00
Rolf Bjarne Kvinge 4cf26937ce
[msbuild] Share the CodesignNativeLibraries target between Xamarin.iOS and Xamarin.Mac. (#9775) 2020-10-06 14:18:31 +02:00
Rolf Bjarne Kvinge 95b76d6ee8
[msbuild] Share the _*Metal tasks between Xamarin.iOS and Xamarin.Mac. (#9786)
* This fixes a bug in the Xamarin.Mac version, where the _ForgeMetal's Outputs
  value didn't match the actual output path (this was fixed in the iOS version).
* Also update the definition of the _ForgedMetal itemgroup to use a nested ItemGroup
  instead of the CreateItem task.
2020-10-06 14:17:56 +02:00
Rolf Bjarne Kvinge ac129fd082
[msbuild] Share the _CreatePkgInfo target between Xamarin.iOS and Xamarin.Mac. (#9770)
The Xamarin.Mac version of _CreatePkgInfo had a 'Ditto' call that seemed like
a copy-paste error (the target below has the exac same call to 'Ditto'), and
there's no reason to call 'Ditto' when creating the PkgInfo file, so I just
removed it.

The 'Ditto' call was added here: ca028ea150 (diff-ccded350e40e767d69171655acb86b01R586-R606)
2020-10-05 08:55:35 +02:00
Rolf Bjarne Kvinge 8876444586
[msbuild] Share the _*CompileSceneKitAssets targets between Xamarin.iOS and Xamarin.Mac. (#9735)
The Xamarin.iOS version is more updated, so that's the version now for both
Xamarin.iOS and Xamarin.Mac:

* The iOS version contains Inputs/Outputs (important for incremental builds).
* It doesn't use FileWrites (see e97d69b25c why
  this was removed for iOS)

Additionally define the _SceneKitCache variable for macOS as well, previously
it was only defined for iOS (I'm adding more variables than just
_SceneKitCache to macOS, most of the others will be used in in macOS in
upcoming pull requests, and this way turned out to be simplest).

And also add a new Xamarin.Mac test that exercises the CompileSceneKitAssets targets.
2020-10-01 08:37:52 +02:00
Rolf Bjarne Kvinge 94064cf3f8
[msbuild] Merge the CodesignNativeLibraries task into the Codesign task. (#9731)
Merge the CodesignNativeLibraries task into the Codesign task, since they're almost
identical (so this turns out to be a significant code reduction).

* Add a StampPath property to Codesign task, which, if set, specifies if and where
  a stamp file should be created for each signed file/directory. This replaces the
  IntermediateOutputPath property from the CodesignNativeLibraries task.
* Copy logic to detect if a file/directory needs to be resigned from the CodesignNativeLibraries
  task to the Codesign task, using any stamp files.
* Use the more descriptive error messages E0004/E0005 from the CodesignNativeLibraries
  task.
* The CodesignNativeLibraries task recursed into directories to find *.dylibs and
  *.metallib files to sign; replace this with MSBuild item group globbing.
2020-09-30 18:37:21 +02:00
Rolf Bjarne Kvinge 15efbe4a69
[msbuild] Share the _*CompileInterfaceDefinitions targets between Xamarin.iOS and Xamarin.Mac. (#9708)
The Xamarin.iOS version seemed more updated, so that's the version now for
both Xamarin.iOS and Xamarin.Mac.

A few differences in the Xamarin.iOS versions are:

* The _CoreCompileInterfaceDefinitions target contains Inputs/Outputs
  (important for incremental builds).
* EnableOnDemandResources is set to $(EnableOnDemandResources), not hardcoded
  to 'false' (there is no real difference right now, because
  $(EnableOnDemandResources) defaults to 'false' in Xamarin.Mac).
* It doesn't use FileWrites (see e97d69b25c why
  this was removed for iOS)
2020-09-28 09:17:50 +02:00
Manuel de la Pena dcb0c93ab0 [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Manuel de la Pena 3e4b4fd19e [Msbuild] Fix wrong merge that borke extensions. 2020-09-22 16:23:17 -04:00
Manuel de la Pena eb9b690fe0 Merge xcode12 into d16-8. 2020-09-18 17:51:52 -04:00
Rolf Bjarne Kvinge e5e9ff995c
[msbuild] Stop supporting watchOS 1 apps. (#9542)
We can delete much more code, but that can be done later, to avoid the
potential for merge conflicts when merging the xcode12 branch back into main.
2020-08-28 17:11:59 +02:00
Rolf Bjarne Kvinge 3148d28b3e
[msbuild] Unify the code to define our platform-specific conditional compilation symbols. (#9524) 2020-08-27 17:47:31 +02:00
Rolf Bjarne Kvinge 3a0580750d
[msbuild] Share the _CollectGeneratedSources target between Xamarin.iOS and Xamarin.Mac. (#9516) 2020-08-27 08:08:03 +02:00
Rolf Bjarne Kvinge 020f8e2fab
[msbuild] Re-use existing logic to compress frameworks for the ObjCBindingNativeFramework items. (#9504) 2020-08-26 19:03:18 +02:00
Rolf Bjarne Kvinge d49f9d4236
[dotnet/msbuild] Add support for compiling and embedding entitlements to .NET apps. (#9489)
First move the logic to compute the linker arguments for embedding
entitlements into the executable to shared code, so that it can be used from
platform-agnostic .NET code as well.

There is one difference: the code no longer checks if we're building for the
simulator, because the 'CompiledEntitlements' variable won't be set unless
we're in the simulator, so it's no longer needed (it's also not applicable for
Xamarin.Mac).

Also call the _CompileEntitlements target from the .NET build logic, and embed
the result into the executable.

This fixes the following 10 monotouch-tests:

    MonoTouchFixtures.Security.CertificateTest
        [FAIL] GenerateKeyPairTest :   GenerateKeyPair
            Expected: Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.CertificateTest.GenerateKeyPairTest() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/CertificateTest.cs:line 597

    MonoTouchFixtures.Security.KeyChainTest
        [FAIL] AddQueryRemove_Identity :   code
            Expected: DuplicateItem or Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.KeyChainTest.AddQueryRemove_Identity() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/KeyChainTest.cs:line 49

        [FAIL] Add_Certificate :   Add_Certificate
            Expected: Success or DuplicateItem
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.KeyChainTest.Add_Certificate() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/KeyChainTest.cs:line 38

        [FAIL] CheckId :   same guid
            Expected: 00000000-0000-0000-0000-000000000000
            But was:  9c3f0fd6-5c94-46a3-8193-a9fb45209a48
                at MonoTouchFixtures.Security.KeyChainTest.CheckId() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/KeyChainTest.cs:line 171

        [FAIL] SecItemAdd_Identity :   Expected: DuplicateItem or Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.KeyChainTest.SecItemAdd_Identity() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/KeyChainTest.cs:line 91

    MonoTouchFixtures.Security.RecordTest
        [FAIL] Accessible_17579 :   Add
            Expected: Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.RecordTest.Accessible(SecAccessible access) in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 56
                at MonoTouchFixtures.Security.RecordTest.Accessible_17579() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 93

        [FAIL] AuthenticationType_17579 :   Add
            Expected: Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.RecordTest.AuthenticationType(SecAuthenticationType type) in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 174
                at MonoTouchFixtures.Security.RecordTest.AuthenticationType_17579() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 186

        [FAIL] DeskCase_83099_InmutableDictionary :   Password could not be saved to keychain
            Expected: True
            But was:  False
                at MonoTouchFixtures.Security.RecordTest.DeskCase_83099_InmutableDictionary() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 205

        [FAIL] IdentityRecordTest :   Identity added
            Expected: True
            But was:  False
                at MonoTouchFixtures.Security.RecordTest.IdentityRecordTest() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 294

        [FAIL] Protocol_17579 :   Add
            Expected: Success
            But was:  MissingEntitlement
                at MonoTouchFixtures.Security.RecordTest.Protocol(SecProtocol protocol) in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 115
                at MonoTouchFixtures.Security.RecordTest.Protocol_17579() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/Security/RecordTest.cs:line 127
2020-08-25 19:25:32 +02:00
Rolf Bjarne Kvinge 18ca278e88
[msbuild] Share the Pack/UnpackLibraryResources targets between Xamarin.iOS and Xamarin.Mac. (#9471)
There were 2 differences that had to be reconciled:

* The Xamarin.Mac version took 'IntermediateOutputPath' as the intermediate
  output path, while the Xamarin.iOS version used
  'DeviceSpecificIntermediateOutputPath'.
  'DeviceSpecificIntermediateOutputPath' is defined to be
  'IntermediateOutputPath' for Xamarin.Mac, so make the shared version use
  'DeviceSpecificIntermediateOutputPath', since that works in both cases.

* The Xamarin.Mac version was writing the output of PackLibraryResources to
  the FileWrites item group. This was removed on purpose from the Xamarin.iOS
  version in e97d69b25c, so it seemed best to
  leave it out in the shared version as well.

Also re-use the _EmbeddedResourcePrefix variable to determine the resource prefix.
2020-08-25 10:42:33 +02:00
Rolf Bjarne Kvinge 622656acc3
[msbuild] Share the _CompressNativeFrameworkResources/_CompressFrameworks target between Xamarin.iOS and Xamarin.Mac. (#9461) 2020-08-25 10:41:50 +02:00
Rolf Bjarne Kvinge c21ae4412a
[dotnet] It's time to start signing apps. (#9469)
Also make sure that _CompileToNative never runs in .NET mode (some of the
signing targets has _CompileToNative as a dependency, but _CompileToNative
must never be run when in .NET mode).
2020-08-24 17:54:07 +02:00
Rolf Bjarne Kvinge d3ea2c3a81
[msbuild] Share the _CollectNativeFrameworkResources target between Xamarin.iOS and Xamarin.Mac. (#9450) 2020-08-24 08:21:46 +02:00
Rolf Bjarne Kvinge 49511491c9
[msbuild] Set ResolveAssemblyConflicts once. (#9441)
No need to set it in every file, when we have one file that rules them all.
2020-08-21 18:38:57 +02:00
Rolf Bjarne Kvinge 587ec0dd63
[msbuild] Share the _PrepareNativeReferences target between Xamarin.iOS and Xamarin.Mac. (#9442) 2020-08-21 18:24:39 +02:00
Rolf Bjarne Kvinge f3048eece5
[msbuild] Share three stub targets for Windows between Xamarin.iOS and Xamarin.Mac. (#9443)
These only apply to Xamarin.iOS right now, since they're Windows-specific (and
we don't support Xamarin.Mac binding projects on Windows), but if we ever do
end up supporting binding projects for Xamarin.Mac on Windows, we'll need
these targets there, so just make them shared code.
2020-08-21 18:10:32 +02:00
Rolf Bjarne Kvinge 86003f37c9
[msbuild] Share the IsMacEnabled and MtouchTargetsEnabled definitions between Xamarin.iOS and Xamarin.Mac. (#9439) 2020-08-21 15:01:30 +02:00
Rolf Bjarne Kvinge 7d9666c96e
[msbuild] Add a Xamarin.Shared.ObjCBinding.targets file for shared binding code between Xamarin.iOS and Xamarin.Mac. (#9437)
Add a Xamarin.Shared.ObjCBinding.targets file for shared binding code between
Xamarin.iOS and Xamarin.Mac and start sharing some of the binding code.
2020-08-21 14:55:00 +02:00
Rolf Bjarne Kvinge 4374c5f06e
[msbuild] Remove unnecessary logic to not re-import props files. (#9418)
Props files should only be imported in one place, and never by the projects
themselves, so re-importing props files shouldn't be a problem.
2020-08-21 10:13:40 +02:00
Rolf Bjarne Kvinge 9e6ecc8e1a
[msbuild] Share the AllowedReferenceRelatedFileExtensions property override. (#9417) 2020-08-21 10:13:26 +02:00
Rolf Bjarne Kvinge 4d56f288e6
[msbuild] Remove the _AssignBundleResourceNames target, it's not used anymore. (#9414)
It was used in Classic code, and that was removed some time ago (c4b5fa5f44).
2020-08-21 10:13:12 +02:00
Rolf Bjarne Kvinge 9a4f5cf388
[dotnet] Turn the linker off by default for simulator builds. (#9403)
This becomes a bit complicated because we have to wait to determine the default value
for the linker until we know if we're building for the simulator or not (which happens
in the _DetectSdkLocations target).
2020-08-20 14:26:43 +02:00
Rolf Bjarne Kvinge d96827cd89
[msbuild] Share the _CompileEntitlements target. (#9323)
Use two separate output variables (EntitlementsInExecutable/EntitlementsInSignature)
instead of using the same output variable for two different purposes. This makes
the code more self-explanatory.

Also move the simulator check to the C# code, that way it's easier to re-use elsewhere.

* [msbuild] Share the _CompileEntitlements task.

* [msbuild] Create the same class hierarchy for Xamarin.Mac and Xamarin.iOS for the CompileEntitlements task.

    CompileEntitlementsTaskBase
    └─── iOS/CompileEntitlementsTaskCore
    │    └─── iOS/CompileEntitlements
    └─── Mac/CompileEntitlementsTaskCore
         └─── Mac/CompileEntitlements

This also means we can remove a known failure in the list of MSBuild tasks that don't
conform to our 'no code in final task implementation' requirements.
2020-08-10 13:55:54 +02:00
Rolf Bjarne Kvinge 06fec85900
[msbuild] Move Xamarin.iOS' implementation of the PrepareResourceRules task to Xamarin.MacDev.Tasks. (#9318) 2020-08-07 14:54:38 +02:00
Rolf Bjarne Kvinge 4f8afa575d
[msbuild] Create a few '_*DependsOn' variables that specifies depend targets. (#9305)
The .NET logic will inject an additional dependencies in these variables.
2020-08-07 14:53:49 +02:00
Rolf Bjarne Kvinge 84a6b63ffe
[msbuild] Fix automatic stripping of release builds by using the correct variable. (#9202) 2020-07-28 09:12:37 +02:00
Chris Hamons b101d7e8b9
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048) (#9107)
- This commit adds a hook, "AdditionalAppExtensions", to the msbuild to allow
extensions written in other languages, such as Swift, to be embedded and signed in an
Xamarin App bundle easily.
- Example:
<AdditionalAppExtensions Include="$(MSBuildProjectDirectory)/../../native">
	<Name>NativeTodayExtension</Name>
	<BuildOutput Condition="'$(Platform)' == 'iPhone'">build/Debug-iphoneos</BuildOutput>
	<BuildOutput Condition="'$(Platform)' == 'iPhoneSimulator'">build/Debug-iphonesimulator</BuildOutput>
</AdditionalAppExtensions>
2020-07-27 09:27:19 -05:00
Rolf Bjarne Kvinge 8ecc47d088
[msbuild] Share the logic to implicitly include netstandard.dll in the build. (#9146)
In addition to the obvious benefit of reducing code duplication, this also
means that implicit inclusion of netstandard.dll works for binding projects as
well.

The existing implementations were slightly different between Xamarin.iOS and
Xamarin.Mac, so I tried to figure out the best merging strategy based on git
history and looking at the original implementation of this code in MSBuild. I
tried to keep close to the original implementation whenever I couldn't find a
good reason to do otherwise.
2020-07-22 14:57:35 +02:00
Chris Hamons 5657a63539
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048)
- This commit adds a hook, "AdditionalAppExtensions", to the msbuild to allow
extensions written in other languages, such as Swift, to be embedded and signed in an
Xamarin App bundle easily.
- Example:
<AdditionalAppExtensions Include="$(MSBuildProjectDirectory)/../../native">
	<Name>NativeTodayExtension</Name>
	<BuildOutput Condition="'$(Platform)' == 'iPhone'">build/Debug-iphoneos</BuildOutput>
	<BuildOutput Condition="'$(Platform)' == 'iPhoneSimulator'">build/Debug-iphonesimulator</BuildOutput>
</AdditionalAppExtensions>
2020-07-16 10:13:15 -05:00
Rolf Bjarne Kvinge 0bf816ab47
Add AutoFill CredentialProvider NSExtensionPoint support (#9079)
* Fix unrecognized extension build warning for credential providers

* Bump Xamarin.MacDev.

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@af50d97 Add AutoFill CredentialProvider NSExtensionPoint support (#75) (#77)

Diff: 7e9075cab0..af50d97218

* Add IDE deployment target for credential provider

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: kiddailey <kiddailey@users.noreply.github.com>
2020-07-15 09:00:16 +02:00
Rolf Bjarne Kvinge fb0615d065
Add AutoFill CredentialProvider NSExtensionPoint support (#9078)
* Fix unrecognized extension build warning for credential providers

* Bump Xamarin.MacDev.

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@8208733 Add AutoFill CredentialProvider NSExtensionPoint support (#75) (#76)

Diff: a1bc6f39b3..8208733cd6

* Add IDE deployment target for credential provider

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: kiddailey <kiddailey@users.noreply.github.com>
2020-07-15 08:59:59 +02:00
Rolf Bjarne Kvinge b46aae7fd6
[msbuild] Make the ParseExtraMtouchArgs task platform-agnostic, and share it between Xamarin.iOS and Xamarin.Mac. (#9061)
* Change the parsing code slightly, to make it easier to parse other arguments
  (coming soon).
* Add the parsing task to Xamarin.Mac projects, and use it there as well. The
  parsed result isn't used yet, but it will be soon.
* Unify a few related MSBuild properties (MtouchNoSymbolStrip and
  MtouchNoDSymUtil).
2020-07-13 14:56:34 +02:00
kiddailey 97d09a7b24
Add AutoFill CredentialProvider NSExtensionPoint support (#9030)
* Fix unrecognized extension build warning for credential providers

* Bump Xamarin.MacDev.

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@5e08f5f Add AutoFill CredentialProvider NSExtensionPoint support (#75)

Diff: a1bc6f39b3..5e08f5f2fd

* Add IDE deployment target for credential provider

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-13 14:50:23 +02:00
Rolf Bjarne Kvinge e193ed7316
[msbuild] Unify all the UsingTask statements. (#8998)
Some of these have been duplicated across various targets files, and when
adding a new task it's annoying to forget to add it somewhere.

So just have them all in the same place, so that they're loaded in every file.

There are still duplicates between the iOS and Mac tasks, but those will be
unified in a later PR.
2020-07-07 15:52:06 +02:00
Rolf Bjarne Kvinge ac36305a2d
[msbuild] Unify the _GenerateBindings target and a few properties related to binding projects. (#8997) 2020-07-07 15:46:23 +02:00
Rolf Bjarne Kvinge 4e2d612dae
[msbuild] Unify XamarinMacFrameworkRoot and MonoTouchSdkRoot into _XamarinSdkRoot. (#8995) 2020-07-07 15:45:42 +02:00
Rolf Bjarne Kvinge 8d7cd46652
[msbuild] Share a few binding variables: BaseLibDllPath, BTouchToolPath and BTouchToolExe. (#8988)
Also switch to invoking bgen instead of the btouch-native/btv/bwatch wrapper
scripts, since the wrapper scripts just call bgen with an additional
--target-framework argument, which our BTouch task already does anyway, which
means it's not necessary to call the wrapper scripts anymore.

This also required:

* Moving the code to detect which Xamarin.Mac profile we're building for into
  Xamarin.Shared.props, since the binding variable logic need to know which
  Xamarin.Mac profile we're building for.

* Setting IsBindingProject property earlier in the build process, to make sure
  it's set before importing Xamarin.Shared.props.
2020-07-03 11:01:01 +02:00
Rolf Bjarne Kvinge 4eff2c3700
[msbuild] Unify the logic to copy bundle resources to the app. (#8987)
* For Xamarin.Mac, this means using the _ComputeBundleResourceOutputPaths and
  _CopyResourcesToBundle targets from Xamarin.iOS instead of the
  _CopyContentToBundle target (which is now unused and thus removed).

* Adapt the Xamarin.iOS logic (now shared) to handle the fact that the
  resources shouldn't always go into the root appbundle directory (since they
  go into Contents/Resources/ for macOS apps), by using the
  '_AppResourcesPath' variable to specify just this.

Once upon a time the Xamarin.iOS logic was identical to the Xamarin.Mac logic,
but then we implemented support for asset packs
(a98693f07e)
and the code diverged. This means that unifying the logic again is a step
towards making asset packs work for Xamarin.Mac apps.
2020-07-03 11:00:36 +02:00
Rolf Bjarne Kvinge 4ed68336d7
[msbuild] Share the MSBuild logic for CollectBundleResources and a few related properties. (#8983)
* [msbuild] Share the MSBuild logic for CollectBundleResources and a few related properties.

* [msbuild] Fix/unify more resource collection code.

* Remove the _CollectBundleResources target for Xamarin.iOS binding projects,
  we now have a single one for all project types.
* Add an IsBindingProject property to distinguish binding projects from other
  projects.
* Use the IsBindingProject to only depend on the other _Compile<ResourceType>
  targets when we're not building a binding project (which seems to be the
  reason why the _CollectBundleResources target was duplicated between normal
  projects and binding projects for both Xamarin.iOS and Xamarin.Mac: the
  binding project version didn't have any dependencies).
2020-07-01 20:13:05 +02:00