openFramworks wizard for CodeBlocks

Hi,

Weehoo an openFrameworks wizard for CodeBlocks!

This wizard lets you easily create openframeWorks projects, select the addons you want to use and all project settings are done for you. This is the first release which works on Windows. In the future I’ll add support for Mac as well (if you’re interested please tell me).

Download the source from SVN:
http://ofcodeblocks.googlecode.com/

Install how-to:
http://code.google.com/p/ofcodeblocks/wiki/InstallingOpenFrameworksWizard

Roxlu
http://www.roxlu.com

oooh man that’s so great!! going to try to port it to linux

thanks!

that’s get triple smiles:

:smiley: :smiley:

can’t wait to check it out…

This is going to be awesome… but right now it isn’t working :frowning:

When I follow the instructions on the Google code site, when I get to the “creating a new project” step there’s a weird issue.

For some reason the prompts are using some text from the OGRE wizard, but with the OF logo (see attachment).

Also, you write:

Add this line in the RegisterWizards() function (i.e. line 66)

But in my config.script file, line 66 is RegisterWizard(type, folder, title, category) rather than RegisterWizards().

Ah you’re right. I’ll fix this today. The reason for the screens you see is that CodeBlocks doesn’t show that first page to me anymore.
-snip-
no it’s not… something went wrong when adding the files to te repository.
-snip-

[quote author=“kylemcdonald”]This is going to be awesome… but right now it isn’t working :frowning:

When I follow the instructions on the Google code site, when I get to the “creating a new project” step there’s a weird issue.

For some reason the prompts are using some text from the OGRE wizard, but with the OF logo (see attachment).

Also, you write:

Add this line in the RegisterWizards() function (i.e. line 66)

But in my config.script file, line 66 is RegisterWizard(type, folder, title, category) rather than RegisterWizards().[/quote]

Hi kylemcdonald,

I’ve updated the script. Somehow the wrong script was added to the repository. I’ve updated the repository with the correct script. Can you test this maybe?

Greetings

Sweet, it works now!

Some requests:

1 Would it be possible to not copy over the .svn folder into the project? It’s kind of confusing, and might cause conflicts for people who manage their projects using svn.

2 All of the files are added under the root directory of the project. One of the things that is most annoying about C::B is creating virtual directories and dragging files around one at a time. Would it be possible to create the virtual directories automatically? In the XML, it looks like this:

  
  
<Option virtualFolders="addons\;addons\ofxDirList\;addons\ofxVectorMath" />  
  

Just before the .

Then, later in the project, instead of saying:

  
  
<Unit filename="..\..\..\addons\ofxDirList\src\ofxDirList.cpp"/>  
  

You say:

  
  
<Unit filename="..\..\..\addons\ofxDirList\src\ofxDirList.cpp"><Option virtualFolder="addons\ofxDirList\" /></Unit>  
  

I don’t know how much of this can be automated with the scripting you’re doing, but I figured I’d ask :slight_smile:

Hi kylemcdonald,

You should use “svn export” instead of “svn checkout”. When using “svn export” you won’t have the .svn info.

I’ve been trying to create virtual folders automatically for a couple of hours but I did find a solution for this. I’m not sure if this is even possible. I need to use the API CodeBlocks provides and I couldnt find a method to add files with a virtual folder. I’ve posted this question on the CodeBlocks forum.

If someone knows how to do this please reply.

I’m also thinking to create another “plugin” which let you add addons after you’ve created a project.

Roxlu

man this is awesome! just tried it out and works ace. Being a complete noob to codeblocks it made me very happy :stuck_out_tongue:
A question about the addons list, is this hardcoded or is it read from somewhere? I have all of my own addons in a separate folder (/ofw/addons MSA) for SVN reasons (it’s a working copy of http://ofxmsaof.googlecode.com/svn/trunk/ - I couldn’t figure out a way of keeping all the addons in the same folder and easily committing the whole folder without making a project per addon, which I don’t wanna do). So is it possible to configure the template to read the available addons from the addons folder and/or additional folders?

Hi Memo,

If the path of the addons is at the depth as the other addons it’s definitely possible.
The wizard in OF uses a scripting language called squirrel, which is new to mee. It looks nice, though the community is very tiny and I haven’t found a XML parser to parse the addons XML install files.

Therefore I hardcoded all the include/links/etc… information into the script. Some of your addons are currently in my working copy as I’m a big fan of them :> Especially ofxSimpleGuiTOO!

I’ll check if I can give you access to the repository so you can edit the script.

Roxlu

By the way Roxlu, I’ve stopped using virtual folders recently. So I’m 10x more satisfied with this plugin :slight_smile:

Nice! I’m thinking to create another plugin which let you add OF addons after you’ve created a project. It would be also great if one could just download plugins/addons and add those to a project…

Roxlu

am i missing something or there is no downloads of script: http://code.google.com/p/ofcodeblocks/downloads/list ?

ok, sorry i got it

Hey, I just tried a release build and it didn’t work :frowning: lots of errors:

undefined reference to: ‘ofAppGlutWindow::ofAppGlutWindow()’
undefined reference to: ‘ofSetupOpenGL(ofAppBaseWindow*, int, int, int)’
undefined reference to: ‘ofRunApp(ofBaseApp)’

etc.

in fact undefined reference to everything!!

any ideas what the problem is and how I can fix it? (ideally without starting the project from scratch)

Hey Memo, I got this same error. For some reason it isn’t importing libs/openframeworks. Go to project->add files recursively and add the folder. It’s already in the build path.

that fixed the problem for all the ofw core files, but i’m having to do the same for all the addons now :S

Hmm, I didn’t have an issue with that… I thought that was what the code wizard was supposed to solve…? :slight_smile:

ok, well i’m quite new to codeblocks, and this is what i’ve noticed:

the wizard does add /lib/openframeworks, and all the addons to the project, but only to the debug target. If you right click on any of the source files and goto properties, and then check the build tab, you can see only the debug target is checked. So even though the files are included in the project tree on the left, they aren’t included in the release target. The only options I found are to one by one select each file, goto properties, build tab and enable the release target. Or you can re-add /lib/openframeworks and all the relevant addons, and tick the checkbox for both debug and release. Since the header include paths are already added you don’t need to do that.

hi memo,

Yep that’s indeed the thing. I’ll try to fix it soon.

Roxlu

I just realized the reason I hadn’t noticed this bug is that I don’t normally use Debug. If you make a project only with Release, it works fine. If you make a project with both Release and Debug, only Debug works.

Also, a quick fix for this: open up the .cbp project and remove every

  
<Option target="Debug" />