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

2759 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 09b4be9763 [mtouch] Look for dynamic libraries in the container app. Fixes #55698. (#2052)
https://bugzilla.xamarin.com/show_bug.cgi?id=55698
2017-04-28 16:10:20 +02:00
Filip Navara f92647aa1d Decorate NSWindow and NSSegmentedControl methods with NullAllowed attribute. (#2050)
Some methods of NSWindow such as Miniaturize and Deminiaturize are
called by the AppKit with empty sender, which is explicitly allowed by
the documentation
(https://developer.apple.com/reference/appkit/nswindow). Overriding
these methods and calling the base class shouldn't result in
ArgumentNullException.

SetImage and SetMenu methods of NSSegmentedControl should allow
removing an image or menu from a segment by specifying a null value.
2017-04-27 16:38:59 -05:00
Rolf Bjarne Kvinge e9ce55aac2 [msbuild] Define __MACOS__ for Xamarin.Mac. Fixes #36258. (#2048)
https://bugzilla.xamarin.com/show_bug.cgi?id=36258
2017-04-27 14:40:00 -04:00
Rolf Bjarne Kvinge 80811d9efb [mtouch] Disable the workaround for bug #55553 when compiling for bitcode. (#2046)
The linker doesn't allow it when building for bitcode:

> 	ld: -ignore_optimization_hints and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
>	clang: error: linker command failed with exit code 1 (use -v to see invocation)

This fixes the Xamarin.MTouch.StripBitcodeFromFrameworks(tvOS,Marker) mtouch test.
2017-04-27 14:30:19 +02:00
Rolf Bjarne Kvinge af0bc93ee3 [tests] Clean up after tests on wrench to minimize the peak diskspace requirements. (#2047) 2017-04-27 14:30:04 +02:00
Rolf Bjarne Kvinge f445856652 Merge pull request #2039 from rolfbjarne/e4k-static-registrar
Add support for the embeddinator in the static registrar.
2017-04-27 06:54:34 +02:00
Filip Navara 21f05bdd3a Fix casting in NSApplication.NextEvent on 64-bit systems (#2042)
NSApplication.NextEvent treats the NSEventMask.Any as special value and
delivers Apple events (NSAppleEventManager) only when it matches the
exact value. It is thus important not to truncate it on 64-bit builds.
2017-04-26 16:11:33 -05:00
Chris Hamons d0963e2097 [macos] Fix test failure in CertificateTest (#2036)
- SecCertificateCopyEmailAddresses behaves differently on macOS than iOS with
 macOS getting the "documented" behavior of returning an empty array and iOS
 returning null.
- Fix the test to just accept null or 0 elements
2017-04-26 13:22:19 -05:00
Rolf Bjarne Kvinge fb89076593 [tests] Fix mmptest after static registrar change causing warnings to be reported for header instead of implementation file. 2017-04-26 18:39:07 +02:00
Rolf Bjarne Kvinge d2574bfc01 [static registrar] Define DEBUG in both header and source.
This way we don't have to make sure to include generated header before any
other header that requires DEBUG to be set (like xamarin.h).
2017-04-26 16:48:09 +02:00
Sebastien Pouliot 63a67b5287 Merge pull request #2040 from rolfbjarne/bug55555
[mtouch] Don't remove information when collecting all architectures. Fixes #55555.
2017-04-25 21:29:53 -04:00
Rolf Bjarne Kvinge 5c4d6a137a [mtouch] Work around bug #55553 by passing a magic flag to the native linker. 2017-04-25 18:55:06 +02:00
Rolf Bjarne Kvinge d8d9a96254 [mtouch] Add support for stripping bitcode from frameworks when not needed. Fixes #55256. (#2037)
This dramatically decreases the size of watchOS apps built for debug when
using frameworks, because it ends up removing all the bitcode from
Mono.framework.

https://bugzilla.xamarin.com/show_bug.cgi?id=55256
2017-04-25 17:46:41 +02:00
Rolf Bjarne Kvinge 294668fa54 [mtouch] Fix compiling assemblies to frameworks on watchOS. (#2038)
* [runtime] Fix Xamarin-debug.framework's install name.

This makes building to frameworks work in debug mode.

* [mtouch] Fix check to add frameworks to watchKit extensions.

* [mtouch] Never pass -read_only_relocs to the native linker when bitcode is enabled.

* [mtouch] Bitcode requires linking with c++.

This particular case applies to shared libraries/frameworks (we already link
with c++ when building statically).
2017-04-25 17:39:58 +02:00
Rolf Bjarne Kvinge 9cd3ab1206 [mtouch/mmp] Move --embeddinator to shared code so mmp gets it as well. 2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge 34edff8bef [static registrar] Initialize the embeddinator in every function entry. 2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge ea12420fbd [static registrar] Put the generated @interface declaration for public types in the header. 2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge ab4765f89c [static registrar] Add support for putting private properties in the implementation section.
This makes registrar.h compilable as Objective-C (as opposed to
Objective-C++), because the __monoObjectGCHandle field (whose type is an C++
type) isn't there anymore.
2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge 413b65a5fa [static registrar] Refactor code a little bit to avoid excessive indentation. 2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge f6cbea8545 [mtouch] Don't remove information when collecting all architectures. Fixes #55555.
Of particular importance is if we're building for LLVM or not: this fixes a
bug where we wouldn't pass --llvm to the AOT compiler when compiling
assemblies to frameworks (which we do when sharing code).

https://bugzilla.xamarin.com/show_bug.cgi?id=55555
2017-04-25 14:32:08 +02:00
Jeffrey Stedfast 46692cdd13 [msbuild] Don't override the OnDemandResourcesUrl if previously set (#1970)
This change allows users to specify a custom URL for hosting their
OnDemand Resources.
2017-04-24 16:31:36 -04:00
Ankit Jain ca7181c6b8 [msbuild] Fix samples build with msbuild (#2035)
CompileSceneKitAssetsTaskBase tries to set `DefiningProjectFullPath`
metadata on a new TaskItem, if it is available on the original one.
But with msbuild, this is a reserved metadata and cannot be set.

If we create the new item based on the original one, then we get the
metadata too. And we also get a `OriginalItemSpec`, which we don't need
and can remove.

This fixes a regression caused by msbuild/XS switching to use the
msbuild implementations of `Microsoft.Build.{Tasks,Utilities}.{v4.0,v12.0}`
assemblies (-> `.Core`) instead of the xbuild ones.

It manifested as:

`error MSB4018: System.ArgumentException: "DefiningProjectFullPath" is a reserved item metadata, and cannot be modified or deleted.`

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55480
      https://bugzilla.xamarin.com/show_bug.cgi?id=55389
2017-04-24 16:17:17 -04:00
Marek Safar dce730ddb7 Update src mcs to csc (easy targets only) 2017-04-24 18:54:59 +02:00
Rolf Bjarne Kvinge 4941bdb960 Merge pull request #2030 from rolfbjarne/src-fix-gen-dependencies
[src] Reference the attribute dll from the build/ directory instead of the installed version.
2017-04-20 14:55:32 +02:00
Rolf Bjarne Kvinge b4da701994 [src] Reference the attribute dll from the build/ directory instead of the installed version.
This fixes a random build failure (due to parallel make):

```
error CS0006: Metadata file `/Users/marek/git/my/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/bgen/Xamarin.Mac-mobile.BindingAttributes.dll' could not be found
Compilation failed: 1 error(s), 0 warnings
bgen: API binding contains errors.
make[1]: *** [build/mac/mobile/generated-sources] Error 1
```
2017-04-20 13:03:56 +02:00
Rolf Bjarne Kvinge 6b89100044 Merge pull request #2019 from rolfbjarne/embeddinator-4000
Add embeddinator support.
2017-04-20 10:09:02 +02:00
Rolf Bjarne Kvinge 6988977096 [runtime] Improve comment. 2017-04-20 10:05:47 +02:00
Vincent Dondain 9c5f7f8f71 [msbuild] Fix DetectSdkLocationsTaskBase platform check (#2029)
For windows, ideSdkPath was defined twice.
Also the base tasks are being built only on the Mac, VSW get those from the bundle.zip, so the Windows check should be done at runtime.
2017-04-19 16:41:34 -04:00
Rolf Bjarne Kvinge 532fd7d2ee [mtouch] Fix launch mode. 2017-04-19 19:12:17 +02:00
Rolf Bjarne Kvinge 053955b47f [mtouch] Add roots to list of roots.
When collecting a list of roots, it helps adding any roots we find to the list
of roots.

This fixes the MT0023 mtouch tests, since now we actually report MT0023
because we have a list of the root assemblies.
2017-04-19 19:10:48 +02:00
Rolf Bjarne Kvinge 144ff1a6ba [mtouch] A few adjustments after allowing multiple root assemblies.
* Remove the MT0008 test, since the error will never be shown again.
* Check non-existent root assemblies and report MT0018 instead of MT0007 if
  they look like command-line arguments.
* Collect all MT0018/MT0007 errors before reporting any of them.
2017-04-19 19:08:59 +02:00
Rolf Bjarne Kvinge bb288e8c60 [tests] Bump mono to get fix for bug #54578 and add test case. (#2026)
https://bugzilla.xamarin.com/show_bug.cgi?id=54578
2017-04-19 09:54:47 -04:00
Jeffrey Stedfast d32cae66b7 [msbuild] Fixed msbuild logic to properly codesign watchos2 intents extensions (#2024)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55316
2017-04-19 08:19:29 -04:00
Rolf Bjarne Kvinge c6ec561c37 [linker] Don't mark public types from product assemblies when in embeddinator mode.
We automatically add the product assembly as a root assembly when in
embeddinator mode (because other root assemblies may not reference it), but we
don't want to mark all public types from product assemblies.
2017-04-19 11:39:06 +02:00
Sebastien Pouliot abc7b0a95d Bump mono to get workaround for bug #54658 (#2023)
[iOS]BCL test failed with Assertion failures error: * Assertion at /Users/builder/data/lanes/4691/6bea7a5b/source/xamarin-macios/external/mono/mono/mini/aot-runtime.c:2924, condition `!async' not met and condition `unwind_options == MONO_UNWIND_NONE' not

https://bugzilla.xamarin.com/show_bug.cgi?id=54658
2017-04-18 17:05:16 -04:00
Vincent Dondain 47129dae70 [msbuild] Improve DetectSdkLocationsTaskBase error log (#2012)
First: only run `EnsureSdkPath` if `EnsureAppleSdkRoot` passed.
    Both are based on similar install checks, `SdkIsInstalled` (used for `SdkIsInstalled`) is empty
    if `IsInstalled` (used by `EnsureAppleSdkRoot`) is false.
    This avoid having 2 error messages when only 1 at a time is needed.

Second: improved `EnsureAppleSdkRoot` error message mentioning the wrong Xcode developer path (which triggered the error)
    as well as the exact way to fix it.
2017-04-18 16:51:43 -04:00
Rolf Bjarne Kvinge d83067c2a3 [mtouch] Fix whitespace issue. 2017-04-18 17:28:25 +02:00
Rolf Bjarne Kvinge 6528978fc4 [build] Make csc as quiet as mcs was. (#2018) 2017-04-18 16:00:04 +02:00
Rolf Bjarne Kvinge 1acf7358da [mmp] Build and install pdb files. Fixes #53927. (#2016)
https://bugzilla.xamarin.com/show_bug.cgi?id=53927
2017-04-18 15:50:34 +02:00
Rolf Bjarne Kvinge 6568ec70ed [mtouch] Install pdb files, not mdb files (which we're not creating anymore) (#2017) 2017-04-18 09:45:05 -04:00
Rolf Bjarne Kvinge 488cccb8d4 [mtouch] Put simulator assemblies into MonoBundle/simulator for frameworks.
Put simulator assemblies in MonoBundle/simulator for frameworks, so that we
can have a single framework that contains both device and simulator
assemblies without assemblies conflicting between device and simulator.

The device assemblies continue in the same place, in the MonoBundle directory,
so no additional checks are needed on device.
2017-04-18 15:18:46 +02:00
Jeffrey Stedfast f6ebca8ca9 [msbuild] Avoid Dictionary clashes in IBToolTask's mapping dictionary (#1981)
* [msbuild] Avoid Dictionary clashes in IBToolTask's mapping dictionary

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=54914

* Added unit tests

* Fixed tabs vs spaces indent
2017-04-18 09:01:29 -04:00
Rolf Bjarne Kvinge 198c183e60 Bump mono to get fix for bug #54976. (#2014)
https://bugzilla.xamarin.com/show_bug.cgi?id=54976
2017-04-18 08:05:00 -04:00
Rolf Bjarne Kvinge ba072d3168 [mtouch] Mark all public types in the root assemblies when in embeddinator mode.
Otherwise the linker might remove root assemblies, if they're libraries and
nothing at all is marked in them.
2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge 7134c46652 [mtouch] The main executable is a shared library when building for simulator in embeddinator mode. 2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge ef31d1fcd3 [mtouch] Generate assembly to framework mapping for the simulator when in embeddinator mode. 2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge fceb49c4cd [mtouch] We need to create a fat simulator framework in embeddinator mode. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 5f1778298d [mtouch] Refactor lipo logic to a separate method. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 2b1e7af83d [mtouch] When in embeddinator mode, we still need to build the main executable for the simulator. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 80536f9bd7 [mtouch] Simlauncher won't work for the embeddinator. 2017-04-18 11:36:29 +02:00