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

[src] Remove legacy build logic. #21353

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 1 addition & 11 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
build
MonoTouch.NUnitLite.csproj
MonoTouch.NUnitLite.tvos.csproj
MonoTouch.NUnitLite.unified.csproj
MonoTouch.NUnitLite.watchos.csproj
MonoTouch.NUnitLite.maccatalyst.csproj
xamios.csproj
xammac.csproj
xamtvos.csproj
xamwatch.csproj
xammaccatalyst.csproj
generator.csproj.inc
bgen.csproj.inc
*~
*.rsp
MinimumVersions.cs
Expand Down
4 changes: 0 additions & 4 deletions src/AddressBook/ABPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,11 +1021,7 @@ public void SetRelatedNames (ABMultiValue<string>? value)

public NSData? GetImage (ABPersonImageFormat format)
{
#if ARCH_32
return Runtime.GetNSObject<NSData> (ABPersonCopyImageDataWithFormat (Handle, (nint)(int)format));
#else
return Runtime.GetNSObject<NSData> (ABPersonCopyImageDataWithFormat (Handle, (nint) (long) format));
#endif
}

[DllImport (Constants.AddressBookLibrary)]
Expand Down
14 changes: 1 addition & 13 deletions src/AssemblyInfo.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,15 @@ using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.CompilerServices;

#if NET
[assembly: AssemblyInformationalVersion ("@NUGET_VERSION_NO_METADATA@; git-rev-head:@PACKAGE_HEAD_REV@; git-branch:@PACKAGE_HEAD_BRANCH@")]
[assembly: AssemblyTitle ("Microsoft.@DOTNET_PLATFORM@")]
[assembly: AssemblyProduct ("Microsoft.@DOTNET_PLATFORM@")]
#else
[assembly: AssemblyInformationalVersion ("@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@.@PACKAGE_VERSION_REV@.@PACKAGE_VERSION_BUILD@; git-rev-head:@PACKAGE_HEAD_REV@; git-branch:@PACKAGE_HEAD_BRANCH@")]
[assembly: AssemblyTitle ("@PRODUCT_NAME@")]
[assembly: AssemblyProduct ("@PRODUCT_NAME@")]
#endif
// FIXME: Probably need to add Copyright 2009-2011 Novell Inc.
// [assembly: AssemblyCopyright ("Copyright 2011-2014 Xamarin Inc.")]
[assembly: AssemblyCompany ("Microsoft Corp.")]

[assembly: AssemblyMetadata ("IsTrimmable", "True")]

#if !NET
[assembly: InternalsVisibleTo ("System.Net.Http,PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
#endif

#if NET
// Use a two-part version, because there shouldn't be any API changes when the third or fourth digit changes (according to Semver 2.0 rules).
// In other words: the following scenario is safe:
// - Assembly A builds against Microsoft.*.dll v1.0.1
Expand All @@ -38,8 +27,7 @@ using System.Runtime.CompilerServices;
// To avoid scenarios where everybody would have to update to the latest patch version of Microsoft.*.dll
// in order to compile stuff, we erase the third and fourth number and only use 0 for both.
[assembly: AssemblyVersion ("@NUGET_VERSION_MAJOR@.@[email protected]")]
#endif

#if NET && !XCODE_IS_STABLE && !COREBUILD
#if !XCODE_IS_STABLE && !COREBUILD
[assembly: Experimental("XCODE_@XCODE_VERSION@_PREVIEW", UrlFormat = "https://github.com/xamarin/xamarin-macios/blob/main/docs/preview-apis.md")]
#endif
20 changes: 0 additions & 20 deletions src/Constants.watch.cs.in

This file was deleted.

10 changes: 0 additions & 10 deletions src/Foundation/NSIndexPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ public unsafe static NSIndexPath Create (params int [] indexes)
if (indexes is null)
throw new ArgumentNullException ("indexes");

#if ARCH_32
fixed (int* ptr = indexes)
#else
fixed (nint* ptr = Array.ConvertAll<int, nint> (indexes, (v) => v))
#endif

return _FromIndex ((IntPtr) ptr, indexes.Length);
}

Expand All @@ -54,12 +49,7 @@ public unsafe static NSIndexPath Create (params uint [] indexes)
if (indexes is null)
throw new ArgumentNullException ("indexes");

#if ARCH_32
fixed (uint* ptr = indexes)
#else
fixed (nuint* ptr = Array.ConvertAll<uint, nuint> (indexes, (v) => v))
#endif

return _FromIndex ((IntPtr) ptr, indexes.Length);
}

Expand Down
18 changes: 3 additions & 15 deletions src/Foundation/NSNumber2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,19 @@ public static explicit operator bool (NSNumber source)
}

public NSNumber (nfloat value) :
#if ARCH_64
this ((double)value)
#else
this ((float) value)
#endif
this ((double) value)
{
}

public nfloat NFloatValue {
get {
#if ARCH_64
return (nfloat)DoubleValue;
#else
return (nfloat) FloatValue;
#endif
return (nfloat) DoubleValue;
}
}

public static NSNumber FromNFloat (nfloat value)
{
#if ARCH_64
return (FromDouble ((double)value));
#else
return (FromFloat ((float) value));
#endif
return (FromDouble ((double) value));
}

public override string ToString ()
Expand Down
8 changes: 0 additions & 8 deletions src/ImageIO/CGImageAnimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ public static class CGImageAnimation {
[BindingImpl (BindingImplOptions.Optimizable)]
public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOptions options, CGImageSourceAnimationHandler handler)
{
#if IOS && ARCH_32
throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
#else
if (url is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url));
if (handler is null)
Expand All @@ -85,7 +82,6 @@ public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOp
#endif
return CGAnimateImageAtURLWithBlock (url.Handle, options.GetHandle (), &block);
}
#endif
}

#if NET
Expand All @@ -101,9 +97,6 @@ public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOp
[BindingImpl (BindingImplOptions.Optimizable)]
public static CGImageAnimationStatus AnimateImage (NSData data, CGImageAnimationOptions options, CGImageSourceAnimationHandler handler)
{
#if IOS && ARCH_32
throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
#else
if (data is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (data));
if (handler is null)
Expand All @@ -119,7 +112,6 @@ public static CGImageAnimationStatus AnimateImage (NSData data, CGImageAnimation
#endif
return CGAnimateImageDataWithBlock (data.Handle, options.GetHandle (), &block);
}
#endif
}

//
Expand Down
Loading