Author Topic: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0  (Read 22289 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
This a work in Progress

I am working on adding the Patches needed to Build Code::Blocks linking against the soon to be released,
wxWidgets 2.9.0 development build.

Tim S

Current Status is: 3. Code::Blocks Opens and Closes without crashing using safe-mode option

The Status Testing:
Code: [Select]
1. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with POD Warnings
2. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with-out POD Warnings
3. Code::Blocks Opens and Closes without crashing using safe-mode option
4. Code::Blocks Opens and Closes without crashing without using safe-mode option
5. Code::Blocks Compiles Itself.


Types of Patches
Code: [Select]
1. Code::Blocks Design Change Patches
2. Code::Blocks Implementation Change Patches
3. wxWidgets 2.9 required POD Warning Fixes Patches
4. wxWidgets 2.9 required design Change Patches
5. wxWidgets 2.9 optional deprecation Change Patches
« Last Edit: May 03, 2009, 03:51:21 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #1 on: May 03, 2009, 04:08:15 am »
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #2 on: May 03, 2009, 04:16:07 am »
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)

That explains why my patches needed updating; last updated them about two months ago.

The Compiler is likely crashing because it is trying to open an GUI window before the GUI event handler is finished being initialized. Never, took the time to trace the cause; was hoping it would go away before 2.9.0 release, but not going to happen.

Tim S
« Last Edit: May 03, 2009, 04:27:48 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #3 on: May 03, 2009, 04:52:56 am »
Command, I Used, to build wxWidgets 2.9.0 RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/

Still Testing These Options, but should work.

While working on Patches to Source Code will be using wxUSE_STC=0 and USE_STC=0 to avoid Build Errors because of two wxscintilla libs.


Code: [Select]
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CPPFLAGS="-Wmissing-include-dirs"

Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"

Required for wxSmith: USE_PROPGRID=1

Patch to Code::Blocks needed if NOT wxUSE_STC=0 and USE_STC=0
Edit: Changed Patch to see if this one works better, than last one.
Code: [Select]
Patch Fails to work too often to be maintained.
« Last Edit: October 25, 2009, 09:33:29 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #4 on: May 03, 2009, 05:53:21 am »
Command, I Used, to build wxWidgets 2.9.0 RC2

Still Testing These Options, but should work.

Code: [Select]
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 LDFLAGS="-enable-stdcall-fixup" CXXFLAGS="-fno-strict-aliasing" CPPFLAGS="-Wmissing-include-dirs"

Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"

Required for wxSmith: USE_PROPGRID=1


Didn't notice that RC2 is out.

I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #5 on: May 03, 2009, 06:07:28 am »
My Patch for Core Code::Blocks non-POD type warnings is to change c_str() to wx_str() this needs tested on more systems I have only tested On Windows XP. An wxWidget's person said this is not a fix that can work everywhere, but it is the simplest one I found for windows.
 
Tim S

Quote
warning: cannot pass objects of non-POD type ...
call will abort at runtime

This patch needs Tested under Linux to confirm it works
Code: [Select]
Deleted patch to save space.
« Last Edit: June 19, 2009, 01:55:05 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #6 on: May 03, 2009, 06:19:11 am »
First Patch needed to get Core Code::Blocks to Compile using wxWidgets 2.9.0 and MinGW GCC 4.40

Code: [Select]
Deleted to save space.
« Last Edit: June 19, 2009, 01:55:48 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #7 on: May 03, 2009, 06:30:54 am »

Didn't notice that RC2 is out.

I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.

At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.

Link to wxWidgets RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #8 on: May 03, 2009, 07:30:40 am »
Tim,

I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.

Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.

Thanks for your good work and keep posting patches. :)

Regards,

Biplab
« Last Edit: May 03, 2009, 07:35:37 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #9 on: May 03, 2009, 07:54:19 am »
Tim,

I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.

Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.

Thanks for your good work and keep posting patches. :)

Regards,

Biplab

FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

Once, I get the patches that break wxWidgets 2.8 will wrap with wxCHECK_VERSION().
Note, I will only be checking, against wxWidgets 2.8.4, after I get Code::Blocks Core to compile and Link; still working on that.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #10 on: May 03, 2009, 08:27:19 am »
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #11 on: May 03, 2009, 09:00:03 am »
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.

