r19171 by craig - Add SVN revision data to Help About
scribus-commit
scribus-commit at lists.scribus.net
Mon Jun 2 20:54:22 UTC 2014
Author: craig
Date: Mon Jun 2 20:54:22 2014
New Revision: 19171
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19171
Log:
Add SVN revision data to Help About
Modified:
trunk/Scribus/CMakeLists.txt
trunk/Scribus/scribus/ui/about.cpp
Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19171&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Mon Jun 2 20:54:22 2014
@@ -804,19 +804,21 @@
#Install our READMEs etc.
INSTALL(FILES
- AUTHORS
- BUILDING
- ChangeLog
- ChangeLogSVN
- COPYING
- LINKS
- NEWS
- PACKAGING
- README
- TODO
- TRANSLATION
- DESTINATION ${DOCDIR}
+ AUTHORS
+ BUILDING
+ ChangeLog
+ ChangeLogSVN
+ COPYING
+ LINKS
+ NEWS
+ PACKAGING
+ README
+ TODO
+ TRANSLATION
+ DESTINATION ${DOCDIR}
)
+
+INSTALL(FILES revision DESTINATION ${SHAREDIR})
IF (APPLE)
INSTALL(FILES
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19171&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Mon Jun 2 20:54:22 2014
@@ -129,6 +129,24 @@
version += " \"" + BUILD_NAME + "\"";
if (BUILD_NAME == "BleedingEdge")
built = tr("%3-%2-%1 %4 %5").arg(BUILD_DAY).arg(BUILD_MONTH).arg(BUILD_YEAR).arg(BUILD_TIME).arg(BUILD_TZ);
+
+
+ QFile revisionFile(ScPaths::instance().shareDir() + "/revision");
+ QString revText;
+ if (revisionFile.open(QIODevice::ReadOnly | QIODevice::Text))
+ {
+ QTextStream inRev(&revisionFile);
+ inRev.setCodec("UTF-8");
+ inRev.setAutoDetectUnicode(true);
+ while (!inRev.atEnd())
+ {
+ revText = inRev.readLine();
+ revText.replace("$Rev: ","SVN Revision: ");
+ revText.replace("$","");
+ built+=" - ";
+ built+=revText;
+ }
+ }
QString bu;
bu += "C";
More information about the scribus-commit
mailing list