What is local_addons?

I just found out there is a folder called “local_addons” in an Xcode project generated by PG.

I would like to know what local_addons is and how it is different from standard addons.

Thanks in advance!

Hi cuinjune,

I believe that it refers to the folder of addons which is in the “project” folder you are using so you can use those addons automatically for the sketches in the project folder :

for example :

Here in my “Horns” project, all my sketches will pull automatically from the local_addons folder when updating with the PG.
Do you confirm @roymacdonald ?

Hope it helps,



Hi, you can have addons inside of your project folder, this way if you are sharing this project you can make sure that whomever is using it gets the exact same addon as you are using. Also it is useful when archiving a project so the addon you used on it remains unchanged. I personally tend to use it a lot when I have shared code for several projects I am working on, I would make a “fake” local addon where I add all this shared code.
These addons can be anywhere, the only thing you need to make these work is to add the relative path to these in the project’s addons.make file.

1 Like

you might want to give ofPackageManager a try. it installs your addons to the local_addons directory and adds them to your addons.make file. it also stores the current commit.

brew tap thomasgeissl/tools
brew install ofpackagemanager
# brew upgrade ofpackagemanager
ofPackageManager config -g
cd into/your/project
# install an addon locally
ofPackageManager install ofxPDSP
# or install an addon globally
ofPackageManager install -g kylemcdonald/ofxCv

Now you can add your local_addons directory to your .gitignore file.
If you wanna test, you can remove the local_addons directory and reinstall it.

rm -rf local_addons
ofPackageManager install

then you will have to update your project with the project generator. it will work with the most recent version on github, but if i remember correctly not with the one bundled with the latest release.


Thank you for your explanation!

So “local addons” means addons that exist inside a project folder but they don’t necessarily have to be located inside the project folder. (this is what you mean by “fake” local addon) right?

So if you have shared code for several projects, you would probably rename addon folder for these projects? (e.g. ofxAddon-for-several-projects) Or do you just copy the addon to a different directory other than “OF/addons”?

This way you can make changes to the renamed (or cloned) addon while keeping the original (ofxAddon) unchanged. Am I understanding everything correctly?

right. This is one of the uses you can give to it.

I would say that these are addons that can live anywhere that you address by a relative path. As such,
what makes more sense is to keep these inside the project folder .

i mean fake addon just to say that it is not a real addon but instead just code I want to share between different projects but all related some how, but for it to make it work I have to create the same folder structure as a regular addon, which is just to put everything inside a folder called src

so for instance you can have the following folder structure.

for all the projects I am working on the Something folder I have some local_addons. the shared_code folder behaves as an addon as its files are inside a src folder.

So for this shared code to be added to the projects inside the Something folder, in each projects addons.makefile I would add a line that reads ../local_addons/shared_code and then just update the project with Project Generator.

Hope this helps