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

1381 Коммитов

Автор SHA1 Сообщение Дата
Andoni Morales Alastruey 97ab14801f
[dotnet] Add support for .so files (#16887)
Autotools-based project using libtool's -module flag generate plugins
with the .so extension that needs to be treated like DynamicLibraries in
terms of deployment location and relocation, except they are not linked
to the app.

This PR adds support for such .so files: they're treated as .dylib files, except
that they're not linked to the app.
2023-02-03 09:16:40 +01:00
Rolf Bjarne Kvinge e0d64e8f61 [msbuild] Add props and targets files for Visual Basic.
These are just the C# versions changed just enough to use Visual Basic instead of C#.
2023-01-31 13:20:19 +01:00
Mauro Agnoletti 2a79c3dc1b
Updated Xamarin.Messaging to 1.9.5 (#17363)
This should bring the fix to correctly build iOS applications with references to class libraries

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1684986
2023-01-25 15:37:00 +01:00
Rolf Bjarne Kvinge 10accc2cd7
[dotnet/msbuild] Only compile entitlements once for universal builds. Fixes #15632. (#17096)
Fixes https://github.com/xamarin/xamarin-macios/issues/15632.
2023-01-19 16:01:34 +01:00
Rolf Bjarne Kvinge 05b92d5cf0
[msbuild] Fix typo in comment. (#17220) 2023-01-13 21:58:57 +01:00
Rolf Bjarne Kvinge 48f9d5c5ea
[msbuild] Add an SdkDevPath property to the DSymUtil task. (#17108)
Add an SdkDevPath property to the DSymUtil task, and use it to set DEVELOPER_DIR when calling dsymutil.

Should fix this:

> xcrun: error: unable to find utility "dsymutil", not a developer tool or in PATH

when `xcode-select -p` and VSMac are configured with two different Xcodes.
2023-01-12 07:09:57 +01:00
Rolf Bjarne Kvinge ed4d07a6c3
[msbuild] Merge the Mmp and MmpTaskBase classes. (#17098)
We no longer need two have overridable logic for remote builds, so the
non-abstract task class and the abstract base class can be merged.

First out is the Mmp task.
2023-01-12 07:09:42 +01:00
Rolf Bjarne Kvinge 10b1907b22
[msbuild] Fix a compile warning about file being added twice. (#17097)
Fixes:

> CSC : warning CS2002: Source file 'xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Errors.designer.cs' specified multiple times
2023-01-12 07:09:17 +01:00
Rolf Bjarne Kvinge 74d7337dcc
[dotnet] Create an MSBuild property for the current min OS version. (#17034)
Create an MSBuild property for the minimum OS version
(`SupportedOSPlatformVersion`) we support for a given platform (named
`[platform]MinSupportedOSPlatformVersion`), and use it in most tests instead
of hardcoding the min OS version (which would otherwise have to be updated
every time we bump the min OS version).
2023-01-10 21:18:39 +01:00
Mauro Agnoletti 009f62ea9f
Updated MessagingVersion to 1.9.0 (#17163) 2023-01-10 08:36:36 +01:00
Rolf Bjarne Kvinge aee3f88ae8
[msbuild/dotnet] Use a more unique property name than _AOTCompiler. (#17049)
Use a more unique property name than _AOTCompiler (use _XamarinAOTCompiler
instead) to try to prevent any problems if somebody else tries to use
'_AOTCompiler' somewhere.

Ref: https://github.com/xamarin/xamarin-macios/pull/17033#discussion_r1047823981
2022-12-16 07:22:51 +01:00
Rolf Bjarne Kvinge 9bf322525e
Bump Xamarin.MacDev. (#17056)
This requires a few nullability updates in our code as well.

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@14d5361 Enable nullability in PListObject.cs

Diff: ac2647b643..14d53612d4
2022-12-16 07:22:37 +01:00
VS MobileTools Engineering Service 2 811cc469f3
[main] Fix WatchKit stub copy error when using native watchOS app (#17048)
Modified the FindWatchOS2AppBundleTaskBase and Xamarin.iOS.Common.targets so that it only tries to copy the WatchKit stub into the IPA file if the watch app bundle includes the folder.

This should fix the error that was found in #10070 by @ivanicin 

Backport of #17004

Co-authored-by: Jack Butler <jbutler@glneurotech.com>
Co-authored-by: Jack Aardal <jaardal@glneurotech.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-15 11:08:49 +01:00
Rolf Bjarne Kvinge 294314a518
[autoformat] Add the rest of the repository. (#16974) 2022-12-07 09:13:36 +01:00
Dean Ellis 669070c6ad
[perf] Update Delete Task to use DeleteFilesAsync. (#16929) 2022-12-07 07:57:39 +01:00
VS MobileTools Engineering Service 2 a201c4b3af
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7046351 (#16955)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-12-05 09:10:55 -06:00
Rolf Bjarne Kvinge 59910e6147
[msbuild] Fix nullability issue. (#16897)
Return early after a failure, in order to fix a nullability problem where the
out variable from a method call can be null if the function returns false - in
which case we can't keep doing things, we need to return, because the
subsequent code doesn't handle the potential null value from the out
parameter.
2022-12-01 16:47:47 +01:00
Rolf Bjarne Kvinge cbfcabacf6
[msbuild] Fix parsing -gcc_flags when the value is the next argument. Fixes #16861. (#16862)
The -gcc_flags in the extra mtouch/mmp arguments can either be of the format
'-gcc_flags=<value>' or '-gcc_flags <value>'. Previously we only parsed the
former correctly, and now fix the parsing logic to handle the latter version
correctly as well.

Fixes https://github.com/xamarin/xamarin-macios/issues/16861.
2022-11-29 09:29:27 +01:00
Mauro Agnoletti fddd44b4f7
Updated Xamarin.Messaging to 1.8.49 (#16899)
We need this for 17.5 Preview 2 so feel free to backport it to the needed branches
2022-11-29 07:51:32 +01:00
Tim Miller 97ec7c12c8
Add Accent Color to ACTool task (#16844)
This PR addresses https://github.com/xamarin/xamarin-macios/issues/10275

`actool` can set an application's "Global" color set, overwriting the system defaults. XCode sets this as "AccentColor," but when we call it directly, we don't pass in anything. This means a user cannot overwrite this setting themselves unless they rewrite the ACTool task.

This PR adds support for the "AccentColor" property to set the accent color.

To use this:

- Create a new Asset Catalog or use the default.
- Add a new ColorSet.
- Set the "AccentColor" property in the project file:

    <PropertyGroup>
        <AccentColor>AccentColor</AccentColor>
    </PropertyGroup>

You should now see the colors reflected in the application.
2022-11-23 17:15:04 +01:00
VS MobileTools Engineering Service 2 96c39dcaf9
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 6990346 (#16843)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-11-22 10:35:04 -06:00
Dean Ellis 3e4aa12a54
Do not copy files to build server for a Delete. (#16752)
The `Delete` task should not need to copy any files to the remote server.
Lets try to set this up by implementing the `ShouldCopyToBuildServer` method.

This should help reduce build times if it works.
2022-11-17 17:31:11 +01:00
Dean Ellis 30405fd9b5
[msbuild] Don't process assemblies over and over again in the UnpackLibraryResources target. Fixes #16377. (#16416)
Fixes #16377 

MSbuild has the ability to run `Target` partially. However in order to make sure we can use this, both the `Inputs` and `Outputs` need to have a 1-1 mapping. MSBuild will then use this mapping to figure out which files have actually changed.
Then it will call the Target with only those files. 

In Xamarin.Android we make use of stamp files to provide this 1-1 mapping. We have a `pre` Target which will calculate an ItemGroup which will include a StampFile piece of metadata. We then use this new ItemGroup for both the `Inputs` and `Outputs`, thus meeting the 1-1 requirement. 

This PR updates the `_UnpackLibraryResources` to run partially. This will hopefully reduce the build time on incremental builds.
2022-11-17 17:30:46 +01:00
VS MobileTools Engineering Service 2 d6f9aa7c08
[main] Fix native watchOS app bundling when using newer Xcode 14 watchOS project. Fixes #16142. (#16773)
I've made some small edits to the ValidateWatchApp method to allow for a native watchOS app that was created in Xcode 14 that uses a single project instead of an extension to be bundled into a Xamarin app. 

Should fix #16142 and progress on #10070

Backport of #16690

Co-authored-by: Jack Butler <jbutler@glneurotech.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-17 08:00:27 +01:00
Rolf Bjarne Kvinge a02e840007
[msbuild] Show an error when trying to build a binding project from Windows without a Mac connection. (#16612)
Building a binding project from Windows without a Mac connection doesn't work,
because we need to execute bgen. Currently we just skip every task and target
that doesn't work from Windows, but that means nothing at all happens, which
is confusing (in particular if the binding project is referenced by other
projects, which will also fail to build).

So make it more explicit that a connection to a Mac is required to build a
binding project by showing a warning when there's no connection (and not an
error because that could break existing workflows for customers).

Ref: https://github.com/xamarin/xamarin-macios/issues/16611
2022-11-09 07:52:58 +01:00
Rolf Bjarne Kvinge 60bd7393b3 Revert "[net7.0-xcode14.1] [release/7.0.1xx-xcode14][msbuild] Partial revert of ad8cdb3 (#16428)"
The original change that caused a problem is not a problem anymore (it was
fixed in 18e2bef479), so re-introduce the
original change.

This reverts commit fb75cf80d2.
2022-11-03 21:27:27 +01:00
Rolf Bjarne Kvinge cdc62aeae9 Merge remote-tracking branch 'origin/net7.0-xcode14.1' into main-net7.0-xcode14.1 2022-11-03 08:21:55 +01:00
Rolf Bjarne Kvinge 940e1d09e9 Merge xcode14.1 into net7.0-xcode14.1. 2022-11-02 19:03:30 +01:00
Rolf Bjarne Kvinge 0304f2bca1
[msbuild] Fix watchOS submissions with Xcode 14. Fixes #16499. (#16526)
We have to remove any arm64e slices from the WK binary we copy from Apple's
SDK into the Watch app, as explained in Apple's forums.

Ref: https://developer.apple.com/forums/thread/714224
Fixes https://github.com/xamarin/xamarin-macios/issues/16120.
Fixes https://github.com/xamarin/xamarin-macios/issues/16499.
2022-11-02 18:59:04 +01:00
VS MobileTools Engineering Service 2 aa7faff2ac
[net7.0-xcode14.1] [7.0.1xx-xcode14] [msbuild] Remove generated file from source control. (#16477)
This fixes an issue where this file would show up as modified after the
build, which breaks our API comparison.


Backport of #16476

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-26 21:39:56 +02:00
VS MobileTools Engineering Service 2 8d3571b23e
[xcode14.1] Updated Xamarin.Messaging to 1.8.26 (#16472)
Brings an important fix for the Build Session Id generation


Backport of #16464

Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
2022-10-26 12:35:55 +02:00
VS MobileTools Engineering Service 2 236c8a3eb5
[net7.0-xcode14.1] Updated Xamarin.Messaging to 1.8.26 (#16473)
Brings an important fix for the Build Session Id generation


Backport of #16464

Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
2022-10-26 12:33:48 +02:00
Mauro Agnoletti 4dd0eef23f
Updated Xamarin.Messaging to 1.8.26 (#16464)
Brings an important fix for the Build Session Id generation
2022-10-26 08:08:43 +02:00
Rolf Bjarne Kvinge 18e2bef479
[msbuild] Fix creating Build.zip. (#16445)
We recently switched from building the msbuild tasks with 'msbuild' to use
'dotnet build' instead.

One difference between the two methods is that 'dotnet build' doesn't copy
referenced assemblies to the output path.

This turns out to be a problem because we zip up the output from the
Xamarin.Messaging.Build project, and expect it to contain everything required
to load the Xamarin.Messaging.Build assembly (this zip file is shipped with
our VS (Windows) support, and during remote execution copied to the connected
mac and then the build from Windows will load the assembly on the Mac in order
to do stuff on the Mac).

Another problem is that we include MSBuild assemblies from the
'$(MSBuildBinPath)' location, which is now different (we used to pick up
Mono's MSBuild assemblies, and that changed when we started building with
.NET).

In other words: because the Build.zip file stopped containing all the required
files to load Xamarin.Messaging.Build.dll, remote builds from VS stopped
working.

Ref: https://github.com/xamarin/xamarin-macios/pull/16418

Here we attempt to fix this by:

* Setting 'CopyLocalLockFileAssemblies=true'. This will copy referenced
  assemblies to the output directory.
* Explicitly referencing Mono's MSBuild assemblies instead of relying upon
  finding them in '$(MSBuildBinPath)'. At this point I believe it's fine to
  hardcode Mono's path, since it's unlikely we'll get any new Mono updates.
2022-10-25 22:29:08 +02:00
Rolf Bjarne Kvinge 83c8278d76
[xcode14.1] Updated Xamarin.Messaging to 1.8.25 (#16427)
Also adapted Build Agent and MSBuild Tasks to the new Messaging changes

This brings important changes in Xamarin.Messaging to fix an SSH incompatibility with macOS Ventura and also to fix some issues with the iOS remote build with multi targeting dotnet scenarios and also scenarios mixing dotnet and traditional Xamarin projects in the same VS session


Backport of #16419

Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
2022-10-25 08:59:59 +02:00
VS MobileTools Engineering Service 2 36394065a3
[net7.0-xcode14.1] Updated Xamarin.Messaging to 1.8.25 (#16426)
Also adapted Build Agent and MSBuild Tasks to the new Messaging changes

This brings important changes in Xamarin.Messaging to fix an SSH incompatibility with macOS Ventura and also to fix some issues with the iOS remote build with multi targeting dotnet scenarios and also scenarios mixing dotnet and traditional Xamarin projects in the same VS session


Backport of #16419

Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
2022-10-25 08:17:35 +02:00
VS MobileTools Engineering Service 2 fb75cf80d2
[net7.0-xcode14.1] [release/7.0.1xx-xcode14][msbuild] Partial revert of ad8cdb3 (#16428)
Ema pinpointed this commit to bee the root causing reflection issues on the windows side

https://gist.github.com/Redth/e60fcf1b790eb9efe3e476788bff5693#file-remotesimoutput-log-L13-L26


Backport of #16418

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-10-25 08:16:43 +02:00
Mauro Agnoletti f317b7421e
Updated Xamarin.Messaging to 1.8.25 (#16419)
Also adapted Build Agent and MSBuild Tasks to the new Messaging changes

This brings important changes in Xamarin.Messaging to fix an SSH incompatibility with macOS Ventura and also to fix some issues with the iOS remote build with multi targeting dotnet scenarios and also scenarios mixing dotnet and traditional Xamarin projects in the same VS session
2022-10-25 07:50:11 +02:00
Rolf Bjarne Kvinge 73101f2689
[msbuild] Fix dirty working copy with Errors.designer.cs. (#16404)
The Xamarin.MacDev.Tasks.sln solution is built with dotnet, while other projects
are still built with msbuild. This becomes a problem when generating Errors.designer.cs,
because depending on the runtime the output is different.

This means that the Errors.designer.cs will sometimes randomly change (depending
on which project re-generated the file), leaving the file modified in git. This is
quite annoying, but it also breaks the api comparison, which depends on the build
not leaving modified files behind. So for now, we generate Errors.designer.cs separately
for Xamarin.MacDev.Tasks.sln to not conflict with the mtouch version.

Also fix capitalization in numerous places to be consistent (it's Errors.designer.cs,
not Errors.Designer.cs).
2022-10-24 18:56:06 +02:00
Rolf Bjarne Kvinge 24f1fc18ed Merge remote-tracking branch 'origin/xcode14.1' into net7.0-xcode14.1 2022-10-20 19:30:22 +02:00
Rolf Bjarne Kvinge cb6f555665 Merge main into xcode14.1. 2022-10-17 11:35:33 +02:00
Rolf Bjarne Kvinge 5975ffd6f1 Merge main into net7.0. 2022-10-17 10:21:24 +02:00
Rolf Bjarne Kvinge ad8cdb3f91
[msbuild] Build the solution with .NET. (#16304)
Hopefully this fixes some of the recurrent build problems where we'd fail to
restore nuget packages.

Ref: https://github.com/xamarin/maccore/issues/2620

I wasn't able to execute ilrepack.exe with .NET, so that continues to be
executed with mono.
2022-10-17 07:22:24 +02:00
Rolf Bjarne Kvinge 18962171b9 Merge main into net7.0. 2022-10-13 13:36:40 +02:00
Rolf Bjarne Kvinge eec5f62054 Merge main into xcode14.1. 2022-10-13 13:36:23 +02:00
Rolf Bjarne Kvinge 7336100b9a
[msbuild] Only sign the app bundle if codesigning is enabled. Fixes #16197. (#16266)
Only sign the app bundle if codesigning is enabled.

This fixes a bug where we'd still try to sign an app bundle, even if the user
disabled code signing by setting EnableCodeSigning=false, if the default logic
was to sign the app bundle.

Fixes https://github.com/xamarin/xamarin-macios/issues/16197.
2022-10-10 15:33:20 +02:00
Rolf Bjarne Kvinge 6b0d192131 Merge main into xcode14.1. 2022-10-10 13:02:13 +02:00
Rolf Bjarne Kvinge 9d306f3862 Merge main into net7.0. 2022-10-10 13:01:32 +02:00
Mauro Agnoletti cc8c336a2e
[illink] Ensure we replace the dotnet SDK path in the _ExtraTrimmerArgs for remote builds (#16294)
From net7, the original ILLInk targets are adding a new link attribute pointing to a supressions file inside the ILLink tasks folder, e.g: '--link-attributes "C:\Program Files\dotnet\sdk\7.0.100-rc.2.22477.23\Sdks\Microsoft.NET.ILLink.Tasks\build\6.0_suppressions.xml"'.

For remote builds, we need to replace the original dotnet folder with the XMA dotnet folder in the Mac, so in our override targets we replace this value before passing it to the ILLink task
2022-10-08 22:40:21 +02:00
Mauro Agnoletti 448ffa9754
Updated Xamarin.Messaging to 1.8.6 (#16281) 2022-10-07 17:15:26 +02:00