Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Updated Code::Blocks project wizard/template  (Read 4562 times)

0 Members and 2 Guests are viewing this topic.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Updated Code::Blocks project wizard/template
« on: March 22, 2013, 01:13:36 pm »
Hi everyone,

since I had nothing to do recently, I just tried out creating an SFML project using the wizard provided with Code::Blocks (I have no idea when it was made). It is obviously so old that it doesn't work any more, so I took the opportunity to update it myself. Although I don't plan to use it, it might be of use to others.

You can now choose your link type (shared or static) on Windows and it will search for the corresponding library files. On Mac and Linux this makes no sense so only shared linkage is available on those platforms. You don't have to worry about setting SFML_STATIC because this is taken care of automatically as well.

In the default Debug target that it produces, the type is set to Console application. In the default Release target, the type is set to GUI application and sfml-main is also automatically linked in.

The whole idea was that you can create a project from the wizard and it works out of the box, and for most people they won't have to touch any of the configuration relating to SFML for the rest of the project.

I am not really sure whether the Mac part of the wizard still works or not because I don't own a Mac and thus could not test.

I provided the whole wizard directory in a zip. You need to delete the old sfml directory (yes delete it, overwrite is not enough because there is a .bmp that is not used any more) and unpack the new one into your wizard directory which you can find at: <CodeBlocks root directory>\share\CodeBlocks\templates\wizard.
If there was no sfml directory to delete, you will have to additionally add this line
Code: [Select]
RegisterWizard(wizProject, _T("sfml"), _T("SFML project"), _T("2D/3D Graphics"));
to the other lines in the config.script file in the wizard directory as well to register the sfml wizard with Code::Blocks.

Any ways, have fun.

[attachment deleted by admin]
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Re: Updated Code::Blocks project wizard/template
« Reply #1 on: April 01, 2013, 11:00:14 am »
Did you send this upstream as well? That way, it will help vastly more users.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Updated Code::Blocks project wizard/template
« Reply #2 on: April 01, 2013, 04:27:06 pm »
If you ask me, I think that the libraries should provide the templates for the IDEs and not the other way around. There is no point providing 20 different templates for libraries a user will never use.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything