mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
774476f4d3
commit
a36475a167
@ -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
|
||||
TEMPLATE = app
|
||||
TARGET = RetroShare
|
||||
@ -19,6 +19,28 @@ 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 ###################
|
||||
|
||||
win32-x-g++ {
|
||||
|
@ -63,6 +63,12 @@ HelpDialog::HelpDialog(QWidget *parent)
|
||||
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);
|
||||
|
||||
|
||||
|
@ -555,6 +555,9 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTextBrowser" name="version"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
|
6
retroshare-gui/src/gui/help/version.html
Normal file
6
retroshare-gui/src/gui/help/version.html
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
Git version :
|
||||
commit 97624bbb26566beefeb02c4ed8627d10879d9c28
|
||||
# On branch master
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<RCC>
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>help/authors.html</file>
|
||||
<file>help/licence.html</file>
|
||||
@ -430,12 +430,11 @@
|
||||
<file>smileys/wink.png</file>
|
||||
<file>smileys/wondering.png</file>
|
||||
<file>smileys/emotes.acs</file>
|
||||
|
||||
<file>images/connect/connectFriendWatermark.png</file>
|
||||
<file>images/connect/connectFriendLogo.png</file>
|
||||
<file>images/connect/connectFriendBanner.png</file>
|
||||
<file>images/connect/info16.png</file>
|
||||
<file>images/connect/mail_send.png</file>
|
||||
|
||||
<file>help/version.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user