Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
AutoVersioning Plugin
Biplab:
--- Quote from: JGM on April 23, 2008, 06:02:30 pm ---Ok, I made a bug report (id: 13676), but until the problem is solved the patch #2444 should be applied i think, since now the autoversioning plugin is not working properly:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2444&group_id=5358
--- End quote ---
I've fixed the bug. So the patch may not be necessary. :)
I've fixed another minor bug in AutoVersioning plugin.
I think this patch is also necessary. If there are more than 2 targets, then the version.h will be added more than once.
--- Code: ---Index: src/plugins/contrib/AutoVersioning/AutoVersioning.cpp
===================================================================
--- src/plugins/contrib/AutoVersioning/AutoVersioning.cpp (revision 5016)
+++ src/plugins/contrib/AutoVersioning/AutoVersioning.cpp (working copy)
@@ -3,6 +3,7 @@
#include <sdk.h>
#ifndef CB_PRECOMP
+#include <wx/dynarray.h>
#include <wx/file.h>
#include <wx/filefn.h>
#include <wx/ffile.h>
@@ -376,10 +377,12 @@
SetVersionAndSettings(*m_Project);
UpdateVersionHeader();
- for (int i = 1; i < m_Project->GetBuildTargetsCount(); ++i)
+ wxArrayInt target_array;
+ for (int i = 0; i < m_Project->GetBuildTargetsCount(); ++i)
{
- m_Project->AddFile(i, m_versionHeaderPath, true, true, 0);
+ target_array.Add(i);
}
+ Manager::Get()->GetProjectManager()->AddFileToProject(m_versionHeaderPath, m_Project, target_array);
Manager::Get()->GetProjectManager()->RebuildTree();
wxMessageBox(_("Project configured!"));
}
--- End code ---
JGM:
--- Quote from: Biplab on April 23, 2008, 07:29:13 pm ---I've fixed the bug. So the patch may not be necessary. :)
--- End quote ---
That was fast :D
--- Quote ---* Fixed: Refresh the project tree after AutoVersioning plugin configures a project.
--- End quote ---
Nice! Thanks!
Biplab:
What do you think about the patch?
I didn't commit as I wasn't sure whether you want the plugin to be used only for release targets. :)
JGM:
Um, the only problem is that the plugin would need to be completely modified to be able to handle multiple targets and save a different header file path for multiple targets, then store different autoversioning configurations on the project file for each target. Ask the user which target to configure, what is not capable since it's working on a project global manner. I think is more than that patch. :?
But maybe I don't completely understand what you say and I'm wrong. :)
rododox:
Hi
When I add the Autoversioning option to my project, it always autoincrement the build num (when i compile the source) It's ok, but the number's also auto incremented when i click the run button in the IDE (or from "Build->Run") . i think it musn't to that !
I'm using codeblocks under windows xp sp2, and i tried the autoversioning with the 8.02 release and the nightly build of 19/05/2008
thanks
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version