User forums > General (but related to Code::Blocks)
[Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
stahta01:
--- Quote from: MortenMacFly on May 04, 2009, 09:23:48 am ---
--- Quote from: Biplab on May 04, 2009, 02:34:10 am ---Please go ahead with the patch. No objections to that.
--- End quote ---
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.
--- End quote ---
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
Biplab:
--- Quote from: MortenMacFly on May 04, 2009, 09:23:48 am ---
--- Quote from: Biplab on May 04, 2009, 02:34:10 am ---Please go ahead with the patch. No objections to that.
--- End quote ---
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.
--- End quote ---
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.
stahta01:
See http://forums.codeblocks.org/index.php/topic,10510.msg72219.html#msg72219 for wxSmith Patches.
stahta01:
Guarded Patch to devpak. Tim S
--- Code: ---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);
}
--- End code ---
stahta01:
Patch to Games
--- Code: ---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;
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version