User forums > General (but related to Code::Blocks)

Patched Code::Blocks works with wxWidgets trunk 2.9

(1/3) > >>

stahta01:
FYI:

I have gotten the Code::Blocks's SDK, main, and compiler plugin to compile, link, and run.

I have used that wx29 version of Code::Blocks to re-compile, link, and run itself, again.

I have stopped updating patches for these plugins
  codesnippets http://forums.codeblocks.org/index.php/topic,9210.msg66001.html#msg66001
  keybinder
  browsetracker

The reason is I am now testing with debug wxWidgets and these plugins give too many messages of problems.

Tim S

Edit: Found new link that should help converting to wxWidgets 2.9
http://docs.wxwidgets.org/trunk/overview_changes_since28.html

Status
  Testing patches for CB SVN 5319 and wx29/trunk SVN 56858 on 2008-11-24; worked TBD.

MortenMacFly:

--- Quote from: stahta01 on September 18, 2008, 09:09:03 pm ---If so, please respond to this post and I will work on posting the patches in this thread.

--- End quote ---
...BerliOS / here? Your decision. Go ahead! :-)

stahta01:
I will post the small patches here for comments.

Note 1: All patches for wxSmith are located here http://forums.codeblocks.org/index.php/topic,9210.msg65877.html#msg65877
 
Note 2: All patches for codesnippets are located here http://forums.codeblocks.org/index.php/topic,9210.msg66001.html#msg66001

1. Bugfix patches for Code::Blocks normal build under ANSI (non-Unicode)  build.
   Have put these patches on Hold; not needed for wx29 Unicode build


2. wxWidgets 2.8 compatible patches worth applying to Code::Blocks even if you don't wish to link to wxWidget 2.9

