Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
AutoVersioning Plugin
killerbot:
okay I will wait till you have finished that experiment.
JGM:
I have found the time in the day to do the testing since my daughter was sleeping so i waited until she woke up to go now to do some business :D
Well the oncompilerstarted event.getproject is returning a null pointer 0
The test I made
===================================================
void AutoVersioning::OnCompilerStarted(CodeBlocksEvent& event)
{
wxString print;
print.Printf(_T("m_Project: %d event.GetProject: %d"),m_Project,event.GetProject());
wxMessageBox(print);
if (m_Project && IsAttached() && m_IsVersioned[m_Project])
{
if (m_Modified)
{
const bool doAutoIncrement = GetConfig().Settings.DoAutoIncrement;
const bool askToIncrement = GetConfig().Settings.AskToIncrement;
if (doAutoIncrement && askToIncrement)
{
if (wxMessageBox(_("Do you want to increment the version?"),_T(""),wxYES_NO) == wxYES)
{
CommitChanges();
}
}
else if(doAutoIncrement)
{
CommitChanges();
}
}
}
} // end of OnCompilerStarted
===================================================
Attached is a screenshot showing the results
[attachment deleted by admin]
JGM:
Should I submit a bug to berlios about the OnCompilerStarted event.GetProject() returning a null pointer?
killerbot:
--- Quote from: JGM on April 23, 2008, 04:31:17 pm ---Should I submit a bug to berlios about the OnCompilerStarted event.GetProject() returning a null pointer?
--- End quote ---
yes please do that, and attach sample project/workspace if possible.
JGM:
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
--- Quote from: JGM on April 21, 2008, 11:36:28 pm ---
--- Code: ---Index: src/plugins/contrib/AutoVersioning/AutoVersioning.cpp
===================================================================
--- src/plugins/contrib/AutoVersioning/AutoVersioning.cpp (revision 5010)
+++ src/plugins/contrib/AutoVersioning/AutoVersioning.cpp (working copy)
@@ -293,7 +293,7 @@
// be activated and each has the compilerstarted/Finished ?????
void AutoVersioning::OnCompilerStarted(CodeBlocksEvent& event)
{
- if (m_Project && IsAttached() && m_IsVersioned[event.GetProject()])
+ if (m_Project && IsAttached() && m_IsVersioned[m_Project])
{
if (m_Modified)
{
@@ -316,7 +316,7 @@
void AutoVersioning::OnCompilerFinished(CodeBlocksEvent& event)
{
- if (m_Project && IsAttached() && m_IsVersioned[event.GetProject()])
+ if (m_Project && IsAttached() && m_IsVersioned[m_Project])
{
++(GetVersionState().Values.BuildCount);
}
Index: src/plugins/contrib/AutoVersioning/manifest.xml
===================================================================
--- src/plugins/contrib/AutoVersioning/manifest.xml (revision 5010)
+++ src/plugins/contrib/AutoVersioning/manifest.xml (working copy)
@@ -3,7 +3,7 @@
<SdkVersion major="1" minor="10" release="0" />
<Plugin name="AutoVersioning">
<Value title="AutoVersioning" />
- <Value version="1.2" />
+ <Value version="1.3" />
<Value description="Auto increments the version and build number of your application every time a change has been made and stores it in version.h with easy to use variable declarations. Also have a feature for committing changes a la SVN style, a version scheme editor and a change log generator.
Example:
--- End code ---
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version