░░░ ▒▒▒▒ ▓▓▓ ████ █ █ Project Generator
░ ░ ▒ ▓ █ ██ █ for ofWorks
░ ░ ▒▒▒ ▓ ▓▓ ███ █ █ █ (OpenFrameworks fork)
░ ░ ▒ ▓ ▓ █ █ ██
░░░ ▒ ▓▓▓ ████ █ █
ofGen is a command-line tool to generate ofWorks projects.
- The complete installation script already builds it and adds it to your system path.
- If you have it installed, you can simply call
ofgenfrom any folder. - If not installed, you can compile and install using:
cd ofworks/ofgen
./compile.sh # Windows requires Git Bash or ./compile.ps1 for PowershellNavigate to your project folder and invoke:
cd ofworks/apps/Work2026/transmutation
ofgenWithout parameters, it detects your platform and installs the recommended templates.
A favorite workflow is to run this in any openFrameworks project:
ofgen importThis imports project data (addons list from addons.make) and creates a file called of.yml in your project folder.
This file is a "recipe" with all settings required to build the project.
The nice thing is the project can behave exactly like an addon, so you can use a libs folder to test some library without addon, or a variation of OpenCV with different compilation settings.
You can also invoke parameters directly:
cd ofworks/apps/workApps/awesomeApp
ofgen templates=zed,chalet,macos addons=ofxMidi,ofxOpencv ofpath=../../.. path=/Volumes/tool/TranscendOr usually it is more useful to quickly test templates:
ofgen templates=chalet,zedTemplates can mean any mix of:
-
Code Editors:
Zed,VSCode -
Build Systems:
chalet -
Both:
XCode -
ofgen openwill open the first template in your list that is a code editor. -
ofgen buildrunwill use the first build system listed.
Example if using of.yml:
templates: [macos, zed, chalet]ofgen open➜ OpensXcodeofgen buildrun➜ Callsxcodebuild
Another example:
templates: [zed, chalet, macos]ofgen open➜ OpensZedofgen buildrun➜ Callschalet buildrun
# name: XPFlagship2024
ofpath: ../../..
addons:
- ofxAssimpModelLoader
- ofxMicroUI
# - ofxMicroUIMidiController
- ofxTools
- ofxScenes
- ofxNetwork
- ofxOsc
# - ofxSyphon
- ofxTweeny
- ofxVideoRecorder
# - ofxMidi
templates: [macos, zed, chalet]
# Advanced settings
sources:
# - ../XP/src
# - ../DEDGE-RIO/src
- ../XP/src/additional
- ../Aura/src2 # only testing
defines:
- NANOVG_GL2_IMPLEMENTATION
- FORCE_RGFW
frameworks: [Security, IOKit]- Addons with a git address: clone automatically on missing addons when moving projects between machines, with support for specific tags or branches.