Add basic Xamarin.Mac support #278

Closed
chamons wants to merge 11 commits from xamarin_mac_support into master
chamons commented 2016-12-08 07:49:41 -08:00 (Migrated from github.com)
  • Does not contain "magic" found in YogaKit yet, but enough to get started
  • Simple test project showing use
  • YGInteropSetLogger and YGNodeInit(IntPtr) were missing from native lib built by buck
- Does not contain "magic" found in YogaKit yet, but enough to get started - Simple test project showing use - YGInteropSetLogger and YGNodeInit(IntPtr) were missing from native lib built by buck
facebook-github-bot commented 2016-12-08 07:49:46 -08:00 (Migrated from github.com)

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! **If you are contributing on behalf of someone else (eg your employer)**: the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.
chamons commented 2016-12-08 07:54:03 -08:00 (Migrated from github.com)

CLA should be signed now.

CLA should be signed now.
facebook-github-bot commented 2016-12-08 07:58:16 -08:00 (Migrated from github.com)

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
facebook-github-bot commented 2016-12-08 09:01:52 -08:00 (Migrated from github.com)

@chamons updated the pull request - view changes

@chamons updated the pull request - [view changes](https://github.com/facebook/yoga/pull/278/files/05ab9be814270cb33511b59f83d131230bcef5fb..1370cd7ff27bd737bfdc36045a24e53509f41bb1)
emilsjolander commented 2016-12-15 03:02:30 -08:00 (Migrated from github.com)

@splhack Can you have a look?

@splhack Can you have a look?
splhack (Migrated from github.com) requested changes 2016-12-15 14:39:15 -08:00
splhack (Migrated from github.com) left a comment
- How about making the sample to be the same as https://github.com/facebook/yoga/blob/master/YogaKit/YogaKitSample/YogaKitSample/ViewController.m ? - Can we delete all icon images?
splhack (Migrated from github.com) commented 2016-12-15 14:30:10 -08:00

You can now build libmono.dylib via buck build //csharp:yoganet#default,shared. Can you revert MONOMAC changes in csharp/Facebook.Yoga/Native.cs, csharp/Facebook.Yoga/YogaLogger.cs, csharp/Facebook.Yoga/YogaNode.cs?

You can now build libmono.dylib via `buck build //csharp:yoganet#default,shared`. Can you revert `MONOMAC` changes in csharp/Facebook.Yoga/Native.cs, csharp/Facebook.Yoga/YogaLogger.cs, csharp/Facebook.Yoga/YogaNode.cs?
splhack (Migrated from github.com) commented 2016-12-15 14:30:31 -08:00

libyoga.dylib

libyoga.dylib
splhack (Migrated from github.com) commented 2016-12-15 14:32:27 -08:00

Apparently we need empty ApiDefinition.cs but don't bind static lib. Can you update the comments?

Apparently we need empty ApiDefinition.cs but don't bind static lib. Can you update the comments?
splhack (Migrated from github.com) commented 2016-12-15 14:33:06 -08:00
    <Target Name="CopyInNativeLib" Inputs="..\..\..\buck-out\gen\csharp\yoganet#default,shared\libyoga.dylib" Outputs="$(ProjectDir)libyoga.dylib">
        <Copy SourceFiles="..\..\..\buck-out\gen\csharp\yoganet#default,shared\libyoga.dylib" DestinationFiles="$(ProjectDir)/libyoga.dylib" />
<Target Name="CopyInNativeLib" Inputs="..\..\..\buck-out\gen\csharp\yoganet#default,shared\libyoga.dylib" Outputs="$(ProjectDir)libyoga.dylib"> <Copy SourceFiles="..\..\..\buck-out\gen\csharp\yoganet#default,shared\libyoga.dylib" DestinationFiles="$(ProjectDir)/libyoga.dylib" />
splhack (Migrated from github.com) commented 2016-12-15 14:36:18 -08:00

libyoga.dylib

libyoga.dylib
splhack (Migrated from github.com) commented 2016-12-15 14:36:29 -08:00

Dynamic

Dynamic
facebook-github-bot commented 2016-12-16 08:34:29 -08:00 (Migrated from github.com)

@chamons updated the pull request - view changes

@chamons updated the pull request - [view changes](https://github.com/facebook/yoga/pull/278/files/1370cd7ff27bd737bfdc36045a24e53509f41bb1..01f5640ce0a052a838e1da49bc8037fa988434ea)
facebook-github-bot commented 2016-12-16 08:35:02 -08:00 (Migrated from github.com)

@chamons updated the pull request - view changes

@chamons updated the pull request - [view changes](https://github.com/facebook/yoga/pull/278/files/01f5640ce0a052a838e1da49bc8037fa988434ea..8db8390b5c51def2a4e2faffeb87e22f3124c44c)
facebook-github-bot commented 2016-12-16 08:38:49 -08:00 (Migrated from github.com)

@chamons updated the pull request - view changes

@chamons updated the pull request - [view changes](https://github.com/facebook/yoga/pull/278/files/8db8390b5c51def2a4e2faffeb87e22f3124c44c..59e950f41b72bd8216df3c888438c3d059dca64b)
chamons commented 2016-12-16 08:39:45 -08:00 (Migrated from github.com)

All of the icon images are deleted (default project added them) and I swapped over to the dylib. I also handled all of the code review comments except the request to rewrite the sample.

I'll have to spend more time to do that, later.

All of the icon images are deleted (default project added them) and I swapped over to the dylib. I also handled all of the code review comments except the request to rewrite the sample. I'll have to spend more time to do that, later.
splhack commented 2016-12-16 08:57:48 -08:00 (Migrated from github.com)

Also can you take a look at my directory hierarchy proposal? https://github.com/facebook/yoga/pull/283#issuecomment-267533985

Also can you take a look at my directory hierarchy proposal? https://github.com/facebook/yoga/pull/283#issuecomment-267533985
facebook-github-bot commented 2016-12-16 12:12:23 -08:00 (Migrated from github.com)

@chamons updated the pull request - view changes

@chamons updated the pull request - [view changes](https://github.com/facebook/yoga/pull/278/files/59e950f41b72bd8216df3c888438c3d059dca64b..9dbb032d5bc3301dd1f94bbb5ca702933ef9f627)
chamons commented 2016-12-16 12:13:10 -08:00 (Migrated from github.com)

Sample converted. There is one special case hack in the ApplyYogaLayout helper function, but the entire thing is a bit of a hack.

UIView+Yoga.m really needs to get ported over to AppKit.

Sample converted. There is one special case hack in the ApplyYogaLayout helper function, but the entire thing is a bit of a hack. UIView+Yoga.m really needs to get ported over to AppKit.
chamons commented 2016-12-19 09:10:11 -08:00 (Migrated from github.com)

@splhack Anything else for this?

@splhack Anything else for this?
emilsjolander commented 2016-12-21 01:05:11 -08:00 (Migrated from github.com)

@chamons It is holiday season so this might take a while to get fully reviews and merged 👍

@chamons It is holiday season so this might take a while to get fully reviews and merged 👍
chamons commented 2016-12-21 07:23:49 -08:00 (Migrated from github.com)

@emilsjolander Beyond no problem. Just wanted to make sure my end had a nice bow before I disappeared for 🎄

@emilsjolander Beyond no problem. Just wanted to make sure my end had a nice bow before I disappeared for 🎄
splhack commented 2016-12-21 09:20:24 -08:00 (Migrated from github.com)

@chamons Sorry for the late reply. Do you mind to move Xamarin.Mac related files to csharp/Xamarin.Mac directory like #280 csharp/Xamarin.iOS directory structure?

@chamons Sorry for the late reply. Do you mind to move Xamarin.Mac related files to `csharp/Xamarin.Mac` directory like #280 `csharp/Xamarin.iOS` directory structure?
splhack commented 2016-12-21 11:10:13 -08:00 (Migrated from github.com)

@chamons I'm thinking to merge #283 first. Do you mind to take a look at #283? I think Xamarin.Mac can use csharp/Facebook.Yoga/Facebook.Yoga.Shared.shproj as well.

@chamons I'm thinking to merge #283 first. Do you mind to take a look at #283? I think Xamarin.Mac can use `csharp/Facebook.Yoga/Facebook.Yoga.Shared.shproj` as well.
chamons commented 2016-12-21 11:20:51 -08:00 (Migrated from github.com)

@splhack I 👍 that PR earlier.

I'm fine w\ that going in and then reworking on top. I think since it's moving stuff around it should go first anyway.

@splhack I 👍 that PR earlier. I'm fine w\ that going in and then reworking on top. I think since it's moving stuff around it should go first anyway.
emilsjolander commented 2016-12-22 01:35:05 -08:00 (Migrated from github.com)

Want to make sure you are aware of changes being made to the iOS wrapper currently as it might effect this PR https://github.com/facebook/yoga/pull/289

Want to make sure you are aware of changes being made to the iOS wrapper currently as it might effect this PR https://github.com/facebook/yoga/pull/289
emilsjolander commented 2017-01-05 08:13:01 -08:00 (Migrated from github.com)
https://github.com/facebook/yoga/pull/283 has been merged now
chamons commented 2017-01-06 11:33:43 -08:00 (Migrated from github.com)

@splhack @emilsjolander Ok, I've:

  • Merged master
  • Moved everything to csharp/Mac
  • Now consume the shared project instead of defining the file list myself

On the todo list (outside this PR) is porting YogaKit to Mac/Xamarin.Mac.

Anything else needed for this?

@splhack @emilsjolander Ok, I've: - Merged master - Moved everything to csharp/Mac - Now consume the shared project instead of defining the file list myself On the todo list (outside this PR) is porting YogaKit to Mac/Xamarin.Mac. Anything else needed for this?
splhack commented 2017-01-06 12:12:32 -08:00 (Migrated from github.com)

@chamons Thank you for working on this! looks good to me, just a little thing in coding style, we already have 4 spaces indent in all C# files. Do you mind to replace tab?

@chamons Thank you for working on this! looks good to me, just a little thing in coding style, we already have 4 spaces indent in all C# files. Do you mind to replace tab?
chamons commented 2017-01-06 12:13:58 -08:00 (Migrated from github.com)

@splhack Nope. I'll need to remember to teach XS / vim that next time I hack on things.

Let me reformat that...

@splhack Nope. I'll need to remember to teach XS / vim that next time I hack on things. Let me reformat that...
chamons commented 2017-01-06 12:32:05 -08:00 (Migrated from github.com)

Used: expand -t 4 foo | sponge foo

I think I got them all. I did not both formatting the machine generated files (csproj, sln, info.plist, designer.cs).

Used: expand -t 4 foo | sponge foo I think I got them all. I did not both formatting the machine generated files (csproj, sln, info.plist, designer.cs).
facebook-github-bot commented 2017-01-06 13:11:45 -08:00 (Migrated from github.com)

@splhack has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@splhack has imported this pull request. If you are a Facebook employee, you can view this diff [on Phabricator](https://phabricator.intern.facebook.com/D4388480).
splhack (Migrated from github.com) approved these changes 2017-01-06 16:06:06 -08:00

Pull request closed

Sign in to join this conversation.
No description provided.