The header file has it in it. It was depreciated, I am guessing, when the 2.0 series was released.

I can add guards but they are not really needed.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #12 on: May 03, 2009, 10:59:49 am »
@Biplab:

Possible method to add wx_str().

Does the following method meet with your OK?

Code: [Select]
Deleted to save space
« Last Edit: June 19, 2009, 01:56:44 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #13 on: May 03, 2009, 05:00:23 pm »
At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.
FYI, this was only true for the 4.2 series; it has been fixed as of the 4.3 series.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #14 on: May 03, 2009, 05:39:39 pm »
@Biplab:

Possible method to add wx_str().

Does the following method meet with your OK?

I'd prefer to have relevant code guarded with wxCHECK_VERSION. I'd prefer not to use prep.h for this.

FYI, I've patched most of the Core and Core Plugin code to ensure that build works fine. There are still many areas where I've missed out (as compiler didn't emit any warning).
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #15 on: May 03, 2009, 08:15:03 pm »
@Biplab:

Ok, Will do the rest of C::B Plugins using wxCHECK_VERSION() around wx_str() and C_str().

My Method is to use wxWidgets version of wxPropertyGrid; which will need OK from wxSmith maintainer.
Will submit the wxSmith patch as separate file from rest. And, I am not sure how to do this using wxCHECK_VERSION() so will likely take time to work on some parts of wxSmith patch.

Note: I am currently getting new error, less that two months old, on shutting in down Code::Blocks.
I plan to work on finding this error before doing the wxSmith patch.

Tim S

PS: Waiting for a rebuild of wxWidgets 2.9.0 RC2 to finish patches.
« Last Edit: May 03, 2009, 09:51:23 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #16 on: May 04, 2009, 12:36:12 am »
Patch to Contrib envvars attached to message.
Deleted patch to save space.

Not had time to test under wxWidgets 2.8, but compiles under wxWidgets 2.9.0 RC2.

Tim S


Note: The file also contains patch to devpak_plugin
« Last Edit: June 19, 2009, 01:57:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #17 on: May 04, 2009, 01:46:39 am »
Patch to Contrib ThreadSearch
Tim S

Code: [Select]
Index: src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (revision 5585)
+++ src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (working copy)
@@ -491,7 +491,11 @@
 
  wxFocusEvent ev(wxEVT_SET_FOCUS);
  ev.SetWindow(this);
+ #if wxCHECK_VERSION(2, 9, 0)
+ control->GetEventHandler()->AddPendingEvent(ev);
+ #else
  control->AddPendingEvent(ev);
+ #endif
  }
 }
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #18 on: May 04, 2009, 01:49:13 am »
Patch to lib_finder attached to this message.

Deleted Patch to save website resources

« Last Edit: June 18, 2009, 02:04:47 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #19 on: May 04, 2009, 02:04:54 am »
Patches Still Needed for
  Profiler
  Exporter
  Games
  Code Snippets
  DragScroll
  wxSmith
  wxSmith - Contrib Items


Note: I am working currently on a very large patch for wxSmith
« Last Edit: May 07, 2009, 08:23:41 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #20 on: May 04, 2009, 02:10:37 am »
Patch to Contrib DragScroll
Tim S

Code: [Select]
Index: src/plugins/contrib/dragscroll/dragscroll.cpp
===================================================================
--- src/plugins/contrib/dragscroll/dragscroll.cpp (revision 5585)
+++ src/plugins/contrib/dragscroll/dragscroll.cpp (working copy)
@@ -977,7 +977,11 @@
         wheelEvt.SetEventObject(pWindow);
         wheelEvt.m_controlDown = true;
         wheelEvt.m_wheelRotation = 0;
+        #if wxCHECK_VERSION(2, 9, 0)
+        pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+        #else
         pWindow->AddPendingEvent(wheelEvt);
+        #endif
     }while(0);
 
     // Issue SetFont() for saved font sizes on our monitored windows
