Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Modified & Improved wxWidgets Project Wizard
Biplab:
--- Quote from: rjmyst3 on February 19, 2007, 03:11:50 pm ---It would be pretty easy for wxFB to change to this:
--- Code: ---#if ( defined(WX_GCH) || defined(USE_PCH) )
#include <wx_pch.h>
#else
#include <wx/wx.h>
#endif
--- End code ---
That way existing projects setup with WX_GCH would not break, but it should also work the with Code::Blocks wizard.
--- End quote ---
Yes! This will work. But I'll request you to NOT to add this immediately. Because I'm not sure about wxSmith. These three options need a common Pre-processor define to avoid this problem. :D
--- Quote from: rjmyst3 on February 19, 2007, 03:11:50 pm ---Customization would be better, probably, but I'll need to talk to the other devs about adding a property.
--- End quote ---
This would be a nice addition. :)
byo:
--- Quote from: Biplab on February 19, 2007, 08:06:50 am ---@byo
Can you please provide me with two project files, one for Dialog based and one for Frame based? Please include wxs file, cpp and header files. :)
--- End quote ---
Project file for wxDialog-based app is in attachment :) I've added some content into dialog since wxDialog can not have menus nor toolbars
--- Quote from: Biplab on February 19, 2007, 04:27:55 pm ---Yes! This will work. But I'll request you to NOT to add this immediately. Because I'm not sure about wxSmith. These three options need a common Pre-processor define to avoid this problem. :D
--- End quote ---
wxSmith uses the same scheme as in current wizard, this can be changed without any harm to wxSmith's behaviour. Maybe current content of files could be tweaked a little bit because wxSmith always generates list of includes in source/header files - these could be disabled when using PCH by putting inside #if block. wxSmith should easily handle this :)
Regards
BYO
[attachment deleted by admin]
Biplab:
--- Quote from: byo on February 19, 2007, 10:05:24 pm ---Project file for wxDialog-based app is in attachment :) I've added some content into dialog since wxDialog can not have menus nor toolbars
--- End quote ---
Many Thanks to You, Byo! :D
I'll add the same contents to wxFormBuilder, too. ;)
--- Quote from: byo on February 19, 2007, 10:05:24 pm ---wxSmith uses the same scheme as in current wizard, this can be changed without any harm to wxSmith's behaviour. Maybe current content of files could be tweaked a little bit because wxSmith always generates list of includes in source/header files - these could be disabled when using PCH by putting inside #if block. wxSmith should easily handle this :)
--- End quote ---
OK, I'll change the PCH Pre-processor definition to WX_PRECOMP. This is also supported by wxFormBuilder. As wxSmith can use it easily, this could solve our problem.
@rjmyst3
As byo wrote that wxSmith can support WX_PRECOMP Pre-processor definition without any problem, I'll go ahead with it.
The following code, in the generated header, should not be a problem. AFAIK, if you wish to use this header to create Pre-Compiled Header then the following code is necessary, otherwise Not. IMHO, the following code is bit redundant.
--- Code: ---#ifdef WX_GCH
#include <wx_pch.h>
#else
#include <wx/wx.h>
#endif
--- End code ---
During compilation of cpp file, this code may not play a big role. :)
Regards,
Biplab
rjmyst3:
--- Quote ---IMHO, the following code is bit redundant.
--- Code: ---#ifdef WX_GCH
#include <wx_pch.h>
#else
#include <wx/wx.h>
#endif
--- End code ---
During compilation of cpp file, this code may not play a big role.
--- End quote ---
I tend to agree, but I didn't create it and I don't know enough, yet. I've posted about it on our forum, and am researching, so hopefully I'll figure it out soon.
Anyway, I'm looking forward to the wizard, thanks for your work! :D
byo:
I've managed to add extra function to squirrel (was pretty easy using SqPlus - this lib rocks 8) ). Currently new function only popups dialog with parameters passed to it but for testing purposes it works like a charm :D
I've used this code in script:
--- Code: ---local ProjectName = Wizard.GetProjectName();
WxsAddWxExtensions(project,ProjectName+_T("App.cpp"),ProjectName+_T("Main.cpp"),ProjectName+_T("Main.h"),_T("wxsmith/")+ProjectName+_T("dialog.wxs"));
--- End code ---
(The last parameter may need some update since the file may be little bit different)
I've checked and if function is not registered, wizard works fine as long as function is not called (even if it's used in script's source) so we can be sure that even if wxSmith is not loaded, wizard will work fine as long as there's no wxSmith RAD selected.
The only thing I haven't found out yet is how to check if WxsAddWxExtensions function is defined using script's code - if it's not, wxSmith RAD should be disabled (or it should show some message).
Regards
BYO
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version