.gitignore, makefile and addons


super excited to start diving into OF : ) I’m relatively new to setting up OF (running on mac osx) and I have two silly questions, one about .gitignore files and one about addon’s…apologies if they are really obvious!

I’m trying to set up a project that myself and my partner can both work on

Can we ignore the makefiles that the project generator creates and the xcode files? or is this going to cause some problems down the line? can we just ignore everything except the .cpp/.h files?

now for addons, how does addons work with source control with a project that is shared with multiple people?

I thought addons would be more like just getting a .h/.cpp file to include in your project but I am for sure mistaken…

looking forward to learning about all this!

thank you!

it shouldnt be a problem if you ignore everything but the relevant code files. you can ignore the xcode and make files (if you have not manually modified the later). But dont ignore the addons.make file.
addons are handled globally in the addons folder, so you can tell your partner to download the same addons and place the in the addons folder or you can have addons setup locally for your project. For doing such copy this addons into your project folder and in the addons.make file specify a relative path to this folder (if it is in the same folder you need to put ./ofxWhateveraddon). Let me know if this works for you.

if you are courageous and motivated enough and on osx, you could also give ofPackageManager a try. It works similar to npm. It will install your addons to a directory local_addons inside your project. You can gitignore that directory (echo local_addons >> .gitignore). Your partner can then install the addons via ofPackageManager install.

Hey @thomasgeissl,
That’s super nice. Congrats. I will check it soon.

1 Like