Add a static and a build time version information

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1409 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-07-22 22:03:34 +00:00
parent 774476f4d3
commit a36475a167
5 changed files with 112 additions and 76 deletions

View File

@ -1,4 +1,4 @@
CONFIG += qt gui uic qrc resources uitools debug # pluginmgr release CONFIG += qt gui uic qrc resources uitools debug # pluginmgr release version_detail_linux
QT += network xml script QT += network xml script
TEMPLATE = app TEMPLATE = app
TARGET = RetroShare TARGET = RetroShare
@ -19,6 +19,28 @@ linux-g++-64 {
QMAKE_LFLAGS += -L"../../../../lib/linux-g++-64" QMAKE_LFLAGS += -L"../../../../lib/linux-g++-64"
} }
version_detail_linux {
system(echo "" > gui/help/version.html)
system(ls /usr/bin/git) {
system(/usr/bin/git log) {
#retrieve git commit
system(echo "Git version : " >> gui/help/version.html)
system(git log -n 1 | grep commit >> gui/help/version.html)
system(git log -n 1 | grep svn >> gui/help/version.html)
system(git status | grep branch >> gui/help/version.html)
system(echo "" >> gui/help/version.html)
system(echo "" >> gui/help/version.html)
}
}
system(ls /usr/bin/svn) {
system(/usr/bin/svn info) {
#retrieve svn revision
system(echo "Svn version : " >> gui/help/version.html)
system(svn info | head -n 5 | head -n 5 | tail -1 >> gui/help/gitversion.txt)
}
}
}
#################### Cross compilation for windows under Linux ################### #################### Cross compilation for windows under Linux ###################
win32-x-g++ { win32-x-g++ {

View File

@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include "HelpDialog.h" #include "HelpDialog.h"
#include "rsiface/rsiface.h" #include "rsiface/rsiface.h"
#include <iostream> #include <iostream>
@ -37,13 +37,13 @@
#include <QPixmap> #include <QPixmap>
/* Images for context menu icons */ /* Images for context menu icons */
#define IMAGE_DOWNLOAD ":/images/start.png" #define IMAGE_DOWNLOAD ":/images/start.png"
/** Constructor */ /** Constructor */
HelpDialog::HelpDialog(QWidget *parent) HelpDialog::HelpDialog(QWidget *parent)
:QDialog(parent) :QDialog(parent)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
//QFile licenseFile(QLatin1String(":/images/COPYING")); //QFile licenseFile(QLatin1String(":/images/COPYING"));
@ -60,16 +60,22 @@ HelpDialog::HelpDialog(QWidget *parent)
QFile thanksFile(QLatin1String(":/help/thanks.html")); QFile thanksFile(QLatin1String(":/help/thanks.html"));
if (thanksFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (thanksFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream in(&thanksFile); QTextStream in(&thanksFile);
ui.thanks->setText(in.readAll()); ui.thanks->setText(in.readAll());
} }
QFile versionFile(QLatin1String(":/help/version.html"));
if (versionFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream in(&versionFile);
ui.version->setText(in.readAll());
}
ui.label_2->setMinimumWidth(20); ui.label_2->setMinimumWidth(20);
/* Hide platform specific features */ /* Hide platform specific features */
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
#endif #endif
} }

View File

@ -555,6 +555,9 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QTextBrowser" name="version"/>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_2">

View File

@ -0,0 +1,6 @@
Git version :
commit 97624bbb26566beefeb02c4ed8627d10879d9c28
# On branch master

View File

