Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG should generate example projects in non-core addons #1234

Open
bilderbuchi opened this issue May 1, 2012 · 5 comments
Open

PG should generate example projects in non-core addons #1234

bilderbuchi opened this issue May 1, 2012 · 5 comments

Comments

@bilderbuchi
Copy link
Member

It would be great if the PG could get an option to generate the examples of non-core addons which the user has downloaded and placed in OF/addons/. This would really be useful to quickly look at/work with an addon.

The PG already knows about these addons. It would scan for folders in am addon's root directory with example in the name somewhere, and probably check the requisite structure (src folder, addons.make in place, etc), then generate the project file just the way it would if the example were in OF/examples/addons/someExample. Folder depth is the same, so I hope this is just a matter of adjusting the root folder for the example generation process - addons instead of examples.

Thoughts? Feedback?

@elliotwoods
Copy link
Contributor

sounds kind of cool, especially as a lot of addon example projects become 'rotten' as the examples advance
in VS i'm now strictly using a project-per-addon-with-statc-linking design which of course would make my new examples incompatible with project generator if this proposition came through. no biggie though.

that said, it might even be worth opening up the discussion about whether project-per-addon is desirable enough to be standardised as a PG compatible option (many addons may be small enough that project-per-addon is unnecessary).

that also suggests perhaps that PG should be generating .props, .xcconfig, etc and including those in user projects rather than hardcoding the include paths and libs into the project.

anyway, in more direct response to the OP,
as an addon developer who creates addons this scheme (would and) wouldn't work with, i still say it's definitely worth implementing.

@bilderbuchi
Copy link
Member Author

Sorry, but I don't really get what you mean with "one project per addon". If an addons has multiple examples (e.g. ofxUI has loads!), how would that work? How could you run just the one you want, if you only got one project per addon?

@elliotwoods
Copy link
Contributor

ah.
i mean literally a .vcxproj file which defines the addon, which you then include in the solution of your app that you're creating. This facilitates static linking of addon files (no need to build per project) and tracks the addon's files so if anything changes, your old projects should still work
(+equivalent .xcodeproj / etc)

it works well for me (saves a lot of time when working across a bunch of apps with common addons, especially when you're making lots of changes to those addons at the same time).
don't want to clog up your thread with indirectly related ideas though so we can start a new thread maybe if you're interested in talking more

@bilderbuchi
Copy link
Member Author

Ah ic. But the generated addon example projects could still link to that project-per-addon (they're just another app, just not in /examples/...), so I don't see how this would not work with your workflow?

I agree, it's better to take the discussion about one-project-per-addon elsewhere, please open a new issue for that.

@elliotwoods
Copy link
Contributor

yep. it would work, and PG could generate everything appropriately if it was coded to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants