Just wanted to highlight an interesting and potentially very helpful development that came out of the OF dev conference and is being actively developed right now – the OF project generator. It’s a combination of scripts we had been writing for making new project files, the _deployExamples project, etc and we’re excited to make one unified tool. It’s written in c++, which means it easier to support it, and we are working on a gui.
It’s currently in the dev apps folder of the OF develop git branch, but we are thinking to move it to a seperate repository shortly, in which case it will be a submodule of OF, so that it can have it’s own separate issues, etc.
here’s what it can do, and a list of next steps:
a) It can (and does) store a path to the base of openframeworks, so that new project can be created at different heights relative to openframeworks (ie, …/…/ instead of …/…/…/)
b) it can make new projects with the right paths and names, and if you choose addons to add, it will add them.
c) it scans addons using file system, looking for things like folders that say “libs”, “src” etc.
d) it can generate a new project file for an existing folder, by recursively scanning the src folder, and looking for an addons.make file (currently used in linux, but will know be used across all platforms) for any addons to make.
e) it has a feature now which can generate all the project files the example folder (right now, it’s a key press option “m”)
f) it makes folders in the project files well, and can add include paths, etc. on xcode this isn’t a big deal because of drag and drop, but on other platforms, this is a huge help.
how it works – it currently uses pugi xml for parsing the xml of project files. Xcode project files are typically plists, but we can (and do) use a utility called plutil to convert those files to xml. pugixml has really good xpath parsing, so it’s possible to do complicated and gnarly requests, which the xcode project generator is full of
here’s some issues we are working with now:
a) there’s no IOS support – the previous app, deploy examples could make the IOS examples
b) the platform is auto detected, but needs some options for choosing.
c) there’s no checking of the root of OF – easy to choose the wrong root.
d) there’s no windows versions of this project generator yet (ie, we need to have projectGenerator.cbp, etc).
e) the windows versions needs some love – right now, there’s a fair amount of / vs \ issues, as well as some lack of features such as doing the right thing for non …/…/…/ paths, etc.
f) the xcode project generator needs some serious commenting – it’s bonkers crazy! we’ve done it using xml parsing rather then loading the plists to keep it cross platform, but it is some monster voodoo there. having it better commented will help alot.
At any rate, I thought I’d kick off a forum thread, and as we develop it, use this as a place to update about its progress, etc.
also, since system should allow you to use and add any addon to your project, it’s clear we will learn alot of things about how to better structure addons. there are some per platform things to consider (ie, how to specify link order, and add per compiler flags, etc). hopefully having this tool will help standardize the process and address two of the most basic questions people have with OF: how to make a new project and how to add addons.
(your new best friend, hopefully!)