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
pinentry_mac: use xcbuild #24838
pinentry_mac: use xcbuild #24838
Conversation
cctools provides install_name_tool
- init package - add into xcbuild/toolchain.nix
This is an attempt to get rid of the issues with sdk not found in xcbuild when building pinentry_mac.
@matthewbauer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @lovek323, @globin, @pSub and @FRidh to be potential reviewers. |
These libraries could be used by other packages so list them in all-packages.nix as well.
This reverts commit 87e6b2c.
Whoa, you figured out where to get a pure |
@copumpkin Microsoft has tool inside of WinObjC called xib2nib. I've moved it to a separate repo and got it running on *nix systems. Then I made a bash wrapper that fakes ibtool options and passes them to xib2nib. That means there are some parts of ibtool that it doesn't actually implement. In addition xib2nib has spotty support for some nib files especially older ones (like in pinentry_mac). So after some modifications pinentry_mac is able to work with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Anyway, I'm fine with merging this but if you want to do more work to it first, that's also fine.
Ok even though it builds correctly, something weird is going on with the .nib file. I'm marking it [wip] for right now. |
sadly, xib2nib hasn't been working like i though. I've just precompiled into our modified pinentry_mac. Eventually we can get this fixed but it's not as easy as first thought.
also: - NSPlist - PlistCpp
Looks good to me if no one has anything to fix. Some notes on xib2nib:
|
How does it work for pinentry if it only supports cocoatouch?
… On Apr 12, 2017, at 21:13, Matthew Justin Bauer ***@***.***> wrote:
Looks good to me if no one has anything to fix.
Some notes on xib2nib:
it only supports "CocoaTouch" layouts and storyboards not "Cocoa"
we can get it working eventually, but there isn't much documentation on it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@copumpkin So, I'm cheating now and just compiling them in Xcode and checking them into the pienntry_mac tree. I want to keep xib2nib in here though because eventually it should be useful. |
Oh, I see. That works for now I guess 😄 so the xib2nib tool isn't actually used here? |
Also, is converting xib files to nib files the only thing builds generally need to do? I've done a lot of reverse engineering and we could probably revive https://github.com/davidquesada/ibtool without much effort. |
I'd say that converting xib to nib is the main thing. Storyboards may also be includes and they're basically just a wrapper around a bunch of .xib's. That part involves linking and compiling but that shouldn't be a big deal. You're going to have the same problem with ibtool.py though where it just works with CocoaTouch. I've been looking at the format of .nib's and it's not very well documented. They look like they're just binary plists encoded as nskeyedarchive. |
What's the main difference between CocoaTouch and Cocoa for this? Is it just that there's a bigger RE community around iOS? |
Probably because iOS is more locked down and stuff so you can't use some other layout tools like in gtk or qt. Also Cocoa has a lot more features that need to be included to work while CocoaTouch has relatively less. Even for CocoaTouch I don't think it works with 100% of layouts. |
I just took a peek at the "source" for Anyway, this seems fine and promising. I'll look into |
Aha, |
Aha, |
Merging this since my random banter has no bearing on any of this stuff. |
@matthewbauer have you looked at gorm at all, from GNUstep? It looks like it understands nibs and xibs, but it might not understand the cocoa stuff |
I don't think gorm supports the .xib format. Apple just added it in Xcode 5 to support version control that didn't like changes to binary files. You're right that it's probably not too complicated and somebody with some RE skills like yourself or others could probably get it working but looking at xib2nib source, it's definitely not going to be too easy. We actually have gorm in nixpkgs but it looks like it's broken right now on darwin at least. I don't know if you've got any connections at Apple but maybe if we beg we can get them to open source ibtool? It definitely doesn't have a lot of applications for the average user but it certainly would make this whole thing easier. I suspect, however, that it would be impossible to open source ibtool without open sourcing the whole Cocoa framework and interface builder which is understandably closed source. Also: do you know what's going on with Hydra? pinentry_mac isn't building for some reason but I can't get any logs on it. They're all in some non-text format. Maybe gzip? https://lists.gnu.org/archive/html/gnustep-dev/2013-08/msg00078.html |
Motivation for this change
This switches pinentry_mac over to xcbuild.
Sadly, pinentry_mac does not work out of the box. I've had to make a few changes for it to compile:
This PR adds a couple of new packages too:
Each of these packages needs some changes to get working from MSVSC to NixPkgs, so I'm going to try to work to get those changes include so we have legitimate versioning.
I'll try to clean this PR up in the coming, but right now it works as is.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)