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
Make an Xcode project around the existing build system. #5276
Conversation
Great work! I've worked on other projects where separate buildsystems were maintained, and it proved to be tough to keep up with. The obvious drawback is that it requires that someone must constantly keep it in sync. Do you have anything in mind to handle that automatically? There's also the issue of the msvc guys popping up with some "me too"s :) |
Thanks =) An Xcode plugin could "automagically" put things together based on some set of rules. Apple doesn't release the APIs so building plugins requires decompiling and guessing at them. I have experience doing it but it's slow work. This is setup to use make for the actual building so it should keep working when / if the Xcode project falls out of date. If the project goes stale that worst that will happen is inability to autocomplete / jump to new files. |
theuni's comment regarding msvc seems quite timely, considering their new licensing model: "An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects." |
Awesome! I freshly checktout your master but i cannot open the xcodeproject. It always crashes. I tested with Xcode 6.1 and 5.1.1. Maybe the xcodeproject should not be in the root folder. Why not in the contrib folder? crashlog: |
I did a little trickery to make Xcode's run button work. The scheme lets I modified the scheme file directly to be a relative path which Xcode takes So that means it will open it just fine with an absolute path -- not On Friday, November 14, 2014, Jonas Schnelli notifications@github.com
|
I'd love to see a guide to make Qt Creator work with what we use as build system ^^. |
Qt Creator works fine for me. |
@jonasschnelli Can you give me some detailed steps for this as I can't figure out how you did that. |
@Diapolo let me write a little manual. |
@jonasschnelli Great, thanks! |
@ddustin We can only merge this if you promise to maintain it and keep it up to date. I'm not against having alternative build systems, but we don't have the capacity to take up maintenance of alternative systems, especially not OS-specific ones. |
@ddustin tried to open multiple times in multiple Xcode versions. Crashes everytime. |
@laanwj if it once works, i could also help keep it up to date. Promises are always hard to keep. If it gets un-updated once, drop it from the repo. |
Agreed with @laanwj. I'd really prefer to not take this because of the potential burden it creates, but I accept that it may encourage a few people to get involved who otherwise wouldn't. @ddustin I think it's going to come down to how useful it can be if it's added as a rough template, with the understanding that it's the builder's responsibility to re-scan/re-import/whatever. If that's the case, it may be worth having. However, if it's going to require pull-requests ~weekly or so to keep in sync, which can't be verified by the people merging them or CI, then I don't think that's really justifiable. |
@ddustin, is there an overwhelming advantage over a separate repo, à la https://github.com/ENikS/bitcoin-dev-msvc? |
@theuni: remember: a Xcode project only needs a update if a new file was added or deleted. That's absolutely madeble. I see this files in the contribfolder. |
Just speaking historically, we used to have 4 makefiles for different I'm fine with other project files under contrib though, with less implied |
IMO theres not much to loose if we place it under the contrib sections. But the main problem is, that this pull requests xcode project won't work.Once the basics are there, i can try to auto-configure this xcode project on a script basis. The project file is nothing more than a xml-, makefile-like thing. |
I spent hours looking for official, semi-official (or anything definitive and current) build instructions or project file for Xcode -- and was very surprised that I came up empty handed. I"m really happy to see this PR. I think there are a large number of Mac OS developers who would appreciate this being as accessible and current as possible. I guess putting it in |
@jonasschnelli files are added/removed all the time. |
@jonasschnelli This updated version will prevent the crash but the "run" button isn't working but building works great. |
debugDocumentVersioning = "YES" | ||
allowLocationSimulation = "YES"> | ||
<PathRunnable | ||
FilePath = "/Users/ddustin/Library/Developer/Xcode/DerivedData/bitcoin-hgcxjaiitthtfmbhlaaruaclhrgx/Build/Products/bitcoind"> |
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.
nit: absolute user path
@jonasschnelli I removed those now |
I really like that idea. That way it's a separate project with separate maintainers, so changes don't even have to pass through here. We could still refer to it in documentation here. |
Well whatever works. I built this for myself and I am happy to share it. I will maintain it for myself as long as it's useful for me, which will probably be for a while. If @jonasschnelli wants to keep it up to date too that's great. It is worth noting this isn't actually a unique build system. It just uses Xcode to call 'make' and introduces the conveniences of the Xcode interface. |
To demonstrate a few of the simpler features: If you edit the scheme to point to src/qt/bitcion-qt you can easily set breakpoints visually, step through, and use Xcode's debugging interface. You can also CMD+click functions (like SetupEnvironment in this example) and see implementations for things. This speeds up development for me by an order of magnitude. Check it out in these screenshots. |
@ddustin i had a look at it. Good work. |
@jonasschnelli Sure, I'll keep it at github.com/ddustin/bitcoin for now -- I'll give you write permissions to it. Should we change the name of the repo? |
@ddustin Keeping it separate from the bitcoin core tree itself, like https://github.com/ENikS/bitcoin-dev-msvc (which seems to have bitcoin as a submodule), could save merging work. |
Not only does keeping it a separate repo save you merging work, but it should allow people using your project to fork it and point it at whatever branch of bitcoin they want to work on. |
We'd welcome a document (or part in an existing document) pointing out these alternative build systems and their maintainers. |
Closing the pull as it is not the goal to merge this but to refer to it. |
This allows many features of Xcode to be used while developing. I made it so I can work on the client in an environment I'm familiar with.
I'm not sure if you guys would be interested in this but I thought I'd offer it up in case.