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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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: 6640
    • 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