@ -1,4 +1,4 @@
<RCC> <RCC>
<qresource prefix="/" > <qresource prefix="/" >
<file>help/authors.html</file> <file>help/authors.html</file>
<file>help/licence.html</file> <file>help/licence.html</file>
@ -53,7 +53,7 @@
<file>images/avatar_background.png</file> <file>images/avatar_background.png</file>
<file>images/backgroundimage.png</file> <file>images/backgroundimage.png</file>
<file>images/button_cancel.png</file> <file>images/button_cancel.png</file>
<file>images/calendar.png</file> <file>images/calendar.png</file>
<file>images/chat.png</file> <file>images/chat.png</file>
<file>images/chat/bar_end.png</file> <file>images/chat/bar_end.png</file>
<file>images/chat/bar_fill.png</file> <file>images/chat/bar_fill.png</file>
@ -221,15 +221,15 @@
<file>images/mail_get.png</file> <file>images/mail_get.png</file>
<file>images/mail_reply.png</file> <file>images/mail_reply.png</file>
<file>images/mail_replyall.png</file> <file>images/mail_replyall.png</file>
<file>images/mail_forward.png</file> <file>images/mail_forward.png</file>
<file>images/mail_send.png</file> <file>images/mail_send.png</file>
<file>images/mail_new.png</file> <file>images/mail_new.png</file>
<file>images/mail_send24.png</file> <file>images/mail_send24.png</file>
<file>images/mailforward24-hover.png</file> <file>images/mailforward24-hover.png</file>
<file>images/message-mail.png</file> <file>images/message-mail.png</file>
<file>images/message-mail-read.png</file> <file>images/message-mail-read.png</file>
<file>images/message-mail-imapdelete.png</file> <file>images/message-mail-imapdelete.png</file>
<file>images/message-mail-replied-read.png</file> <file>images/message-mail-replied-read.png</file>
<file>images/message-news.png</file> <file>images/message-news.png</file>
<file>images/message.png</file> <file>images/message.png</file>
<file>images/messenger.png</file> <file>images/messenger.png</file>
@ -383,59 +383,58 @@
<file>qss/over/greentop.png</file> <file>qss/over/greentop.png</file>
<file>qss/silver.qss</file> <file>qss/silver.qss</file>
<file>qss/silver/silver.png</file> <file>qss/silver/silver.png</file>
<file>qss/skin2.qss</file> <file>qss/skin2.qss</file>
<file>qss/skin2/background.png</file> <file>qss/skin2/background.png</file>
<file>qss/chat/default.htm</file> <file>qss/chat/default.htm</file>
<file>qss/chat/default.css</file> <file>qss/chat/default.css</file>
<file>qss/chat/second.htm</file> <file>qss/chat/second.htm</file>
<file>qss/chat/second.css</file> <file>qss/chat/second.css</file>
<file>qss/chat/second.css</file> <file>qss/chat/second.css</file>
<file>smileys/angry.png</file> <file>smileys/angry.png</file>
<file>smileys/beer.png</file> <file>smileys/beer.png</file>
<file>smileys/cake.png</file> <file>smileys/cake.png</file>
<file>smileys/camera.png</file> <file>smileys/camera.png</file>
<file>smileys/cat.png</file> <file>smileys/cat.png</file>
<file>smileys/clock.png</file> <file>smileys/clock.png</file>
<file>smileys/cloudy.png</file> <file>smileys/cloudy.png</file>
<file>smileys/coffee.png</file> <file>smileys/coffee.png</file>
<file>smileys/cool.png</file> <file>smileys/cool.png</file>
<file>smileys/crying.png</file> <file>smileys/crying.png</file>
<file>smileys/face-devil-grin48.png</file> <file>smileys/face-devil-grin48.png</file>
<file>smileys/in-love.png</file> <file>smileys/in-love.png</file>
<file>smileys/island.png</file> <file>smileys/island.png</file>
<file>smileys/kissing.png</file> <file>smileys/kissing.png</file>
<file>smileys/laugh.png</file> <file>smileys/laugh.png</file>
<file>smileys/liquor.png</file> <file>smileys/liquor.png</file>
<file>smileys/lol.png</file> <file>smileys/lol.png</file>
<file>smileys/love-over.png</file> <file>smileys/love-over.png</file>
<file>smileys/love.png</file> <file>smileys/love.png</file>
<file>smileys/mobile.png</file> <file>smileys/mobile.png</file>
<file>smileys/moneyeyes.png</file> <file>smileys/moneyeyes.png</file>
<file>smileys/moon.png</file> <file>smileys/moon.png</file>
<file>smileys/party.png</file> <file>smileys/party.png</file>
<file>smileys/peace.png</file> <file>smileys/peace.png</file>
<file>smileys/phone.png</file> <file>smileys/phone.png</file>
<file>smileys/pirate.png</file> <file>smileys/pirate.png</file>
<file>smileys/pizza.png</file> <file>smileys/pizza.png</file>
<file>smileys/pouty.png</file> <file>smileys/pouty.png</file>
<file>smileys/pumpkin.png</file> <file>smileys/pumpkin.png</file>
<file>smileys/rain.png</file> <file>smileys/rain.png</file>
<file>smileys/rotfl.png</file> <file>smileys/rotfl.png</file>
<file>smileys/sad.png</file> <file>smileys/sad.png</file>
<file>smileys/smile.png</file> <file>smileys/smile.png</file>
<file>smileys/surprised.png</file> <file>smileys/surprised.png</file>
<file>smileys/thunder.png</file> <file>smileys/thunder.png</file>
<file>smileys/tongue.png</file> <file>smileys/tongue.png</file>
<file>smileys/umbrella.png</file> <file>smileys/umbrella.png</file>
<file>smileys/wink.png</file> <file>smileys/wink.png</file>
<file>smileys/wondering.png</file> <file>smileys/wondering.png</file>
<file>smileys/emotes.acs</file> <file>smileys/emotes.acs</file>
<file>images/connect/connectFriendWatermark.png</file> <file>images/connect/connectFriendWatermark.png</file>
<file>images/connect/connectFriendLogo.png</file> <file>images/connect/connectFriendLogo.png</file>
<file>images/connect/connectFriendBanner.png</file> <file>images/connect/connectFriendBanner.png</file>
<file>images/connect/info16.png</file> <file>images/connect/info16.png</file>
<file>images/connect/mail_send.png</file> <file>images/connect/mail_send.png</file>
<file>help/version.html</file>
</qresource> </qresource>
</RCC> </RCC>