← Back

ofxAddonTool

github.com/Daandelange/ofxAddonTool · @Daandelange
OF 0.11 Utilities

Standalone bash script to manage your OpenFrameworks addon dependencies using git.

2 1 Last commit 5y ago Created 6y ago

README

ofxAddonTool

ofxAddonTool A simple standalone bash script for managing your OpenFrameworks addon dependencies using git and a project-specific configuration file. ofxAddonTool Screenshot

Introduction

Working with several OpenFrameworks projects, each requiring specific versions of ofxAddons can be a headache. This script aims to simplify dependency installation, verification and updating.

How it works

It compares a configuration file (addons.txt) against the openframeworks/addons folder then runs some diagnostic checks and actions on them.

Current State

This tool is still under development (alpha). Basic functionality is there and remains to be tested on a wider set of configurations. Any feedback, suggestions or contributions are welcome.

License

MIT license. Read license. By Daan de Lange.

Installation

To install this tool, the easiest way is to add it to your OpenFrameworks project as a submodule, so you can easily track updates. You're free to install it in the root of your project or in any subfolder. The script will assume your project root is the first parent directory containing addons.txt. Please, note that this is not an OpenFrameworks addon, so don't install it in path/to/of/addons.

In the example below, we will install it to the scripts folder.
cd /path/to/of/apps/myApps/exampleApp
mkdir scripts && cd ./scripts
git submodule add https://github.com/Daandelange/ofxAddonTool.git
mv ./scipts/ofxAddonTool/addons.txt ./addons.txt


Alternatively, you can also download ofxAddonTool.sh + addons.txt and place them in the root of your project directory.
cd /path/to/of/apps/myApps/exampleApp
curl -L -O https://raw.githubusercontent.com/daandelange/ofxAddonTool/master/addons.txt -L -O https://raw.githubusercontent.com/daandelange/ofxAddonTool/master/ofxAddonTool.sh


Install required dependencies

For the use of realpath, included in the GNU core utilities :

Install optional dependencies

If you want fancy ASCI art, install toilet or figlet. (optional)

Configuration

Edit yourProject/addons.txt with your favourite text editor to suit the needs of your project. For each addon, you need to provide the title (folder name), the URL and the branch to checkout. Further instructions are within that file.

Usage

cd /path/to/of/apps/myApps/exampleApp/scripts/ofxAddonTool
./ofxAddonTool.sh --check
./ofxAddonTool.sh --help


Updating

To get the latest version of this script.
# Get updates
cd /path/to/of/apps/myApps/exampleApp/scripts/ofxAddonTool
git checkout master && git pull

Tell your project to use ofxAddonTool's latest commit (repo owners only)

cd /path/to/of/apps/myApps/exampleApp git add /scripts/ofxAddonTool git commit -m "Update submodule ofxAddonTool to latest version." git push

Synchronize all submodules of your project (user update method)

cd /path/to/of/apps/myApps/exampleApp git checkout master && git pull git submodule update


Compatibility

This script is coded in pure Bash script. It runs on Linux and Mac. Windows is untested but should work. An internet connection is recommended to get the latest remote updates from your git remotes. Note: This script could easily be adapted as a git addon manager, without anything OpenFrameworks.

Version history

See CHANGELOG.md.

Alternative

ofPackageManager is a more extended oF package manager which installs as a system-wide tool. Compared to it, ofxAddonTool is a lightweight plug'n'play solution, but it doesn't offer as much features. (Note: Their configuration files are not compatible [yet?])

Get this addon

HTTPS
SSH