2A. Submitted wxWidgets 2.8 compatible patches
[ Patch #1907 ] Patch XRC files for wxW28 with disable_compat26 Applied to SVN


2B. New wxWidgets 2.8 compatible patches

2B1. New wxWidgets 2.8 compatible very simple patches
Reason for this group of patches; changed types and deprecated methods were removed in wx29

Removed wxColour::Ok() use instead wxColour::IsOk()
The type wxBitmapType was changed from int to enum.
Has Been Applied to Code::Blocks SVN

2B2. New wxWidgets 2.8 compatible slightly complex patches,
I need to verify these work the same as non-patched code does.

My Filename is wx280_simplify_clarify-unix.patch

--- Code: ---Index: src/sdk/configmanager.cpp
===================================================================
--- src/sdk/configmanager.cpp (revision 5206)
+++ src/sdk/configmanager.cpp (working copy)
@@ -281,9 +281,9 @@
         {
             size_t size = is->GetSize();
             wxString str;
-            wxChar* c = str.GetWriteBuf(size);
-            is->Read(c, size);
-            str.UngetWriteBuf(size);
+            // wxChar* c = str.GetWriteBuf(size);
+            is->Read(wxStringBuffer(str, size), size);
+            // str.UngetWriteBuf(size);
 
             doc = new TiXmlDocument();
 
Index: src/sdk/projectfile.cpp
===================================================================
--- src/sdk/projectfile.cpp (revision 5206)
+++ src/sdk/projectfile.cpp (working copy)
@@ -56,7 +56,10 @@
 
     file.Assign(path + new_name);
     relativeFilename = relativeFilename.BeforeLast(wxFILE_SEP_PATH);
-    relativeFilename.IsEmpty() || relativeFilename.Append(wxFILE_SEP_PATH);
+    if (!relativeFilename.IsEmpty())
+    {
+        relativeFilename.Append(wxFILE_SEP_PATH);
+    }
     relativeFilename.Append(new_name);
 
     if (project)
Index: src/sdk/crc32.cpp
===================================================================
--- src/sdk/crc32.cpp (revision 5206)
+++ src/sdk/crc32.cpp (working copy)
@@ -67,7 +67,7 @@
     wxUint32 crc = 0;
     unsigned int i = 0;
 
-    if (text)
+    if (!text.IsEmpty())
     {
         // Get the crc table, on first call, generate, otherwise do nothing
         crc_table = GetCRC32Table( crc_table ) ;
Index: src/plugins/contrib/devpak_plugin/mytar.cpp
===================================================================
--- src/plugins/contrib/devpak_plugin/mytar.cpp (revision 5206)
+++ src/plugins/contrib/devpak_plugin/mytar.cpp (working copy)
@@ -19,7 +19,7 @@
     m_SkipBytes(0),
     m_Size(0)
 {
-    if (filename)
+    if (!filename.IsEmpty())
         Open(filename);
 }
 
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (revision 5206)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (working copy)
@@ -1846,7 +1846,7 @@
            #endif
 
             delete filetype;
-            if ( open )
+            if ( !open.IsEmpty() )
                 ::wxExecute( open, wxEXEC_ASYNC);
         }
     }
Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp (revision 5206)
+++ src/src/app.cpp (working copy)
@@ -379,7 +379,7 @@
 
     const wxLanguageInfo *info;
 
-    if(lang)
+    if(!lang.IsEmpty())
         info = wxLocale::FindLanguageInfo(lang);
     else
         info = wxLocale::GetLanguageInfo(wxLANGUAGE_DEFAULT);

--- End code ---


3. wxWidgets 2.8 compatible patches NOT worth applying to Code::Blocks if you don't wish to link to wxWidget 2.9

3A. Submitted wxWidgets 2.8 compatible patches
  None at this Time.

3B. compiler major warning and error reduction patch, attached as an z7ip file.
   My file wx28Xplus_use_wx_str-unix.patch is attached to this message as an 7Zipped file.
   This patch can be applied to Code::Blocks linked to wxWidgets 2.8; for testing.

4. wxWidgets 2.9 only compiler major warning and error reduction patches
   My file wx290_core-unix.patch is attached to this message as an 7Zipped file.

5. wxWidgets 2.9 only compiler minor warning reduction patch.
  Attached to below to another message below
  http://forums.codeblocks.org/index.php/topic,9210.msg66013.html#msg66013


Tim S

[attachment deleted by admin]

stahta01:
How I compiled wxWidgets 2.9 trunk SVN 56032


Changes done to setup.h

--- Code: ---#define wxUSE_STC 0

--- End code ---

Note: I tried turning off wxUSE_PROPGRID in order to try compiling wxSmith and it still failed.
Not, sure if wxUSE_PROPGRID should be 0 or 1. I decided 0 is best for wxUSE_PROPGRID
With wxUSE_PROPGRID = 0, I upgraded wxPropertGrid to version 1.2.12; next, I added two small propgrid patches for wx29. wxSmith now compiles & links. But, it has this code will crash at runtime warnings.

NOTE: wxUSE_STC must be 0 unless you are willing to fix a lot of C::B code.
Testing with WXWIN_COMPATIBILITY_2_6 = 1 because it avoids some problem. Will turn it off at an later date.
I an now testing with WXWIN_COMPATIBILITY_2_6 = 0.



--- Code: ---mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_STC=0 USE_XRC=1 USE_OPENGL=0 BUILD=release MONOLITHIC=1 SHARED=1

--- End code ---


Tim S

stahta01:
This message is where the patches to get wxSmith plug-in to compile against wxWidgets 2.9 will be posted.

I have decided to redo my patches for wxSmith using wxWidgets 2.9.x wxPropertyGrid.

This will be more work, but will be better in the long run when wxWidgets 3.0 is released.

My file wx28Xplus_wxSmith-unix.patch is attached as 7Zipped File and is needed to link with wx29.
This file can used with wxWidgets 2.8 branch for testing.

My file wx290_wxSmith-unix.patch is attached as 7Zipped File and is needed to link with wx29.

My file wx280_wxPropertyGrid-unix.patch is attached as 7Zipped File and is NOT needed to link with wx29.
This file can used with wxWidgets 2.8 branch for testing.


[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version