Here’s how to build project generator (command line app) on OSX (should be same in win, linux I guess)
You can automatically generate all project files recursively inside of example directory, or single project as well.
- clone projectGenerator repo (https://github.com/openframeworks/projectGenerator)
- Open terminal.app and execute following command
- cd projectGenerator
- wait for download and compile
- You will see new “openFrameworks” folder is created. And projectGenerator folder moved inside of openFrameworks/app/projectGenerator.
- Now you have command line app at openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator
- execute projectGenerator app from terminal and see how to use it.
NOTICE : newly created openFrameworks directory is release version. You can delete this in case if you want to work with master branch etc.
Here is copy and paste.
projectGenerator [options] pathName
if pathName exists, project is updated
if pathName doesn’t exist, project is created
(pathName must follow options, which can come in any order)
–help Print usage and exit.
–recursive, -r update recursively (applies only to update)
–listtemplates, -l list templates available for the specified or current
–platforms, -p platform list (such as osx, ios, winvs)
–addons, -a addon list (such as ofxOpenCv, ofxGui, ofxXmlSettings)
–ofPath, -o path to openframeworks (relative or absolute). This
must be set, or you can also alternatively use an
environment variable PG_OF_PATH and if this isn’t set, it
will use that value instead
–verbose, -v run verbose
–template, -t project template
–dryrun, -d dry run, don’t change files
projectGenerator -o"…/…/…/…/" …/…/…/…/apps/myApps/newExample
(create a project called newExample using a relative path for the OF root and the project. note the relative path may be different depending on where this app is located)
projectGenerator -r -o"…/…/…/…/" …/…/…/…/examples
(recursively update the examples folder)
projectGenerator -o"…/…/…/…/" -a"ofxXmlSettings, ofxOpenCv" …/…/…/…/apps/myApps/newExample
(create / update an example with addons)