@@ -1006,7 +1010,11 @@
                 wheelEvt.SetEventObject(pWindow);
                 wheelEvt.m_controlDown = true;
                 wheelEvt.m_wheelRotation = 0;
+                #if wxCHECK_VERSION(2, 9, 0)
+                pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+                #else
                 pWindow->AddPendingEvent(wheelEvt);
+                #endif
                 #if defined(LOGGING)
                 //LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event 0[%p]size[%d]"),pWindow, fontSize);
                 #endif
@@ -1143,7 +1151,11 @@
                     wheelEvt.SetEventObject(pWindow);
                     wheelEvt.m_controlDown = true;
                     wheelEvt.m_wheelRotation = 0; //set user font
+                    #if wxCHECK_VERSION(2, 9, 0)
+                    pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+                    #else
                     pWindow->AddPendingEvent(wheelEvt);
+                    #endif
                     #if defined(LOGGING)
                     //LOGIT( _T("OnWindowOpen Issued htmlWindow Zoom event"));
                     #endif
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #21 on: May 04, 2009, 02:33:46 am »
Got to do School Work Now; be a week before I can do any major work.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #22 on: May 04, 2009, 02:34:10 am »
My Method is to use wxWidgets version of wxPropertyGrid; which will need OK from wxSmith maintainer.
Will submit the wxSmith patch as separate file from rest. And, I am not sure how to do this using wxCHECK_VERSION() so will likely take time to work on some parts of wxSmith patch.

Please go ahead with the patch. No objections to that.

I didn't read the code; but you can do it like-
Code: [Select]
#if wxCHECK_VERSION(2, 9, 0)
#include <wx/propgrid/propgrid.h>
#else
#include "propgrid/propgrid.h"
#endif

As long as the API remain unchanged, this should do. I'll commit rest of your patches tonight. :)
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #23 on: May 04, 2009, 04:26:36 am »
As long as the API remain unchanged, this should do. I'll commit rest of your patches tonight. :)

There was a change in wxPropertyGrid API.

Three clear and separate ways to proceed.
1. Wait till wxWidgets 3.0 is released before doing wxSmith
2. Upgrade wxSmith to using a newer wxPropertyGrid more compatible with wxWidgets 2.9 wxPropertyGrid
3. Add Patches to wxSmith guarded by both wxCHECK_VERSION and wxPropertyGrid version guard.

I plan to do option 3 add guards based on wxPropertyGrid version and wxWidgets version.
Edit: I am going to try with just wxCHECK_VERSION for now.
If option 2 is taken will likely need to use wxCHECK_PROPGRID_VERSION in addition.

Option 3 Failed with about 6 API changes where I could not determine the correct action.

Planning on doing a very limited patch of current wxPropertyGrid.
Will try to use the below to make wxPropertyGrid more like wxWidgets 2.9 version
#define wxPG_PGVARIANT_IS_VARIANT
#define wxPG_ID_IS_PTR 1




Tim S

« Last Edit: May 04, 2009, 06:45:16 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #24 on: May 04, 2009, 09:23:48 am »
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
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 stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #25 on: May 04, 2009, 09:38:49 am »
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.

I have three separate patches for wxSmith. Rewriting with guards takes time.
1. Normal wxWidgets 2.9 changes
2. wxPropertyGrid API changes
No idea of best way to do the below, I am thinking make separate CB Project to
build/not build wxPropertyGrid.
3. Build changes (remove wxPropertyGrid code from Code::Blocks to test wxWidgets 2.9)
Write patch to do step 4.
4. Upgrade CB wxPropertyGrid to newer API used by wxWidgets 2.9 to support CB with wxWidgets 2.8

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #26 on: May 04, 2009, 04:34:48 pm »
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.

I don't want to remove wxpropgrid sources now. Rather I want to make wxsmith ready to work with wxWidgets 2.9. As I've been doing so far, all wx-2.9 migration patches are to be guarded by wxCHECK_VERSION to avoid breaking present compatibility with wx-2.8.x. As long as we support wx-2.8.x we can't remove wxpropgrid from trunk.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
« Last Edit: May 07, 2009, 08:23:13 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #28 on: May 05, 2009, 08:48:53 pm »
Guarded Patch to devpak. Tim S

