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

1710 Коммитов

Автор SHA1 Сообщение Дата
Vincent Dondain 901b94d6e1 Merge pull request #1237 from VincentDondain/msbuild-mt-errors
[msbuild] Add msbuild error code logic
2016-12-08 12:50:58 -05:00
Vincent Dondain 9fe8dca4a8 [msbuild] Remove TLSProvider option (#1238)
* AppleTLS is the default since C7 and support up to TLS 1.2.

* MonoTLS is limited to SSLv3 and TLSv1: both are being deprecated.

* Note: C9 release notes already mention MonoTLS is deprecated and that it will be removed in the future.
2016-12-08 11:56:44 -05:00
Rolf Bjarne Kvinge d99212a712 Pass StringComparison to string.StartsWith / EndsWith. (#1316) 2016-12-08 16:54:10 +01:00
Rolf Bjarne Kvinge 30bac18e10 [mtouch] Fix BundleId. (#1315)
The BundleId property is used by the code that generates the mSYM directory,
but its value was always the default value 'com.yourcompany.sample' instead of
looked up in the app's Info.plist.

So fix the BundleId property to do the expected.

Also fix the mSYM test (SymbolicationData) to actually test mSYM stuff (it was
partially disabled when we disabled automatic mSYM generation for C8, and
never re-enabled), and port it to the new and better test syntax, and add a
few more asserts to check the manifest.xml generation.
2016-12-08 16:05:47 +01:00
Rolf Bjarne Kvinge 7cc039cd13 [xharness] Add support for running btouch tests. (#1314) 2016-12-08 15:47:36 +01:00
Rolf Bjarne Kvinge 8de0d43799 [mtouch] -lsqlite3 is a linker flag, not a file to be linked with, so treat it accordingly. Fixes #49220. (#1313)
-lsqlite3 is a linker flag, not a file to be linked with, so when
automatically determining that we need to pass -lsqlite3 we need to put it in
the right list of linker information.

Otherwise we may end up passing `-force_load -lsqlite3` to the linker (if the
assembly's ForceLoad flag is set), which won't compile.

https://bugzilla.xamarin.com/show_bug.cgi?id=49220
2016-12-08 15:42:30 +01:00
Rolf Bjarne Kvinge 7dedd1bb4f [tests] Give tests that build for device a bit more time. (#1312)
dontlink/64-bit release times out on our Sierra bots, so try to bump the
timeout to see if this is working on other bots because those other bots are
faster.
2016-12-08 14:11:51 +01:00
Chris Hamons 364fe874cd [XM] Fix Argument Semantics on NSTextContainer.TextView (#1309)
- https://bugzilla.xamarin.com/show_bug.cgi?id=43236
- In Xcode 8b3, Apple changed this property to depend on the deployment target
  for weak/strong'ness

  +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
   @property (nullable, strong) NSTextView *textView;
   +#else
   +@property (nullable, weak) NSTextView *textView;
   +#endif
    @end
- We could parse the MacO headers to get this and change
 strong/weak'ness but:
- It is easier to default to weak, the "safe" option. It introduces a possible
 leak but you can null it out in that rare case.
- If Apple does this more regularly, we may have to readdress
2016-12-08 12:28:30 +01:00
Vincent Dondain 3d0e140f3c [xi-errors] Add headers for error code ranges 2016-12-07 16:33:34 -05:00
Chris Hamons 2f8136a3d4 [XM] Add NSLayoutConstraint.identifier (#1311)
- https://bugzilla.xamarin.com/show_bug.cgi?id=41356
- Was added as a catagory and we missed it. Looked for other
  missing identifier selectors
2016-12-07 10:19:20 -06:00
Chris Hamons 6a57f45f39 Add a number of missing [Flags] in various enums (#1310)
- https://bugzilla.xamarin.com/show_bug.cgi?id=39789
- I looked for every enum with bit shifting in AppKit/Foundation, then
  checked the documentation hints. Was conservative in places.
2016-12-07 09:35:22 -06:00
Timothy Risi 0b540402bf [Mac] Fix introspection (#1189) 2016-12-06 09:55:47 -09:00
Chris Hamons 73bb8aa876 [XM] Fix XM bindings to include Notifications and update test (#1307)
- Teach test to check SkipNotification since a number of corrections require XAMCORE_4_0
2016-12-06 12:29:50 -06:00
Jeffrey Stedfast 1e41bc3750 [msbuild] Added a PropertyListEditor task which works like PlistBuddy (#1306)
* [msbuild] Added a PropertyListEditor task which works like PlistBuddy

This is a convenience Task for customers and isn't currently used
by the core MSBuild targets.

* [msbuild] The PropertyListEditor task does not need a SessionId property

* [msbuild] Added support for non-container root plist elements

* [msbuild] Catch & log exceptions loading plist document
2016-12-06 13:29:31 -05:00
Emanuel 7dac4dfe58 Copy watchOS app dll to output directory (#1271)
If the watchOS dll app is not copied to the output directory, the watchOS app project will be outdated for VS and it'll be built all the time. That will also cause the iOS app project to be built.
2016-12-05 17:21:48 -05:00
Chris Hamons 1c7429e864 [XM] Add disable switch to partial static registrar in mmp (#1303)
- Rework with state now RegistrarMode.PartialStatic
- Don't default RegistrarMode.PartialStatic if system mono (fixes mmp regression test on wrench)
2016-12-05 14:16:03 -06:00
Rolf Bjarne Kvinge 6b5f50802c AddressBook isn't in Xamarin.Mac. (#1304) 2016-12-05 19:40:47 +01:00
Rolf Bjarne Kvinge 7a5f5d0499 [generator] Replace ifdef with normal code condition. (#1305) 2016-12-05 19:39:14 +01:00
Chris Hamons c25ccd4237 [XM] Fall back to side by side loading of libxammac.dylib (#1264)
- https://bugzilla.xamarin.com/show_bug.cgi?id=43932
2016-12-05 12:21:43 -06:00
Rolf Bjarne Kvinge 39d903ab66 [tests] Fix framework-test to actually work. (#1297)
* [tests] Fix framework-test to actually work.

* [xharness] Properly replace 'ios' with corresponding platform for paths to our test frameworks as well.

* [framework-test] Fix watchOS build.
2016-12-05 18:35:53 +01:00
Rolf Bjarne Kvinge 8dc6b88bbf [mtouch] Only check for iOS min deployment target when building for iOS. (#1302) 2016-12-05 18:34:41 +01:00
Rolf Bjarne Kvinge 056d1ea8b4 [msbuild] Extensions can contain frameworks too. (#1301) 2016-12-05 18:21:46 +01:00
Rolf Bjarne Kvinge 33e778bd66 Bump maccore to get new mlaunch. (#1296)
* Bump maccore to get new mlaunch.

A new mlaunch that:

* Should have fewer random failures when launching watchOS apps.
* Supports launching extensions on device.
* Supports uninstalling apps from devices.
2016-12-03 01:53:36 +01:00
Rolf Bjarne Kvinge a4dde7de39 [jenkins] Automatically detect mono bumps and enable device build. (#1298)
* [jenkins] Automatically detect mono bumps and enable device build.

And do this before fetching labels, so that we can skip fetching labels if we
know we're already enabling the device build.

* [tests] Bumping LLVM merits enabling device build and running mtouch + BCL tests.
2016-12-03 01:52:24 +01:00
Sebastien Pouliot 08e8233f39 [test][harness] Fix exception when running tests more than once (#1299)
e.g. running twice

> make run-ios-sim32-introspection

results in

Unhandled Exception:
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: /Users/poupou/git/master/xamarin-macios/tests/logs/exec-ios-sim32-introspection/iPhone 5.log already exists
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x001bd] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:109
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:69
  at xharness.CaptureLog.StopCapture () [0x00019] in /Users/poupou/git/master/xamarin-macios/tests/xharness/Log.cs:252
2016-12-03 01:51:00 +01:00
Sebastien Pouliot 16c2200804 [tests][intro] Add checks for [Field] that should have [Notification] attributes (#1289)
Also:

* some refactoring to reduce the reflection usage for each field-based
  introspection tests;

* some fixes for existing bindings, mostly missing [Notification]

* removal of `unsafe` in the notification binding generation (not needed)

* Ignore the new test on XM until the API have been fixed
2016-12-02 12:05:05 -05:00
Rolf Bjarne Kvinge 33b677b763 [mtouch] Exec the binary in the script. (#1295)
This way the mtouch process is killed if the parent process kills the process
it spawned.
2016-12-02 17:41:38 +01:00
Rolf Bjarne Kvinge 37874bdfef [generator] Simplify a few XAMCORE_2_0 ifdefs. (#1294) 2016-12-02 16:14:35 +01:00
Rolf Bjarne Kvinge cbe3652621 Add comments for reviewed usage of pinned GCHandles. (#1290) 2016-12-02 14:13:59 +01:00
Rolf Bjarne Kvinge 4a90e07b69 [monotouch-test] Add test to ensure config files are properly bundled in apps. (#1291) 2016-12-02 14:13:25 +01:00
Rolf Bjarne Kvinge e90c4df471 [generator] Use CurrentPlatform instead of platform-specific ifdefs. (#1293) 2016-12-02 14:13:12 +01:00
Rolf Bjarne Kvinge efa4a3e656 [generator] Remove #ifdef for ApplicationClassName. (#1292) 2016-12-02 14:12:25 +01:00
Rolf Bjarne Kvinge d543dd4d90 [CoreVideo] Fix memory leak in CVPixelBuffer.Create for planar bytes. (#1283)
When creating a CVPixelBuffer with planar bytes, we create one GCHandle for
every byte[] of planar data, as well as one GCHandle for a custom object that
has an array of all the other GCHandles.

All these GCHandles were freed properly if the CFPixelBuffer was successfully
created, but in the case of failure, only the GCHandle for the custom object
was freed.

So make sure to free all the GCHandles even in the case of failures by calling
the free callback function.
2016-12-02 09:40:52 +01:00
Rolf Bjarne Kvinge 0d78dbcd6b Replace pinned GCHandles with unsafe code. (#1286) 2016-12-02 09:37:04 +01:00
Sebastien Pouliot 168245c44e [generator] Don't output ArgumentSemantic when they are not required (#1278)
This reduce the metadata size and this information, even if part of the
header files, is not required (as some types are just not refcounted)

E.g.
	public bool MicrophoneEnabled {
		[Export ("isMicrophoneEnabled", ArgumentSemantic.UnsafeUnretained)]

should be

	public bool MicrophoneEnabled {
		[Export ("isMicrophoneEnabled")]

This could have been done in different places but not generating them has
the smallest impact versus:

1. Check bindings input and report them as errors
	- con: break existing binding code;
	- con: sharpie outputs them;

2. Removed by the linker
	- con: linking not always enabled, e.g. 3rd party bindings
	- con: extra logic == extra time for each build

Generator diff
https://gist.github.com/spouliot/cc36e68bf7bd6097064ed6ba0bb3275a
2016-12-01 17:25:30 -05:00
Jeffrey Stedfast 7d662f44e6 [msbuild] Don't rewrite MonoTouchDebugConfiguration.txt unless it has… (#1288)
* [msbuild] Don't rewrite MonoTouchDebugConfiguration.txt unless it has changed

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

* [msbuild] Reduce allocations in CreateDebugConfigurationTaskBase.cs
2016-12-01 17:15:14 -05:00
Sebastien Pouliot caea761537 [avfoundation] Fix incorrect selector for AVPlayerItemVideoOutput .ctor. Fixes #48382 (#1276)
Commit ba37aa44 workaround around a signature clash incorrectly and
turned the selector to static ones (and incorrectly set the handle)

Also fix a typo in the [Advice] attribute of the old API

https://bugzilla.xamarin.com/show_bug.cgi?id=48382
2016-12-01 17:01:42 -05:00
Rolf Bjarne Kvinge 794ffded97 [generator] Remove a few redundant ifdefs. (#1287) 2016-12-01 20:10:09 +01:00
Rolf Bjarne Kvinge 544d35f6cf [CoreMedia] Make CMCustomBlockAllocator's GCHandle non-pinned. (#1284)
GCHandle.AddrOfPinnedObject is never called for this GCHandle,
so there's no reason for it to be pinned.
2016-12-01 19:39:06 +01:00
Rolf Bjarne Kvinge 8122070d14 [Security] Refactor P/Invokes to not use GCHandles. (#1285)
There is no need to create GCHandles to pass byte arrays to a P/Invoke.
2016-12-01 19:38:56 +01:00
Rolf Bjarne Kvinge 28549f276d [generator] Refactor GetSDKRoot to remove an #ifdef. (#1280) 2016-12-01 18:49:41 +01:00
Chris Hamons c67bd9096c [XM] Add partial static registrar support (#1191) 2016-12-01 10:18:30 -06:00
Jose Gallardo eb79a11317 Merge pull request #1268 from emaf/master
Changes GetVirtualProjectPath to make relative paths when building from VS
2016-12-01 16:45:57 +02:00
Rolf Bjarne Kvinge 2e3185d687 [mtouch tests] Rename Profile.Unified to Profile.iOS. (#1281)
Rename Profile.Unified to Profile.iOS to better match the other values in the enum (tvOS/watchOS).
2016-12-01 12:32:48 +01:00
Rolf Bjarne Kvinge f58ec73658 [tests] Fix a couple of compiler warnings. (#1282)
Fixes:

	TimingTests.cs(17,4): warning CS0618: `NUnit.Framework.TestFixtureSetUpAttribute' is obsolete: `Use OneTimeSetUpAttribute'
	TimingTests.cs(120,4): warning CS0618: `NUnit.Framework.TestFixtureTearDownAttribute' is obsolete: `Use OneTimeTearDownAttribute'
2016-12-01 12:28:42 +01:00
Rolf Bjarne Kvinge 8c048c6d9d [generator] Remove the OnlyDesktop variable and simplify code to remove #ifdef. (#1273) 2016-12-01 10:49:08 +01:00
Sebastien Pouliot 1b1e345d72 [build] Remove our usage of deprecated/ignored -new-style option in btouch/bmac (#1277)
and get rid of build warnings starting with PR #1257

https://github.com/xamarin/xamarin-macios/pull/1257
2016-12-01 10:36:26 +01:00
Rolf Bjarne Kvinge cea7f4b928 [generator] Remove dead code. (#1275) 2016-11-30 17:52:38 -05:00
Rolf Bjarne Kvinge e94899f9d4 [generator] Remove ifdef to determine default value for selector inlining. (#1274) 2016-11-30 20:27:15 +01:00
Jeffrey Stedfast b2a86cc534 [msbuild] Don't rm -rf the .dSYM dir in the _CompileToNative target (#1261)
That logic wrongly assumed that mtouch will always output a new
native executable file and that the dSYMs will need to be regenerated,
but that is not the case.

Move the rm -rf logic into the _GenerateDebugSymbols target instead,
so that we only delete the dSYMs if we've already committed to
regenerating them.

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

For a walk-through of the problem, see
https://bugzilla.xamarin.com/show_bug.cgi?id=47803#c9
2016-11-30 10:59:31 -05:00