ofPackageManager - a package manager for openFrameworks

How to install it?

Windows

We are working on a chocolatey installable version. For now you to install the exe manually.
  1. Download the latest release for Windows from the github releases page.
  2. Unzip the package anywhere on your hard drive. Make sure to keep the entire contents of the folder, including the DLLs.
  3. Add the package folder to the PATH variable. Steps on how to do this can be found here.

OSX

You can either install ofPackageManager via brew or manually. It is recommended to use the brew package manager.

Brew

brew tap thomasgeissl/tools
brew install ofpackagemanager

Manually

bash -c "$(curl -sSL https://raw.githubusercontent.com/thomasgeissl/ofPackageManager/master/scripts/osx/downloadAndAddToPath.sh)"

Linux

There is currently no compiled version for linux available. You will need to compile it yourself. The following line will download ofPackageManager, its dependencies and then compile it.
sh -c "$(curl -sSL https://raw.githubusercontent.com/thomasgeissl/ofPackageManager/master/scripts/install.sh)"

How to use it?

First, the package manager needs to be configured globally. It will ask you where your openFramesworks installation is located and where to install the packages database.
ofPackageManager config -g
Then cd into your project directory. And you can install addons via id, github handle (github name / repository name) or a git url. It is recommended to install addons locally, which is the default.

The package manager will also clone dependencies if specified in addons_config.mk.
ofPackageManager install ofxMidi
But you can also install them globally to your global openFrameworks addons directory.
ofPackageManager install -g ofxMidi
As mentioned above ofPackageManager also accepts commit hashes and tags to specify the version you wanna checkout.
ofPackageManager install ofxMidi@1.1.1
ofPackageManager install ofxMidi@2f0e6343c817a4f5a33b60339c82b5d10be8af01
If a package is not (yet) available in the database you can also install it via the github handle or its git url.
ofPackageManager install kylemcdonald/ofxCv
ofPackageManager install https://github.com/npisanti/ofxPDSP.git
If you do not know if a package is available in the database or you are not sure which version it is, then the search task is quite useful.
ofPackageManager search ofxPDSP
ofPackageManager search github ofxAudioFile
ofPackageManager search github -u npisanti
To install all dependencies of an existing project simply call the install task without any further parameter. It will clone them and checkout the corresponding commits.
ofPackageManager install
If you wanna add or update manually cloned depenencies then you need to call the add task.
ofPackageManager add local_addons/ofxMidi
ofPackageManager add -A local_addons
You can check if there are updates available and update the database with the following two commands.
ofPackageManager doctor
ofPackageManager update

How does it work?

For every dependency it will append the git url and commit hash to the corresponding line in your addons.make file. So it is able to download dependencies and check out the right versions at any time later.
ofxUnitTests
local_addons/ofxCommandLineUtils#https://github.com/thomasgeissl/ofxCommandLineUtils.git@32edfb3ff
local_addons/ofxGit2#https://github.com/thomasgeissl/ofxGit2.git@e2b4da663

How can I learn more about it?

Have a look at ofPackageManager, its implementation and issues on github. Or checkout the forum and do not hesitate to ask questions.