Code: [Select]
Index: src/plugins/contrib/devpak_plugin/mytar.cpp
===================================================================
--- src/plugins/contrib/devpak_plugin/mytar.cpp (revision 5588)
+++ src/plugins/contrib/devpak_plugin/mytar.cpp (working copy)
@@ -19,7 +19,11 @@
     m_SkipBytes(0),
     m_Size(0)
 {
+    #if wxCHECK_VERSION(2, 9, 0)
+    if (!filename.IsEmpty())
+    #else
     if (filename)
+    #endif
         Open(filename);
 }
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #29 on: May 05, 2009, 08:56:45 pm »
Patch to Games

Code: [Select]
Index: src/plugins/contrib/byogames/byosnake.cpp
===================================================================
--- src/plugins/contrib/byogames/byosnake.cpp (revision 5588)
+++ src/plugins/contrib/byogames/byosnake.cpp (working copy)
@@ -300,7 +300,11 @@
     DC->SetTextBackground(*wxBLACK);
     DC->SetFont(m_Font);
     wxString Line1 = wxString::Format(_("Lives: %d    Score: %d   Length: %d"),m_Lives,m_Score,m_SnakeLen);
+    #if wxCHECK_VERSION(2, 9, 0)
+    wxString Line2 = IsPaused() ? wxString(_("Paused")) : wxString(wxEmptyString);
+    #else
     wxString Line2 = IsPaused() ? _("Paused") : wxEmptyString;
+    #endif
     wxString Line3 = GetBackToWorkString();
     DC->DrawText(Line1,5,5);
     int xs, ys;
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #30 on: May 05, 2009, 09:04:35 pm »
Patch for profiler; I did not add wx version guards do you want me to? Tim S


Code: [Select]
Index: src/plugins/contrib/profiler/cbprofilerexec.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofilerexec.cpp (revision 5588)
+++ src/plugins/contrib/profiler/cbprofilerexec.cpp (working copy)
@@ -165,7 +165,7 @@
     // Parsing Call Graph
     for (n = begin ; n < msg.GetCount(); ++n )
     {
-        if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+        if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
             break;
         outputCallGraphArea->InsertItem(next,_T(""));
         char first_char = msg[n].GetChar(0);
@@ -209,7 +209,7 @@
     wxString output_help;
     for ( ; n < msg.GetCount(); ++n )
     {
-        if (msg[n].Find(0x0C) != -1)
+        if (msg[n].Find(wxChar(0x0C)) != -1)
             break;
         output_help << msg[n] << _T("\n");
         progress.Update((100*n)/(msg.GetCount()-1));
@@ -247,7 +247,7 @@
     // Parsing Call Graph
     for (n = begin ; n < msg.GetCount(); ++n )
     {
-        if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+        if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
             break;
         long item = outputFlatProfileArea->InsertItem(next,_T(""));
         outputFlatProfileArea->SetItemData(item, next);
@@ -312,7 +312,7 @@
     // Printing Flat Profile Help
     for ( ; n < msg.GetCount(); ++n )
     {
-        if (msg[n].Find(0x0C) != -1)
+        if (msg[n].Find(wxChar(0x0C)) != -1)
             break;
         output_help << msg[n] << _T("\n");
         progress.Update((100*n)/(msg.GetCount()-1));
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #31 on: May 05, 2009, 09:29:41 pm »
Partial patch for CodeSnippets

Code: [Select]
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (working copy)
@@ -1850,7 +1850,11 @@
            #endif
 
             delete filetype;
+            #if wxCHECK_VERSION(2, 9, 0)
+            if ( !open.IsEmpty() )
+            #else
             if ( open )
+            #endif
                 ::wxExecute( open, wxEXEC_ASYNC);
         }
     }
@@ -2154,7 +2158,11 @@
             {
                 SetAssociatedItemID( treeItemID );
                 wxCommandEvent editEvt( wxEVT_COMMAND_MENU_SELECTED , idMnuEditSnippet);
+                #if wxCHECK_VERSION(2, 9, 0)
+                GetConfig()->GetSnippetsWindow()->GetEventHandler()->AddPendingEvent( editEvt);
+                #else
                 GetConfig()->GetSnippetsWindow()->AddPendingEvent( editEvt);
+                #endif
             }
         }
     }//if id
