Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
AutoVersioning Plugin
JGM:
I have made a little patch for autoversioning.
-Ubuntu style version now declared as string instead of double.
-Added more possible causes to the svn error message box.
-Removed license file from unix project file.
I will work later to add an AV_ prefix to the declarations on C mode, since somebody wrote about conflicts with some linux headers or something like that with the date declaration.
--- Code: ---Index: AutoVersioning.cpp
===================================================================
--- AutoVersioning.cpp (revision 5189)
+++ AutoVersioning.cpp (working copy)
@@ -571,7 +571,7 @@
actualDate.Format(_T("%y")).ToLong(&ubuntuYearNumber);
wxString ubuntuYear;
ubuntuYear.Printf(_T("%d"),ubuntuYearNumber);
- headerOutput << _T("\t") << _T("static const double UBUNTU_VERSION_STYLE = ") << ubuntuYear << actualDate.Format(_T(".%m")) << _T(";\n");
+ headerOutput << _T("\t") << _T("static const char UBUNTU_VERSION_STYLE[] = \"") << ubuntuYear << actualDate.Format(_T(".%m\"")) << _T(";\n");
headerOutput << _T("\t") << _T("\n");
}
@@ -612,7 +612,7 @@
{
wxString revision,date;
if (!QuerySvn(cbC2U(GetConfig().Settings.SvnDirectory.c_str()), revision, date))
- wxMessageBox(_("Svn configuration files not found.\nVerify the Autoversioning svn directory."),_("Error"),wxICON_ERROR);
+ wxMessageBox(_("Possible Causes:\n-You don't have SVN installed.\n-Incompatible version of SVN.\n-SVN configuration files not found.\n\nVerify the Autoversioning svn directory."),_("SVN Error"),wxICON_ERROR);
headerOutput << _T("\t") << _T("\n");
headerOutput << _T("\t") << _T("//SVN Version") << _T("\n");
headerOutput << _T("\t") << _T("static const char SVN_REVISION[] = ") << _T("\"") + revision + _T("\"")<< _T(";\n");
Index: AutoVersioning-unix.cbp
===================================================================
--- AutoVersioning-unix.cbp (revision 5189)
+++ AutoVersioning-unix.cbp (working copy)
@@ -46,7 +46,6 @@
<Unit filename="avSvnRevision.h" />
<Unit filename="avVersionEditorDlg.cpp" />
<Unit filename="avVersionEditorDlg.h" />
- <Unit filename="license.txt" />
<Unit filename="manifest.xml" />
<Extensions>
<code_completion />
--- End code ---
[attachment deleted by admin]
PathFinder_Cate:
I'm having a small problem compiling with AutoVersioning turned on (while compiling in Windows).
AutoVersioning uses "DATE" to refer to the day of the month while the Windows include file
"wtypes.h" defines DATE as:
typedef double DATE;
The AutoVersioning plugin should use either "DAY" or a user-selected
variable to avoid this conflict:
//Date Version Types
static const char DAY[] = "02";
static const char MONTH[] = "01";
static const char YEAR[] = "2009";
JGM:
thats when generating the header file on c instead of c++?
riban:
Is there a way to trigger AutoVersion to start working when a new project is created from a wizard? I have a wizard that creates a project. The wizard adds AutoVersion info to the project but this is not used until the project is closed and re-opened. I want to be able to run the wizard and then for AutoVersion to start working straight away. I can't find a way to trigger this from the wizard script.
ajaywazir:
Hi
Need some help
I have SVN 1.5.5 and TortoiseSVN 1.6.5
I have checked out some code using TortoiseSVN 1.6.5;
SVN.exe is in path
I cannot use svn revision in the version file.
The config dialog always gives me error, svn configuration files not found.
whereas all .svn files and folders are there.
Ajay
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version