Author Topic: New plugin committed  (Read 14591 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
New plugin committed
« on: April 18, 2006, 02:26:26 pm »
I committed a new plugin in HEAD: Project wizard.

This complements (and eventually will replace) the project templates.
Currently we use a file-based approach for templates.
This wizard is based on scripts and allows the creation of wizard-like interfaces, guiding the user. I have also created a few wizards as examples. Surely, most of them, might need some finishing touches here and there.

For info on how you can create additional wizards, have a look in plugins/projectwizard/resources/console/wizard.script. It is fully commented and it should give you a nice head start.
To add a new wizard, you must add a new directory under plugins/projectwizard/resources/ and register it in plugins/projectwizard/resources/config.script.

Just follow the samples :).

Criticism and ideas for enhancement are welcomed, as always ;).
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New plugin committed
« Reply #1 on: April 18, 2006, 03:31:32 pm »
Known "issue": when you run update.bat to update your installation, it copies the Makefile.am files too. These are not part of the sample projects. They don't hurt, but they don't belong there...
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New plugin committed
« Reply #2 on: April 18, 2006, 03:46:34 pm »
Hello,

I am trying to build it with cbp (rev2354) on Ubuntu 5.10, but I get 3 errors:

Quote
plugins/projectwizard/wiz.cpp:128: error: ´class wxXmlResource´ has no member named ´Unload´
plugins/projectwizard/wiz.cpp:326: error: ´wxDir´ has not been declared
plugins/projectwizard/wiz.cpp:128: error: ´getAllFiles´ was not declared in this scope

Best wishes,
Michael

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: New plugin committed
« Reply #3 on: April 18, 2006, 04:00:21 pm »
Some thoughts:
  • "Standard" browse-for-folder buttons for the output dirs on the fourth page (the previous page, asking for wxWidgets' location, has one).
  • I like the Debug/Release options; they save me a bit of work. Beginners to programming and/or Visual Studio converts will also feel much more comfortable. (I know your goal isn't to duplicate VS, but a few crossovers like this definitely don't hurt.)
  • The assumption that I will want my project in a subfolder of whatever folder I choose, with the same name as the project, is faintly irritating to me. Admittedly, I only have a few "projects" for which this wouldn't be suitable -- i.e. "solutions", containing multiple C::B "Projects", and I only have to set them up once. Still, semi-pros such as myself might appreciate a way to put the .cbp file exactly where we want when it's first created.
  • It's not immediately clear what the "Configuration" editbox is for.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5272
Re: New plugin committed
« Reply #4 on: April 18, 2006, 04:03:01 pm »
add the following includes :
#include <wx/dir.h>


the other one : from wx header :
#if wxABI_VERSION > 20601
    // Unload resource from the given XML file (wildcards not allowed)
    bool Unload(const wxString& filename);
#endif // wxABI_VERSION


are you using old wx ??

EDIT : the include fix has been committed
« Last Edit: April 18, 2006, 04:10:33 pm by killerbot »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New plugin committed
« Reply #5 on: April 18, 2006, 04:05:53 pm »
add the following includes :
#include <wx/dir.h>

Thanks :). I will give it a try.

the other one : from wx header :
#if wxABI_VERSION > 20601
    // Unload resource from the given XML file (wildcards not allowed)
    bool Unload(const wxString& filename);
#endif // wxABI_VERSION


are you using old wx ??

I use the the deafult Ubuntu package. Should not be that old, or?

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New plugin committed
« Reply #6 on: April 18, 2006, 04:39:20 pm »
add the following includes :
#include <wx/dir.h>

I still get the ´Unload´ error.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5272
Re: New plugin committed
« Reply #7 on: April 18, 2006, 04:51:59 pm »
Unload : the needed header is included (#include <wx/xrc/xmlres.h>
) but the Unload does only exist if the ABI is above a certain version, seems your ABI is below ??

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New plugin committed
« Reply #8 on: April 18, 2006, 04:55:43 pm »
Unload : the needed header is included (#include <wx/xrc/xmlres.h>
) but the Unload does only exist if the ABI is above a certain version, seems your ABI is below ??