Index: src/plugins/contrib/codesnippets/snippetsconfig.cpp
===================================================================
--- src/plugins/contrib/codesnippets/snippetsconfig.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/snippetsconfig.cpp (working copy)
@@ -232,7 +232,11 @@
  cfgFile.Write( wxT("SnippetFolder"),   SettingsSnippetsFolder ) ;
  cfgFile.Write( wxT("ViewSearchBox"),   SettingsSearchBox ) ;
  cfgFile.Write( wxT("casesensitive"),   m_SearchConfig.caseSensitive ) ;
+    #if wxCHECK_VERSION(2, 9, 0)
+ cfgFile.Write( wxT("scope"),           int(m_SearchConfig.scope ));
+    #else
  cfgFile.Write( wxT("scope"),           m_SearchConfig.scope );
+    #endif
  cfgFile.Write( wxT("EditorsStayOnTop"),SettingsEditorsStayOnTop );
  if ( IsPlugin() )
  {   // Write ExternalPersistent for plugin use only
Index: src/plugins/contrib/codesnippets/codesnippetsevent.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetsevent.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetsevent.cpp (working copy)
@@ -95,8 +95,13 @@
     // Propagate the event to ThreadSearchFrame
     if ( pSearchPath && pCodeSnippetsTreeCtrl)
     {
+        #if wxCHECK_VERSION(2, 9, 0)
+        pSearchPath->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+        pCodeSnippetsTreeCtrl->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+        #else
         pSearchPath->AddPendingEvent( (wxEvent&)event );
         pCodeSnippetsTreeCtrl->AddPendingEvent( (wxEvent&)event );
+        #endif
     }
     else
     {
@@ -143,8 +148,13 @@
     // Propagate the event to ThreadSearchFrame
     if ( pSearchPath && pCodeSnippetsTreeCtrl)
     {
+        #if wxCHECK_VERSION(2, 9, 0)
+        pSearchPath->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+        pCodeSnippetsTreeCtrl->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+        #else
         pSearchPath->ProcessEvent( (wxEvent&)event );
         pCodeSnippetsTreeCtrl->ProcessEvent( (wxEvent&)event );
+        #endif
     }
     else
     {
Index: src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (working copy)
@@ -112,7 +112,11 @@
     wxString path = ConfigManager::GetFolder(sdDataUser) + _T("/lexers/");
     if (dir.Open(path))
     {
+        #if wxCHECK_VERSION(2, 9, 0)
+        Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+        #else
         Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+        #endif
         bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
         while(ok)
         {
@@ -128,7 +132,11 @@
     path = ConfigManager::GetFolder(sdDataGlobal) + _T("/lexers/");
     if (dir.Open(path))
     {
+        #if wxCHECK_VERSION(2, 9, 0)
+        Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+        #else
         Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+        #endif
         bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
         while(ok)
         {
@@ -724,7 +732,11 @@
         wxString tmp(_T(' '), keywords.length()); // faster than using Alloc()
 
         const wxChar *src = keywords.c_str();
+        #if wxCHECK_VERSION(2, 9, 0)
+        wxChar *dst = (wxChar *) tmp.wx_str();
+        #else
         wxChar *dst = (wxChar *) tmp.c_str();
+        #endif
         wxChar c;
         size_t len = 0;
 
Index: src/plugins/contrib/codesnippets/editor/scbeditor.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/scbeditor.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/scbeditor.cpp (working copy)
@@ -524,7 +524,11 @@
     event.SetY(yArg);
     //-wxPostEvent(Manager::Get()->GetAppWindow(), event);
     //-Manager::Get()->GetPluginManager()->NotifyPlugins(event);
+    #if wxCHECK_VERSION(2, 9, 0)
+    parent->GetEventHandler()->ProcessEvent(event);
+    #else
     parent->ProcessEvent(event);
+    #endif
 }
 
 void ScbEditor::DestroySplitView()
Index: src/plugins/contrib/codesnippets/editor/dragscroll.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/dragscroll.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/dragscroll.cpp (working copy)
@@ -1056,7 +1056,11 @@
                 wheelEvt.SetEventObject(pWindow);
                 wheelEvt.m_controlDown = true;
                 wheelEvt.m_wheelRotation = 0;
+                #if wxCHECK_VERSION(2, 9, 0)
+                pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+                #else
                 pWindow->AddPendingEvent(wheelEvt);
+                #endif
                 #if defined(LOGGING)
                 LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event [%p][%d][%s]size[%d]"),pWindow, pWindow->GetId(), pWindow->GetName().c_str(),fontSize);
                 #endif
Index: src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (working copy)
@@ -572,7 +572,11 @@
 
                 wxFocusEvent ev(wxEVT_SET_FOCUS);
                 ev.SetWindow(this);
+                #if wxCHECK_VERSION(2, 9, 0)
+                control->GetEventHandler()->AddPendingEvent(ev);
+                #else
                 control->AddPendingEvent(ev);
+                #endif
             }
             return;
         }//if IsOpen
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #32 on: May 05, 2009, 09:46:30 pm »
Patch to export; do you wish me to guard this one?

Code: [Select]
Index: src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp
===================================================================
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (revision 5588)
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (working copy)
@@ -1054,7 +1054,7 @@
     charIter = (*m_gn).find(s[i]);
     if (charIter != (*m_gn).end())
     {
-      t.Append(charIter->second);
+      t.Append(wxChar(charIter->second));
     }
     else
     {
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #33 on: May 07, 2009, 05:54:58 am »
Patch to wxSmithContribItems attached as file. Tim S

Deleted Patch to save website resources
« Last Edit: June 18, 2009, 02:05:58 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #34 on: May 07, 2009, 08:22:20 pm »
Patches to wxSmith for wxWidgets 2.9.0

File wx290_wxSmith_wxAPI-unix.patch patches the wxWidgets 2.9.0 changes
that are not related to wxPropertyGrid or POD warnings.

File wx290_wxSmith_pgAPI-unix.patch patches the wxPropertyGrid changes in wxWidgets 2.9.0.

File wx290_wxSmith_wxAPI_POD-unix.patch patches the cause of POD warnings.

Tim S

Deleted Patches to save website resources
« Last Edit: June 18, 2009, 02:05:44 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #35 on: May 17, 2009, 04:38:34 am »
Patch needed for building using CygWin. Tim S

Code: [Select]
Index: codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h
===================================================================
--- codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (revision 5593)
+++ codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (working copy)
@@ -2067,7 +2067,9 @@
 
 //----------------------------------------------------------------------
 
+#if !wxCHECK_VERSION(2, 9, 0)
 typedef long wxIntPtr; // FIXME: back-port from wx29 (svn) to wx289
+#endif
 
 class WXDLLIMPEXP_SCI wxScintilla : public wxControl {
 public:
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #36 on: June 19, 2009, 02:03:41 am »
Patch needed for lib_finder

Code: [Select]
Index: src/plugins/contrib/lib_finder/lib_finder.cpp
===================================================================
--- src/plugins/contrib/lib_finder/lib_finder.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/lib_finder.cpp (working copy)
@@ -515,7 +515,11 @@
         wxURL UrlData(Url);
         if ( !UrlData.IsOk() )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+            #endif
             continue;
         }
         UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -523,7 +527,11 @@
         wxInputStream* is = UrlData.GetInputStream();
         if ( !is || !is->IsOk() )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+            #endif
             delete is;
             continue;
         }
@@ -531,7 +539,11 @@
         wxFileOutputStream Output(FileName);
         if ( !Output.IsOk() )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.c_str()));
+            #endif
             delete is;
             return false;
         }
@@ -542,7 +554,11 @@
         return ret;
     }
 
