diff --git a/slsDetectorGui/Makefile b/slsDetectorGui/Makefile index ba8a37390..a49841d5a 100644 --- a/slsDetectorGui/Makefile +++ b/slsDetectorGui/Makefile @@ -55,7 +55,7 @@ doc: htmldoc: cd manual && $(MAKE) html DESTDIR=$(DOCDIR) -$(PROG): Makefile slsDetectorGui.pro $(DIR) +$(PROG): Makefile $(DIR) $(MAKE) -f Makefile.gui SLSDETLIB=$(DESTDIR) DESTDIR=$(DESTDIR) SUBLIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)' guiclient: diff --git a/slsDetectorGui/gitInfo.txt b/slsDetectorGui/gitInfo.txt index 3b60e9459..02a6142ce 100644 --- a/slsDetectorGui/gitInfo.txt +++ b/slsDetectorGui/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorGui URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git -Repsitory UUID: b1b9f6776cfa5994a7c360a5d170b7f8bc6ee41e -Revision: 401 +Repsitory UUID: 082fbe9d8d959d49d7dd10907e3ac10007154dc6 +Revision: 402 Branch: developer Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 401 -Last Changed Date: 2017-07-03 14:45:29 +0200 +Last Changed Rev: 402 +Last Changed Date: 2017-07-07 14:32:51.000000002 +0200 ./Makefile.gui diff --git a/slsDetectorGui/include/qTabDeveloper.h b/slsDetectorGui/include/qTabDeveloper.h index 2131a04e2..dfa3868f3 100644 --- a/slsDetectorGui/include/qTabDeveloper.h +++ b/slsDetectorGui/include/qTabDeveloper.h @@ -56,7 +56,7 @@ private: /** *@short sets up the Developer parameters */ -class qTabDeveloper:public QWidget{ +class qTabDeveloper:public QWidget { Q_OBJECT public: diff --git a/slsDetectorGui/slsDetectorGui.pro b/slsDetectorGui/slsDetectorGui.pro index 64a2f9218..753da18f6 100644 --- a/slsDetectorGui/slsDetectorGui.pro +++ b/slsDetectorGui/slsDetectorGui.pro @@ -22,7 +22,7 @@ QMAKE_LIBS = -L$(QTDIR)/lib #default DEFINES += VERBOSE DACS_INT PRINT_LOG #VERYVERBOSE CHECKINFERROR -LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib +LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib $(LDFLAGDET) CXXFLAGS += -g @@ -59,6 +59,7 @@ extralib.commands = echo `tput setaf 6`; \ echo 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; \ echo `./updateGitVersion.sh; tput sgr0` extralib.depends = $(target) + QMAKE_EXTRA_TARGETS += extralib PRE_TARGETDEPS = extra @@ -71,8 +72,7 @@ DEPENDPATH += \ forms/include -INCLUDEPATH = \ - . \ +INCLUDEPATH += \ $(QWTDIR)/include\ $(QWTDIR) \ $(QWTDIR)/src\ @@ -86,7 +86,8 @@ INCLUDEPATH = \ /usr/include/Qt\ /usr/include/QtCore\ /usr/include/QtGui\ - $(INCLUDES) + $(INCLUDES) + #epics # $(INCLUDES) /usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ @@ -143,7 +144,7 @@ HEADERS = \ include/qTabDebugging.h\ include/qTabDeveloper.h\ include/qTabMessages.h\ - gitInfoGui.h\ + include/gitInfoGui.h\ ../slsDetectorSoftware/commonFiles/sls_detector_defs.h\ ../slsReceiverSoftware/include/sls_receiver_defs.h\ include/qServer.h diff --git a/slsDetectorGui/src/qTabDeveloper.cpp b/slsDetectorGui/src/qTabDeveloper.cpp index 85e370a33..3c756b570 100644 --- a/slsDetectorGui/src/qTabDeveloper.cpp +++ b/slsDetectorGui/src/qTabDeveloper.cpp @@ -25,7 +25,7 @@ int qTabDeveloper::NUM_ADC_WIDGETS(0); //------------------------------------------------------------------------------------------------------------------------------------------------- -qTabDeveloper::qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector): +qTabDeveloper::qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector) : thisParent(parent), myDet(detector), det(0), @@ -50,7 +50,7 @@ qTabDeveloper::qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector): //------------------------------------------------------------------------------------------------------------------------------------------------- -qTabDeveloper::~qTabDeveloper(){ +qTabDeveloper::~qTabDeveloper() { delete myDet; if(det) delete det; if(thisParent) delete thisParent; @@ -60,7 +60,7 @@ qTabDeveloper::~qTabDeveloper(){ //------------------------------------------------------------------------------------------------------------------------------------------------- -void qTabDeveloper::SetupWidgetWindow(){ +void qTabDeveloper::SetupWidgetWindow() { //Detector Type detType=myDet->getDetectorsType(); @@ -224,7 +224,6 @@ void qTabDeveloper::SetupWidgetWindow(){ layout->addWidget(comboDetector,0,0); layout->addWidget(boxDacs,1,0); - //adcs if(NUM_ADC_WIDGETS) { int rows = NUM_ADC_WIDGETS/2; @@ -241,7 +240,7 @@ void qTabDeveloper::SetupWidgetWindow(){ layout->setVerticalSpacing(diff/2); } //timer to check adcs - /*adcTimer = new QTimer(this); adc timer disabled, display adcs only when refreshing developer tab*/ + /*adcTimer = new QTimer(this); adc timer disabled, display adcs only when refreshing developer tab */ } qDefs::checkErrorMessage(myDet,"qTabDeveloper::SetupWidgetWindow"); diff --git a/slsDetectorGui/updateGitVersion.sh b/slsDetectorGui/updateGitVersion.sh index 198e8f469..da7ad9e7d 100755 --- a/slsDetectorGui/updateGitVersion.sh +++ b/slsDetectorGui/updateGitVersion.sh @@ -1,35 +1,28 @@ MAINDIR=slsDetectorsPackage SPECDIR=slsDetectorGui -TMPFILE=gitInfoGuiTmp.h -INCLFILE=gitInfoGui.h +TMPFILE=include/gitInfoGuiTmp.h +INCLFILE=include/gitInfoGui.h WD=$PWD -GITREPO1='git remote -v' -GITREPO2=" | grep \"fetch\" | cut -d' ' -f1" -BRANCH1='git branch -v' -BRANCH2=" | grep '*' | cut -d' ' -f2" -REPUID1='git log --pretty=format:"%H" -1' -AUTH1_1='git log --pretty=format:"%cn" -1' -AUTH1_2=" | cut -d' ' -f1" -AUTH2_1='git log --pretty=format:"%cn" -1' -AUTH2_2=" | cut -d' ' -f2" -FOLDERREV1='git log --oneline . ' #used for all the individual server folders -FOLDERREV2=" | wc -l" #used for all the individual server folders -REV1='git log --oneline ' -REV2=" | wc -l" -RDATE1='git log --pretty=format:"%ci" -1' +#evaluate the variables +EVALFILE=../evalVersionVariables.sh +source $EVALFILE -GITREPO=`eval $GITREPO1 $GITREPO2` -BRANCH=`eval $BRANCH1 $BRANCH2` -REPUID=`eval $REPUID1` -AUTH1=`eval $AUTH1_1 $AUTH1_2` -AUTH2=`eval $AUTH2_1 $AUTH2_2` -REV=`eval $REV1 $REV2` -FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2` +#get modified date +#RDATE1='git log --pretty=format:"%ci" -1' +RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|build|.git|updateGitVersion' | head -n 1" RDATE=`eval $RDATE1` -echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt -cd .. -./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE -echo "Revision Updated" -cd $WD +NEWDATE=$(sed "s/-//g" <<< $RDATE | awk '{print $1;}') +NEWDATE=${NEWDATE/#/0x} +#get old date from INCLFILE +OLDDATE=$(more $INCLFILE | grep '#define SVNDATE' | awk '{print $3}') +echo $OLDDATE +echo $NEWDATE +#update INCLFILE if changes +if [ "$OLDDATE" != "$NEWDATE" ]; then + echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt + cd .. + ./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE + cd $WD +fi