I have these here (Ubuntu default):

Quote
libwxgtk2.6-0 (2.6.1.1.1ubuntu2) [universe]
wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
libwxgtk2.6-dbg (2.6.1.1.1ubuntu2) [universe]
wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
libwxgtk2.6-dev (2.6.1.1.1ubuntu2) [universe]
wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)

May be they are too old for the ABI...

Best wishes,
Michael

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: New plugin committed
« Reply #9 on: April 18, 2006, 05:18:54 pm »
Looks awesome. When I'm back home I'll try to create my own wizard.
Anyway, so far I found one bug (?): When I try to run the wizard for a D console application I get an error message box saying:

---------------------------
Scripting error
---------------------------
Error compiling script.
Error code: -1 (ERROR)

Details:
[WizardModule] wizard.script (66, 1) : Error   : A function with the same name and parameters already exist
[WizardModule] wizard.script (67, 1) : Error   : A function with the same name and parameters already exist
[WizardModule] wizard.script (68, 1) : Error   : A function with the same name and parameters already exist
[WizardModule] wizard.script (30, 1) : Info    : Compiling bool SetupProject([email protected])
[WizardModule] wizard.script (37, 5) : Error   : Multiple matching signatures to 'WarningsOn([email protected]&, wxString&)'
[WizardModule] wizard.script (46, 9) : Error   : Multiple matching signatures to 'DebugSymbolsOn([email protected]&, wxString&)'
[WizardModule] wizard.script (56, 9) : Error   : Multiple matching signatures to 'OptimizationsOn([email protected]&, wxString&)'

...all the other work fine.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New plugin committed
« Reply #10 on: April 18, 2006, 06:08:23 pm »
@michael: I confirm the wxXmlResource::Unload() problem in Ubuntu. I have #ifdef'd this line of code, but note that the second time you 'll run this wizard (in the same session) you may expect a crash because the loaded XRC will not be refreshed...

@morten: fixed, thanks.

@TDragon: remarks noted, thanks.

@all: thanks for the feedback guys :)
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: New plugin committed
« Reply #11 on: April 18, 2006, 08:54:05 pm »
I tried to implement the wizards for GLFW and GLUT, and: success. No I can really say: Nice work, though - easy to understand and really flexible.
How and when are other devs supposed to contribute (e.g. translate all other templates into wizards)? As a patch? Or is it better to wait with submitting new wizards - I'm thinking about the compiler framework overhaul here...?! (Because I believe the wizards will be changed slightly once this is done.)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

sethjackson

  • Guest
Re: New plugin committed
« Reply #12 on: April 18, 2006, 09:35:14 pm »
Nice work.  8) I like it. :D

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New plugin committed
« Reply #13 on: April 18, 2006, 09:35:21 pm »
Quote
How and when are other devs supposed to contribute (e.g. translate all other templates into wizards)? As a patch?

Initially I 'd like to identify potential pitfalls/shortcomings and fix them. Then we can convert the file-based templates to scripts :).
So if something seems to be missing here, please discuss it.

Quote
I'm thinking about the compiler framework overhaul here...?! (Because I believe the wizards will be changed slightly once this is done.)

Most probably, only the way of setting compiler options might need update, i.e. not much.
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: New plugin committed
« Reply #14 on: April 18, 2006, 09:49:57 pm »
So if something seems to be missing here, please discuss it.
Ok, understood. From my point of view - after converting SmartWin and FLTK, too ;-) - I can say that for these examples it works very well... If you think of the wizards as a help for:
1.) setting up the and verify example requirements (headers, libs...),
2.) settings up and verifying the dev environment (Win/Linux/...; GCC/MSVC...) and then
3.) providing a readily setup, compilable and easy-to-understand example piece of code
I personally couldn't think of anything missing. But maybe I've chosen the easy ones... :oops:
Is there anything else the wizards could be good for that should be pointed out here?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