+    #if wxCHECK_VERSION(2, 9, 0)
+    LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.wx_str()));
+    #else
     LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.c_str()));
+    #endif
     return false;
 }
 
Index: src/plugins/contrib/lib_finder/defsdownloaddlg.cpp
===================================================================
--- src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (working copy)
@@ -112,7 +112,11 @@
         wxURL UrlData(Url);
         if ( !UrlData.IsOk() )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+            #endif
             continue;
         }
         UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -120,7 +124,11 @@
         std::auto_ptr< wxInputStream > is ( UrlData.GetInputStream() );
         if ( !is.get() || !is->IsOk() )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+            #endif
             continue;
         }
 
@@ -137,7 +145,11 @@
         TiXmlDocument doc;
         if ( !doc.Parse( (const char*) memory.GetOutputStreamBuffer()->GetBufferStart() ) )
         {
+            #if wxCHECK_VERSION(2, 9, 0)
+            LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.wx_str()));
+            #else
             LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.c_str()));
+            #endif
             continue;
         }
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #37 on: June 19, 2009, 02:04:39 am »
Patch needed for envvars

Code: [Select]
Index: src/plugins/contrib/envvars/envvars_common.cpp
===================================================================
--- src/plugins/contrib/envvars/envvars_common.cpp (revision 5598)
+++ src/plugins/contrib/envvars/envvars_common.cpp (working copy)
@@ -165,7 +165,11 @@
   if (!active_set_cfg.IsEmpty())
     active_set = active_set_cfg;
 
