Author Topic: Updating Scripted Wizard for wxWidgets-3.0.0  (Read 24149 times)

Offline Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
Updating Scripted Wizard for wxWidgets-3.0.0
« on: October 21, 2013, 04:23:40 pm »
Hi.

Here is a quick patch to allow the creation of projects using wxWidgets-3.0.x

If one can test.
I think there are thing to improve (for example, libs "wxDbGrid", "wxOdbc", are no more available with wx-3.0), but it is working yet.

Regards
Xav'
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/

Offline Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #1 on: October 21, 2013, 08:26:04 pm »
And for those who want to test it, attached is a modified version of the script file.

You must place this file in the following :
<CodeBlocks_Install_Dir>\share\CodeBlocks\templates\wizard\wxwidgets\

Regards

Xav'
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #2 on: October 22, 2013, 03:58:05 am »
Hi, Xaviou.
Some off topic, I see your site: http://mywxstuff.olympe.in/?/libs/wx300.html offer some pre-build libraries for various compilers and wx versions, that is helpful to wx beginners or some one who is lazy to build wx libraries.  :)

I suggest you should state which compiler version is used, I mean: for TDM-GCC 4.7.1 or TDM-GCC 4.8.1, do you mean the 32bit, sjlj version?

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #3 on: October 22, 2013, 10:03:13 am »
Hi.

Same on me  :-[ but I have to say that I don't really know because I've never specified something like this while compiling.
I always use the default parameters do build my libs (so, I gather that sjlj is used for both 32 and 64 bits).

But you're right : this must be precised as I will soon provide official binaries of the next 3.0.0-rc2 release (and surely for the final 3.0.0 version).
I think I should also precise that this is the default behaviour, for people who doesn't care of this (like me).
And I think I should also precise that the 32 bits binaries are for the 32 bits version of the compiler (and not for the 64 bits version despite the fact it is able to compile 32 bits applications).

Thank-you for pointing this : I'll update the page as soon as possible.

Regards

Xav'
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #4 on: November 13, 2013, 03:25:43 pm »
Hi.

Same on me  :-[ but I have to say that I don't really know because I've never specified something like this while compiling.
I always use the default parameters do build my libs (so, I gather that sjlj is used for both 32 and 64 bits).

The SJLJ is based on the Compiler Used.

IIRC, The standard MinGW GCC using Dwarf2.
The normal TDM  MinGW GCC uses SJLJ.

If I do the below command in the Compiler bin folder.
Code
gcc -v

Two of the many things I get is this
Code
--enable-sjlj-exceptions
Code
gcc version 4.8.1 (tdm-1)

Tim S.
« Last Edit: November 13, 2013, 03:28:53 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Andriy

  • Single posting newcomer
  • *
  • Posts: 2
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #5 on: November 30, 2013, 01:04:38 am »
Thank you, Xaviou! Code::Blocks + wxWidgets 3.0.0 is what I needed.

bongbang

  • Guest
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #6 on: December 24, 2013, 10:57:31 pm »
Is this supposed to add a wxWidgets-3.0.x option in the wizard? If so, it isn't working for me after putting the patch in the specified folder.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #7 on: December 28, 2013, 04:01:35 pm »
C::B 13.12 should have this already...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #8 on: January 19, 2014, 08:16:31 am »
I have been testing the Scripted Wizard when CB is built with wxWidgets 3.0 and found an issue.

This patch fixes the Intro display screen (for CB Plugin Wizard) from being cut-off to soon.
I have tested with wxWidgets 3.0 32 bit only on Windows.

I have only tested the CB Plugin Wizard; too tired to test the others tonight.
 

Code
Index: src/plugins/scriptedwizard/infopanel.cpp
===================================================================
--- src/plugins/scriptedwizard/infopanel.cpp (revision 9575)
+++ src/plugins/scriptedwizard/infopanel.cpp (working copy)
@@ -27,7 +27,7 @@
  //(*Initialize(InfoPanel)
  Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
  BoxSizer1 = new wxBoxSizer(wxVERTICAL);
- lblIntro = new wxStaticText(this, ID_STATICTEXT1, _("Welcome to the new console application wizard!\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE, _T("ID_STATICTEXT1"));
+ lblIntro = new wxStaticText(this, ID_STATICTEXT1, _("Welcome to the new console application wizard!\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
  BoxSizer1->Add(lblIntro, 1, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 8);
  chkSkip = new wxCheckBox(this, ID_CHECKBOX1, _("Skip this page next time"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
  chkSkip->SetValue(false);
« Last Edit: January 19, 2014, 08:18:16 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #9 on: January 19, 2014, 07:39:48 pm »
This patch fixes the Intro display screen (for CB Plugin Wizard) from being cut-off to soon.
You patched a wxSmith code portion. This is no good, or should at least also include the actual change to be done in the wxs file... :)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #10 on: January 19, 2014, 08:36:15 pm »
This patch fixes the Intro display screen (for CB Plugin Wizard) from being cut-off to soon.
You patched a wxSmith code portion. This is no good, or should at least also include the actual change to be done in the wxs file... :)

OK, will try to figure out wxSmith well enough to find out where to do the changes; or split the code off.
It depends on the reason this method "SetIntroText" exists in the class "InfoPanel".
It might is easier to redo/restructure the class to fix it instead of just changing the constant to zero.

As it is the method "SetIntroText" fails wxWidgets 3.0 looks like they fixed a 2.8 bug that causes it to fail.

Will likely be a few weeks for me to learn enough wxWidgets/wxSmith to find the correct place to fix it.

Just wish to verify "//(*Initialize(InfoPanel)" this comment is what says its a wxSmith issue, correct?

Tim S.

« Last Edit: January 19, 2014, 08:40:34 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Updating Scripted Wizard for wxWidgets-3.0.0
« Reply #11 on: January 19, 2014, 09:10:25 pm »
I have gotten the wxSmith file added to the CB Project.
Now, I have to figure out how to edit it.

@MortenMacFly: Can you verify this is the right way to add the file and its the right file to add?
Looks like, I did NOT need to add the .wxs file like the debug ones were. I just needed to find the correct wxSmith GUI to do the changes.

Tim S.

Figured out how to do the changes from http://wiki.codeblocks.org/index.php?title=Wxsmith_tutorial:_Working_with_items#wxPanel


Code
Index: src/wxsmith/InfoPanel.wxs
===================================================================
--- src/wxsmith/InfoPanel.wxs (revision 9582)
+++ src/wxsmith/InfoPanel.wxs (working copy)
@@ -6,7 +6,6 @@
  <object class="sizeritem">
  <object class="wxStaticText" name="ID_STATICTEXT1" variable="lblIntro" member="yes">
  <label>Welcome to the new console application wizard!&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;&#x0A;</label>
- <style>wxST_NO_AUTORESIZE</style>
  </object>
  <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>8</border>




Tim S.
« Last Edit: January 19, 2014, 10:16:46 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org