User forums > Using Code::Blocks

How to use the plugins of old SDK for new CodeBlocks?

(1/2) > >>

gonboy:
Hello:
I have some old plugins for Codeblocks? But the plugins is stop developping and I couldn't find the source.

I copy the plugins (*.dll and *.zip)to my build Codeblocks,to run app.
show some info like below:
==============================================
one or more plugins were not loaded.
this usually happens when a plugins is build for a different version of the Code::Blocks sdk
check the application log for more info
==============================================
How Can I use the old plugins for my Codeblocks?

dmoore:
Unlikely that you will be able to get the old binaries to work. They will need to be tweaked for changes in the SDK and recompiled. What plugins are they? Do you have sources?

ollydbg:

--- Quote ---How Can I use the old plugins for my Codeblocks?
--- End quote ---
I think there is no such way.

The newer Codeblocks (SDK) has some interface changed, which means you can't use the old plugins for the new interface. I think the only way is : you find the plugin's source, and build them against the newer SDK.

gonboy:
Couldn't find source! That's previous enginerr's plugin,he leave office.


the Codeblocks how to find the plugins isn't suitable for App?

Can I change *.dll or *.zip ,
eg
change some version bytes to cheat the APP?

Alpha:
I had been working on the following patch.  It adds an option to tell Code::Blocks to ignore version numbers and load plugins anyway.  You can test it if you like.  (Be warned that just because this allows the plugin to be loaded does not mean it will actually work.)

--- Code: ---Index: src/sdk/pluginsconfigurationdlg.cpp
===================================================================
--- src/sdk/pluginsconfigurationdlg.cpp (revision 8330)
+++ src/sdk/pluginsconfigurationdlg.cpp (working copy)
@@ -67,7 +67,8 @@
     // install options
     ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("plugins"));
     bool globalInstall = cfg->ReadBool(_T("/install_globally"), true);
-    bool confirmation = cfg->ReadBool(_T("/install_confirmation"), true);
+    bool confirmation  = cfg->ReadBool(_T("/install_confirmation"), true);
+    bool ignoreVersion = cfg->ReadBool(_T("/ignore_version"), false);
 
     // verify user can install globally
     DirAccessCheck access = cbDirAccessCheck(ConfigManager::GetFolder(sdPluginsGlobal));
@@ -79,6 +80,7 @@
     }
     XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->SetValue(globalInstall);
     XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->SetValue(confirmation);
+    XRCCTRL(*this, "chkIgnoreVersion", wxCheckBox)->SetValue(ignoreVersion);
 
     // Set default font size based on system default font size
 #ifdef __linux__
@@ -443,6 +445,7 @@
 
     cfg->Write(_T("/install_globally"), XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->GetValue());
     cfg->Write(_T("/install_confirmation"), XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->GetValue());
+    cfg->Write(_T("/ignore_version"), XRCCTRL(*this, "chkIgnoreVersion", wxCheckBox)->GetValue());
 
     wxScrollingDialog::EndModal(retCode);
 }
Index: src/sdk/resources/plugins_configuration.xrc
===================================================================
--- src/sdk/resources/plugins_configuration.xrc (revision 8330)
+++ src/sdk/resources/plugins_configuration.xrc (working copy)
@@ -55,11 +55,18 @@
                                     </object>
                                     <object class="sizeritem">
                                         <border>5</border>
-                                        <flag>wxALL|wxALIGN_LEFT|wxALIGN_TOP|wxEXPAND</flag>
+                                        <flag>wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
                                         <object class="wxCheckBox" name="chkInstallConfirmation">
                                             <label>Ask for confirmation if conflicts arise.</label>
                                         </object>
                                     </object>
+                                    <object class="sizeritem">
+                                        <object class="wxCheckBox" name="chkIgnoreVersion">
+                                            <label>Ignore SDK version mismatch. Do not check unless you know what you are doing!</label>
+                                        </object>
+                                        <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+                                        <border>5</border>
+                                    </object>
                                 </object>
                             </object>
                         </object>
Index: src/sdk/pluginmanager.cpp
===================================================================
--- src/sdk/pluginmanager.cpp (revision 8330)
+++ src/sdk/pluginmanager.cpp (working copy)
@@ -702,7 +702,10 @@
                     PLUGIN_SDK_VERSION_MINOR,
                     PLUGIN_SDK_VERSION_RELEASE);
         Manager::Get()->GetLogManager()->LogError(fmt);
-        return;
+        if (Manager::Get()->GetConfigManager(wxT("plugins"))->ReadBool(wxT("/ignore_version"), false))
+            Manager::Get()->GetLogManager()->LogWarning(_("    SDK version ignored, loading ") + name + _(" anyways. Beware of side effects!"));
+        else
+            return;
     }
 
     // all done

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version