+  #if wxCHECK_VERSION(2, 9, 0)
+  EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.wx_str());
+  #else
   EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.c_str());
+  #endif
   return active_set;
 }// GetActiveSetName
 
@@ -213,7 +217,11 @@
 #endif
 
   wxArrayString envvars;
+  #if wxCHECK_VERSION(2, 9, 0)
+  EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.wx_str());
+  #else
   EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.c_str());
+  #endif
 
   ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("envvars"));
   if (!cfg || set_path.IsEmpty())
@@ -230,7 +238,11 @@
       EV_DBGLOG(_T("EnvVars: Warning: empty envvar detected and skipped."));
   }
   EV_DBGLOG(_T("EnvVars: Read %d/%d envvars in path '%s'."),
+  #if wxCHECK_VERSION(2, 9, 0)
+    envvars.GetCount(), num_envvars, set_path.wx_str());
+  #else
     envvars.GetCount(), num_envvars, set_path.c_str());
+  #endif
 
   return envvars;
 }// GetEnvvarsBySetPath
@@ -346,9 +358,19 @@
   if (!wxUnsetEnv(the_key))
   {
     Manager::Get()->GetLogManager()->Log(F(
-      _("Unsetting environment variable '%s' failed."), the_key.c_str()));
+      _("Unsetting environment variable '%s' failed."),
+      #if wxCHECK_VERSION(2, 9, 0)
+      the_key.wx_str())
+      #else
+      the_key.c_str())
+      #endif
+    );
     EV_DBGLOG(_T("EnvVars: Unsetting environment variable '%s' failed."),
+      #if wxCHECK_VERSION(2, 9, 0)
+      the_key.wx_str());
+      #else
       the_key.c_str());
+      #endif
     return false;
   }
 
@@ -386,7 +408,11 @@
       if (value_set.Contains(recursion))
       {
         EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed "
+          #if wxCHECK_VERSION(2, 9, 0)
+                     "due to unsresolvable recursion."), the_key.wx_str());
+          #else
                      "due to unsresolvable recursion."), the_key.c_str());
+          #endif
         if (lstEnvVars && (sel>=0))
           lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
         return false;
@@ -396,10 +422,18 @@
   }
   Manager::Get()->GetMacrosManager()->ReplaceMacros(the_value);
 
+  #if wxCHECK_VERSION(2, 9, 0)
+  EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.wx_str(), the_value.wx_str());
+  #else
   EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.c_str(), the_value.c_str());
+  #endif
   if (!wxSetEnv(the_key, the_value))
   {
+    #if wxCHECK_VERSION(2, 9, 0)
+    EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.wx_str());
+    #else
     EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.c_str());
+    #endif
     if (lstEnvVars && (sel>=0))
       lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
     return false;
