Topic: Mod version name

Get the version name from git.
eg: git describe

add line in qelectrotech.pro

DEFINES += GIT_VERSION="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" describe)\\\""

mod line in aboutqetdialog.cpp

@@ -141,7 +141,7 @@ void AboutQETDialog::setContributors()
void AboutQETDialog::setVersion()
{
     QString str = "<span style=\"font-weight:bold;font-size:16pt;\">QElectroTech V "
-            + QET::displayedVersion
+            + QString(GIT_VERSION)
             + "</span>";

condition: add "Make clean" at the beginning of the Build Steps

Question: Is it worth knowing the git SHA1 ID if you will always need to build full

Post's attachments

Screenshot_20200724_003521.png, 104.89 kb, 1180 x 909
Screenshot_20200724_003521.png 104.89 kb, 206 downloads since 2020-07-24 

Re: Mod version name

I already do it in the packaging scripts.

https://qelectrotech.org/forum/viewtopi … 045#p10045

https://qelectrotech.org/wiki_new/doc/packaging_debian

GITCOMMIT=$(git rev-parse --short HEAD)
 
#Find Subversion revision number in trunk branch
if [ -z "$HEAD" ] ; then
#HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/trunk | grep revision=\" | tail -1 | cut -d\" -f2)   
A=$(git rev-list HEAD --count)
HEAD=$(($A+473))
 
fi
 
VERSION=$(cat sources/qet.h | grep "const QString version" |  cut -d\" -f2 | cut -d\" -f1)          #Find version tag in Subversion sources/qet.h
tagName=$(cat sources/qet.h | grep displayedVersion |  cut -d\" -f2 | cut -d\" -f1)                 #Find displayedVersion tag in Subversion sources/qet.h
 
 
cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/debian/patches/
sed -i 's/'"$tagName+[0-9]*"'/'"$tagName+$GITCOMMIT"'/' 03_qet.diff

https://qelectrotech.org/wiki_new/doc/p … n#appimage

https://git.tuxfamily.org/qet/qet.git/t … t.yaml#n98

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

3 (edited by De-Backer 2020-07-24 15:25:46)

Re: Mod version name

Okay I drop it,
About the loading time (especially under Windows): can I help with that or not?
And so what?

Re: Mod version name

Yes you can help to improve QET under Windows.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."