Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet] Add support for universal apps. #11983

Merged
merged 44 commits into from
Jun 29, 2021
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
87de6ea
[runtime] Add support for finding assemblies in an RID-specific subdi…
rolfbjarne May 25, 2021
6fe54cb
[dotnet] Only trim when building a specific RuntimeIdentifier.
rolfbjarne May 21, 2021
9a9562c
[tests] Add unified simple test app for all platforms we support.
rolfbjarne Jun 15, 2021
0021c2b
[MachO] Make StaticLibrary.IsStaticLibrary work with files shorter th…
rolfbjarne May 21, 2021
7aec86f
ools] Create a PathUtils class and move some shareable code there.
rolfbjarne May 21, 2021
0af6ec5
[MachO] Add a MachO.IsMachOFile method
rolfbjarne May 21, 2021
ba83560
[tools] Move parts of the binary file comparison to a helper file to …
rolfbjarne May 21, 2021
f864ff3
[tools] Move another IsUptodate overload to the FileCopier file to in…
rolfbjarne Jun 16, 2021
5955cd1
[tests] Add a complex test library project with resources and app con…
rolfbjarne May 21, 2021
724d0fe
[dotnet] Set a default RuntimeIdentifier and validate that we get a v…
rolfbjarne Jun 14, 2021
e1f31c6
[tests] Quote parameters containing semicolons when passed to 'dotnet…
rolfbjarne May 21, 2021
003cf30
[dotnet] Don't execute ComputeResolvedFileToPublishList if we're in t…
rolfbjarne May 21, 2021
5c50a2f
[msbuild] Implement a MergeAppBundles task to merge two (or more) app…
rolfbjarne May 21, 2021
4f8e9a8
[tests] Add new tests for merging app bundles
rolfbjarne May 21, 2021
91311a0
[dotnet] Implement support for multiple RuntimeIdentifiers.
rolfbjarne May 21, 2021
81b139e
[dotnet] Ignore RuntimeIdentifier if RuntimeIdentifiers is set.
rolfbjarne Jun 16, 2021
62865cb
Merge remote-tracking branch 'origin/main' into HEAD
rolfbjarne Jun 21, 2021
a32d605
[msbuild] Fix symlink check to check for file presence first.
rolfbjarne Jun 18, 2021
4526a5e
[msbuild] Copy directories correctly.
rolfbjarne Jun 18, 2021
bc9e007
[tests] Updated list of not-yet-localized error messages.
rolfbjarne Jun 18, 2021
718d954
[tests] Improve error reporting when SetUp fails in MergeAppBundleTas…
rolfbjarne Jun 21, 2021
f1cc00c
[tests] Update tests according to the actual error messages.
rolfbjarne Jun 21, 2021
7179cac
[dotnet] Set the default RuntimeIdentifier earlier.
rolfbjarne Jun 21, 2021
2f1667e
[tests] Remove MSBuildSDKsPath from the environment before invoking m…
rolfbjarne Jun 22, 2021
70d0f86
Merge remote-tracking branch 'origin/main' into HEAD
rolfbjarne Jun 23, 2021
889cf99
[dotnet] Compile entitlements before signing the merged app bundle.
rolfbjarne Jun 22, 2021
5ecb7ae
[msbuild] List all files causing errors.
rolfbjarne Jun 23, 2021
2a203b5
[msbuild] Compute input files slightly differently for CreateMergedAp…
rolfbjarne Jun 23, 2021
f6e9f55
[runtime] Add a xamarin_locate_app_resource function.
rolfbjarne Jun 23, 2021
608dfb3
[dotnet] Make the globalization data file an architecture-specific file.
rolfbjarne Jun 23, 2021
a78be0a
[dotnet] Ignore Info.plist files from the input app bundles when merg…
rolfbjarne Jun 23, 2021
e68831b
[dotnet] Compile the app manifest in the outer build for multi-rid apps.
rolfbjarne Jun 23, 2021
7f505c3
[dotnet] Rework how we compute the TargetArchitectures property.
rolfbjarne Jun 23, 2021
9f82694
[msbuild] Use the same prefix in ErrorHelper as we do in other MSBuil…
rolfbjarne Jun 24, 2021
df369da
[MachO] Simplify code a bit according to review.
rolfbjarne Jun 24, 2021
c5dad31
[dotnet] Don't create debug settings / configurations for inner builds.
rolfbjarne Jun 24, 2021
1fa1cf3
[dotnet] Use the correct relative paths for Info.plist for all platfo…
rolfbjarne Jun 24, 2021
82fc13e
[tests] Fix assertions regarding errors after recent changes.
rolfbjarne Jun 24, 2021
9a406d2
[tests] Fix makefile for ComplexAssembly to do nothing on a rebuild.
rolfbjarne Jun 24, 2021
2f65937
[tests] Remove BOM in new file.
rolfbjarne Jun 24, 2021
3497373
[dotnet] Compute 'ComputedPlatform' correctly for outer multi-rid bui…
rolfbjarne Jun 24, 2021
31b48eb
[tests] Copy more supporting files for building monotouch-test with .…
rolfbjarne Jun 24, 2021
6d6db24
[dotnet] Use relative paths in a few places.
rolfbjarne Jun 24, 2021
8aff15a
[tests] Don't run parallel make in tests/common/TestProjects/ComplexA…
rolfbjarne Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions tools/common/MachO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,27 @@ public static bool IsDynamicFramework (string filename)

return true;
}

public static bool IsMachOFile (string filename)
{
using (var fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read)) {
if (fs.Length < 4)
return false;
using (var reader = new BinaryReader (fs)) {
var magic = reader.ReadUInt32 ();
reader.BaseStream.Position = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why reset the position ?
as the reader is not used before being disposed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was copied from somewhere else - I'll remove this line.

switch (magic) {
case MH_MAGIC:
case MH_MAGIC_64:
case FAT_MAGIC: // little-endian fat binary
case FAT_CIGAM: // big-endian fat binary
return true;
default:
return false;
}
}
}
}
}

public class StaticLibrary
Expand Down