@@ -470,14 +504,22 @@
   if (!even_if_active && set_to_apply.IsSameAs(last_set_applied))
   {
     EV_DBGLOG(_T("EnvVars: Set '%s' will not be applied (already active)."),
+      #if wxCHECK_VERSION(2, 9, 0)
+      set_to_apply.wx_str());
+      #else
       set_to_apply.c_str());
+      #endif
     return;
   }
 
   // Show currently activated set in debug log (for reference)
   wxString set_path = nsEnvVars::GetSetPathByName(set_to_apply);
   EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+    #if wxCHECK_VERSION(2, 9, 0)
+    set_to_apply.wx_str(), set_path.wx_str());
+    #else
     set_to_apply.c_str(), set_path.c_str());
+    #endif
 
   // Read and apply all envvars from currently active set in config
   wxArrayString vars     = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -490,8 +532,14 @@
     if (nsEnvVars::EnvvarArrayApply(var_array))
       envvars_applied++;
     else
+    {
       EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+        #if wxCHECK_VERSION(2, 9, 0)
+        set_path.wx_str(), i);
+        #else
         set_path.c_str(), i);
+        #endif
+    }
   }// for
 
   if (envvars_total>0)
@@ -522,7 +570,11 @@
   // Show currently activated set in debug log (for reference)
   wxString set_path = nsEnvVars::GetSetPathByName(set_to_discard);
   EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+  #if wxCHECK_VERSION(2, 9, 0)
+    set_to_discard.wx_str(), set_path.wx_str());
+  #else
     set_to_discard.c_str(), set_path.c_str());
+  #endif
 
   // Read and apply all envvars from currently active set in config
   wxArrayString vars       = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -540,8 +592,14 @@
         envvars_discarded++;
     }
     else
+    {
       EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+        #if wxCHECK_VERSION(2, 9, 0)
+        set_path.wx_str(), i);
+        #else
         set_path.c_str(), i);
+        #endif
+    }
   }// for
 
   if (envvars_total>0)
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #38 on: June 19, 2009, 08:44:22 am »
Patch needed for lib_finder
For this patch I receive:
patching file "src/plugins/contrib/lib_finder/lib_finder.cpp"
patching file "src/plugins/contrib/lib_finder/defsdownloaddlg.cpp"
patch unexpectedly ends in middle of line

Please try to re-submit.
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #39 on: June 19, 2009, 08:52:51 am »
Patch needed for envvars
Applied in trunk. I've taken that one because I am testing a new version of this plugin currently. Thanks!
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 stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #40 on: June 19, 2009, 05:42:03 pm »
Attached patch to message for lib_finder Deleted to space space.
Tim S
« Last Edit: July 23, 2010, 05:23:34 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #41 on: June 21, 2009, 04:27:19 am »
Attached patch to message for lib_finder

Applied. Now in trunk.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #42 on: June 24, 2009, 06:30:05 am »
Submitted big patch for wxSmith here
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2778&group_id=5358

Tim S

Small un-guarded patch here is also needed to wxSmith
Code: [Select]
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (working copy)
@@ -48,7 +48,7 @@
     {
         for ( size_t i=FileName.Length(); i-->0; )
         {
-            switch ( FileName[i] )
+            switch ( int(FileName[i]) )
             {
                 case _T('/'):
                 case _T('\\'):
@@ -63,7 +63,7 @@
     {
         for ( size_t i=FileName.Length(); i-->0; )
         {
-            switch ( FileName[i] )
+            switch ( int(FileName[i]) )
             {
                 case _T('/'):
                 case _T('\\'):
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (working copy)
@@ -39,10 +39,10 @@
         _T("#include \"$(Include)\"\n")
         _T("\n")
         _T("$(InternalHeadersPch)")
-        + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n") +
+        + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n")
         + wxsCodeMarks::End(wxsCPP) + _T("\n")
         _T("\n")
-        + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n") +
+        + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n")
         + wxsCodeMarks::End(wxsCPP) + _T("\n")
         _T("\n")
         _T("BEGIN_EVENT_TABLE($(ClassName),$(BaseClassName))\n")
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org