|
From: <hp...@us...> - 2014-01-24 10:48:07
|
Revision: 1389
http://sourceforge.net/p/scidavis/svn/1389
Author: hpcoder
Date: 2014-01-24 10:48:04 +0000 (Fri, 24 Jan 2014)
Log Message:
-----------
Added back in the release versioning system, but also added a x.y.z
schema version function suitable for use within the project file
writer. This solves ticket #228.
Modified Paths:
--------------
branches/development/scidavis/icons/scidavis-splash.png
branches/development/scidavis/icons/scidavis-splash.xcf
branches/development/scidavis/sourcefiles.pri
branches/development/scidavis/src/ApplicationWindow.cpp
branches/development/scidavis/src/globals.cpp
branches/development/scidavis/src/globals.h
Added Paths:
-----------
branches/development/makeVersion.sh
branches/development/scidavis/src/version.cpp
Added: branches/development/makeVersion.sh
===================================================================
--- branches/development/makeVersion.sh (rev 0)
+++ branches/development/makeVersion.sh 2014-01-24 10:48:04 UTC (rev 1389)
@@ -0,0 +1,19 @@
+version=$1
+delta=${version##*.[CD]}
+branch=${version%%.*}
+scidavis_version=$[$branch*65536 + $delta]
+cat >scidavis/src/version.cpp <<EOF
+#include "globals.h"
+const int SciDAVis::scidavis_versionNo = $scidavis_version;
+const char* SciDAVis::scidavis_version = "$version";
+const char * SciDAVis::release_date = "`date +"%b %d, %Y"`";
+EOF
+
+# also check that all translation files have been included
+for i in scidavis/translations/*.ts; do
+ if aels -terse $i |grep -- \--- >/dev/null; then
+ echo "translation $i not checked in"
+ exit 1
+ fi
+done
+
Property changes on: branches/development/makeVersion.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: branches/development/scidavis/icons/scidavis-splash.png
===================================================================
(Binary files differ)
Modified: branches/development/scidavis/icons/scidavis-splash.xcf
===================================================================
(Binary files differ)
Modified: branches/development/scidavis/sourcefiles.pri
===================================================================
--- branches/development/scidavis/sourcefiles.pri 2014-01-23 19:45:52 UTC (rev 1388)
+++ branches/development/scidavis/sourcefiles.pri 2014-01-24 10:48:04 UTC (rev 1389)
@@ -38,7 +38,9 @@
unix: tstarget.target = translations/scidavis_de.qm
win32: tstarget.target = translations\scidavis_de.qm
- tstarget.commands = $$LUPDATE_BIN scidavis.pro && $$LRELEASE_BIN scidavis.pro
+# note the translation files are not writable during AEGIS
+# integration, so we don't want to perform an update then
+ tstarget.commands = (! test -w translations/scidavis_de.ts || $$LUPDATE_BIN scidavis.pro) && $$LRELEASE_BIN scidavis.pro
QMAKE_EXTRA_TARGETS += tstarget
PRE_TARGETDEPS += translations/scidavis_de.qm
@@ -312,6 +314,7 @@
src/TeXTableSettings.cpp \
src/TeXTableSettingsWidget.cpp \
src/TeXTableExportDialog.cpp \
+ src/version.cpp \
###################### FORMS ##############################################
FORMS += src/SciDAVisAbout.ui
Modified: branches/development/scidavis/src/ApplicationWindow.cpp
===================================================================
--- branches/development/scidavis/src/ApplicationWindow.cpp 2014-01-23 19:45:52 UTC (rev 1388)
+++ branches/development/scidavis/src/ApplicationWindow.cpp 2014-01-24 10:48:04 UTC (rev 1389)
@@ -12364,7 +12364,7 @@
QTextStream t( &f );
t.setEncoding(QTextStream::UnicodeUTF8);
- t << SciDAVis::versionString() + " project file\n";
+ t << SciDAVis::schemaVersion() + " project file\n";
t << "<scripting-lang>\t"+QString(scriptEnv->name())+"\n";
t << "<windows>\t"+QString::number(folder->windowCount(true))+"\n";
t.flush();
Modified: branches/development/scidavis/src/globals.cpp
===================================================================
--- branches/development/scidavis/src/globals.cpp 2014-01-23 19:45:52 UTC (rev 1388)
+++ branches/development/scidavis/src/globals.cpp 2014-01-24 10:48:04 UTC (rev 1389)
@@ -38,7 +38,6 @@
// Don't forget to change the Doxyfile, the splash screen and the Windows
// installer when changing these!
-const int SciDAVis::scidavis_version = 0x000204;
const char * SciDAVis::extra_version = "";
@@ -50,7 +49,7 @@
The following people have written parts of the SciDAVis source code, ranging from a few lines to large chunks.\n\
In alphabetical order.\n\
\n\
-Tilman Benkert[1], Knut Franke\n\
+Tilman Benkert[1], Knut Franke, Dmitriy Pozitron, Russell Standish\n\
\n\
--- Documentation ---\n\
\n\
@@ -66,7 +65,7 @@
\n\
Tilman Benkert[1], Markus Bongard, Tobias Burnus, R\xE9my Claverie, f0ma, Jos\xE9 Antonio Lorenzo Fern\xE1ndez, \
Pavel Fric, Jan Helebrant, Daniel Klaer, Peter Landgren, Fellype do Nascimento, Tomomasa Ohkubo, \
-Mikhail Shevyakov, Mauricio Troviano\n\
+Mikhail Shevyakov, Russell Standish, Mauricio Troviano\n\
\n\
--- Packagers ---\n\
\n\
@@ -109,19 +108,22 @@
\n\
... and many more we just forgot to mention.\n";
-const char * SciDAVis::release_date = " 2010-03-12";
-
int SciDAVis::version()
{
- return scidavis_version;
+ return scidavis_versionNo;
}
+QString SciDAVis::schemaVersion()
+{
+ return "SciDAVis " +
+ QString::number((version() & 0xFF0000) >> 16)+"."+
+ QString::number((version() & 0x00FF00) >> 8)+"."+
+ QString::number(version() & 0x0000FF);
+}
+
QString SciDAVis::versionString()
{
- return "SciDAVis " +
- QString::number((scidavis_version & 0xFF0000) >> 16)+"."+
- QString::number((scidavis_version & 0x00FF00) >> 8)+"."+
- QString::number(scidavis_version & 0x0000FF);
+ return QString("SciDAVis ") + scidavis_version;
}
QString SciDAVis::extraVersion()
Modified: branches/development/scidavis/src/globals.h
===================================================================
--- branches/development/scidavis/src/globals.h 2014-01-23 19:45:52 UTC (rev 1388)
+++ branches/development/scidavis/src/globals.h 2014-01-24 10:48:04 UTC (rev 1389)
@@ -86,7 +86,9 @@
static QString enumValueToString(int key, const QString& enum_name);
static int enumStringToValue(const QString& string, const QString& enum_name);
- //! Return the SciDAVis version string ("SciDAVis x.y.z" without extra version)
+ //! Return the SciDAVis version string ("SciDAVis x.y.z" without extra version) used in the project file
+ static QString schemaVersion();
+ /// the user visible release version string (x.Dy usually)
static QString versionString();
//! Return the extra version as a string
@@ -110,7 +112,8 @@
* mm = minor version
* bb = bugfix version
*/
- static const int scidavis_version;
+ static const int scidavis_versionNo;
+ static const char* scidavis_version;
//! Extra version information string (like "-alpha", "-beta", "-rc1", etc...)
static const char * extra_version;
//! Copyright string containing the author names etc.
Added: branches/development/scidavis/src/version.cpp
===================================================================
--- branches/development/scidavis/src/version.cpp (rev 0)
+++ branches/development/scidavis/src/version.cpp 2014-01-24 10:48:04 UTC (rev 1389)
@@ -0,0 +1,4 @@
+#include "globals.h"
+const int SciDAVis::scidavis_versionNo = 65538;
+const char* SciDAVis::scidavis_version = "1.D002";
+const char * SciDAVis::release_date = "Jan 24, 2014";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|