Author Topic: Patches to compile and link C::B against wxWidgets 2.8.0  (Read 87877 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #90 on: December 27, 2006, 05:32:26 pm »
I even was able to run it, and at first glance very disappointed !!
In wx263 they introduced (apparently only on windows, since on linux it looks ok) the 'misalignment' of menus  [entries with and without icons], were that was ok in wx 262. But breaking interfaces in wx 2.8 and deprecating stuff, plenty, but fixing the bugs they have introduced, hell no :-( :-( :-(

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #91 on: December 27, 2006, 05:57:02 pm »
I applied most of the patches in svn, some I did local on my machine [the scripting one and the cbp's and for selecttarget I have disabled the event handler mapping to the old OnOK for the moment ] => I can build except wxSmith. Any news on that one ?

I have a patch for the new wxSmith, I have decided the old one is not worth the effort to fix. Also, I spent several hours and failed to find a fix for it. EDIT: An experienced wxWidgets and C++ person could maybe see a solution for it quickly, but it stumped me.
The patch for the new wxSmith is here.
[ Patch #1702 ] patch to the (correction in title) [NEW] wxSmith to use wxPropertyGrid version 1.2.x
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1702&group_id=5358

Note: the above patch patches for wxWidgets 2.8.0 and for use with wxPropertyGrid version 1.2.x; it still works with the old wxPropertyGrid 1.0.6 that C::B is currently using.

EDIT: I just reviewed my solution for the new wxSmith and it gave me idea on fixing the old wxSmith, so I am going to try again.

EDIT: created new patch for new wxSmith for wxWidgets 2.8 issues.
 [ Patch #1766 ] NEW (experimental) wxSmith patch for wxWidgets 2.8 Submitted By: stahta01
  https://developer.berlios.de/patch/?func=detailpatch&patch_id=1766&group_id=5358

Tim S
« Last Edit: December 27, 2006, 10:26:52 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 SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #92 on: December 27, 2006, 08:23:36 pm »
Are the sources for the new wxSmith available somewhere? I cannot find them :-)
Code::Blocks package maintainer for Fedora and EPEL

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #93 on: December 27, 2006, 08:27:25 pm »
Are the sources for the new wxSmith available somewhere? I cannot find them :-)

How to get the new wxSmith is here
http://forums.codeblocks.org/index.php?topic=3765.msg33855#msg33855

Here's the last window checkout command I used.

SET PATH=C:\Program Files\Subversion\bin
CD codeblocks\src\plugins\contrib
svn checkout svn://svn.berlios.de/codeblocks/branches/New_wxSmith New_wxSmith

Tim S
« Last Edit: December 27, 2006, 08:51:12 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: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #94 on: December 27, 2006, 10:21:05 pm »
I applied most of the patches in svn, some I did local on my machine [the scripting one and the cbp's and for selecttarget I have disabled the event handler mapping to the old OnOK for the moment ] => I can build except wxSmith. Any news on that one ?


The patch for the OLD wxSmith, note I don't use wxSmith so needs testing.
 [ Patch #1767 ] Old wxSmith patch for wxWidgets 2.8
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1767&group_id=5358

Tim S
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 David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #95 on: December 28, 2006, 12:30:20 pm »
I am using the latest svn version now, but I still can't compile against 2.8. There seems to be a problem with the wxStartTime() and wxGetElapsedTime() (or something like that) in wxScintella. Those functions are deprecated (according to the documentation) but do not exist in the header files of wx.
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #96 on: December 28, 2006, 05:32:44 pm »
I am using the latest svn version now, but I still can't compile against 2.8. There seems to be a problem with the wxStartTime() and wxGetElapsedTime() (or something like that) in wxScintella. Those functions are deprecated (according to the documentation) but do not exist in the header files of wx.

Have you applied the patches in the first message in this thread?
http://forums.codeblocks.org/index.php?topic=4495.msg35563#msg35563

Added patches needed below.

Patches to Code::Blocks projects files (Needed by windows Users ONLY):
 [ Patch #1733 ] wxmsw28 patch for wxWidgets 2.8
   https://developer.berlios.de/patch/?func=detailpatch&patch_id=1733&group_id=5358
 
Patches to core Code::Blocks project:
 [ Patch #1737 ] selecttargetdlg patch for wxWidgets 2.8 Submitted By: stahta01
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1737&group_id=5358
 [ Patch #1731 ] scripting patch for wxWidgets 2.8
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1731&group_id=5358

Patches to contrib Code::Blocks projects:
[ Patch #1732 ] keybinder plugin patches for wxWidgets 2.8 Submitted By: stahta01 based on afb work.
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1732&group_id=5358

I am assuming Win XP and unicode is this correct?

How did you get wxWidgets 2.8.0? They had some issues packaging it, I downloaded the file wxMSW-2.8.0.tar.bz2.

Tim S
« Last Edit: December 28, 2006, 06:29:52 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: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #97 on: December 28, 2006, 06:02:27 pm »
I am using the latest svn version now, but I still can't compile against 2.8. There seems to be a problem with the wxStartTime() and wxGetElapsedTime() (or something like that) in wxScintella. Those functions are deprecated (according to the documentation) but do not exist in the header files of wx.

Please verify the following is set to 1 in lib\gcc_dll\mswu\wx\setup.h

wxUSE_LONGLONG
WXWIN_COMPATIBILITY_2_6

They guard the code in wx/stopwatch.h

Tim S
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 David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #98 on: December 28, 2006, 06:04:39 pm »
I didn't apply those patches, the first one, I didn't see :P so I did it by hand ;)
The other two are not relevant to the problem (I think)

I use XP and wx unicode build. I got the wxALL-2.8.0.something (don't know exactly).

I will look to the WXWIN_COMPATIBILITY_2_6. Most likely that is the problem :)

*Edit* That was the problem. I had compiled it without 2.6 compatibility...
« Last Edit: December 28, 2006, 06:59:16 pm by mispunt »
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #99 on: December 29, 2006, 12:38:18 am »
The patch for the OLD wxSmith for wxWidgets 2.8.0 bug
 [ Patch #1771 ] Old wxSmith patch for wxListbook::HitTest protected wxW2.8
  https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1771&group_id=5358

I just found out today that I was NOT testing with the final release of wxWidgets 2.8.0; when I changed I got an new error in the old wxSmith fix above.

Tim S
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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #100 on: December 29, 2006, 07:16:05 pm »
RE: patch1732 to keybinder.

Looking at defs.h for 2.8.0,
Code
    WXK_PAGEUP,
    WXK_PAGEDOWN,
#if WXWIN_COMPATIBILITY_2_6
    WXK_PRIOR = WXK_PAGEUP,
    WXK_NEXT  = WXK_PAGEDOWN,
#endif

I don't get the purpose of the patch unless the intent is to run without 2.6 compatibilty.

Even if that were true, the patch hacks the problem and causes others (since new code will have to be written to avoid current dependency on wxk_prior/next).

Any explanation?


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #101 on: December 29, 2006, 08:59:14 pm »
RE: patch1732 to keybinder.

Looking at defs.h for 2.8.0,
Code
    WXK_PAGEUP,
    WXK_PAGEDOWN,
#if WXWIN_COMPATIBILITY_2_6
    WXK_PRIOR = WXK_PAGEUP,
    WXK_NEXT  = WXK_PAGEDOWN,
#endif

I don't get the purpose of the patch unless the intent is to run without 2.6 compatibilty.

Even if that were true, the patch hacks the problem and causes others (since new code will have to be written to avoid current dependency on wxk_prior/next).

Any explanation?



The values need to be gated by WXWIN_COMPATIBILITY_2_6 because they are being used in a switch statement, if NOT done you get a compile error on duplicate CASE values.

Tim S
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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #102 on: December 29, 2006, 10:06:38 pm »

The values need to be gated by WXWIN_COMPATIBILITY_2_6 because they are being used in a switch statement, if NOT done you get a compile error on duplicate CASE values.

Tim S

Yes, I finally get it. Commit 3440.
This does not mean that keyBinder will work properly with 2.8.
It just means no compiler errs.
 

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #103 on: December 29, 2006, 10:25:03 pm »
We know, the most of the patches are to avoid compiler errors.

In fact, is it true that icons on the toolbar that should be grey, are invisible (well they are grey, but most of the time the whole area of the icon is dark grey)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #104 on: January 01, 2007, 01:35:17 am »
Number of Warnings is from Windows XP Unicode wxW2.8 CVS Label WX_2_8_MICROFIX_BRANCH;
  compiled with minGW GCC 3.4.2 API 3.8

Terms:
  Main: the code compiled by project file CodeBlocks.cbp
  Contrib: the code compiled by workspace file ContribPlugins.workspace
  SDK: the code under folder src/sdk
  Main Plugins:the code under src/plugins, but NOT under src/plugins/contrib
  Contrib Plugins:the code under src/plugins/contrib
  Core: the code under src/src

Code
Number      Area       
 87         Main
 22         Contrib
109         Total

Code
Number      Section
  7         SDK/wxscintilla
 13         SDK/wxPropertyGrid
  6         SDK/wxFlatNotebook
 24         SDK other
  8         Core
 14         MainPlugins/Compiler
  4         MainPlugins/Debugger
  3         MainPlugins/Code-completion
  2         MainPlugins/Class wizard
  4         MainPlugins/Scripted wizard
  2         MainPlugins/To-do
  3         ContribPlugins/EnvVars Plug-In
  5         ContribPlugins/C::B KeyBinder
  8         ContribPlugins/Exporter/wxPdfDocument
  6         ContribPlugins/wxSmith


Sections NOT worth patching because section is maintained by external group
    SDK/wxscintilla
    SDK/wxPropertyGrid
    SDK/wxFlatNotebook
    ContribPlugins/Exporter/wxPdfDocument

 Note: I am working on a patch to upgrade wxPropertyGrid to a newer version 1.2.x

Deprecated methods NOT worth patching as long as C::B uses wxWidgets 2.6.x
  wxWindow::SetBestFittingSize
  wxWindow::GetBestFittingSize
  wxPathList::Member
  wxRect::Inside
  ::wxGetAccelFromString

Note: I plan to patch the MainPlugin/Compiler use of deprecated methods wxStartTimer & wxGetElapsedTime in a separate patch.

Totals after warning reduction patches and module upgrade patches applied
[Totals being ran at current time, will update totals after run is done.]
Code
Number      Area       
 29         Main
 22         Contrib
 51         Total

Code
Number      Section
  7         SDK/wxscintilla
  0         SDK/wxPropertyGrid
  6         SDK/wxFlatNotebook
  1         SDK other
  4         Core
  7         MainPlugins/Compiler
  3         MainPlugins/Debugger
  1         MainPlugins/Code-completion
  0         MainPlugins/Class wizard
  0         MainPlugins/Scripted wizard
  0         MainPlugins/To-do
  3         ContribPlugins/EnvVars Plug-In
  5         ContribPlugins/C::B KeyBinder
  8         ContribPlugins/Exporter/wxPdfDocument
  6         ContribPlugins/wxSmith


Tim S
« Last Edit: January 08, 2007, 07:17:23 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