diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 253fd69..1ad873a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -25,6 +25,14 @@ if( WITH_GCC_VISIBILITY ) endif( WITH_GCC_VISIBILITY ) +##### get commit hash information +execute_process( + COMMAND git describe --abbrev=8 --dirty --always + OUTPUT_VARIABLE GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE +) + + ##### check for stream support check_cxx_source_compiles( diff --git a/config.h.cmake b/config.h.cmake index 0d0af75..bf4bed3 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,4 +1,5 @@ -#define VERSION "@VERSION@" +#define VERSION "@VERSION@" +#define GIT_HASH "@GIT_HASH@" // application share location #define APP_SHARE_PATH "@SHARE_INSTALL_PREFIX@/universal-indent-gui-tqt" diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index 9bb119d..e604852 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -52,8 +52,7 @@ AboutDialog::AboutDialog(TQWidget *parent, WFlags flags) : //---- //---- TQString versionString = _dialogForm->versionTextBrowser->toHtml(); //---- versionString = -//---- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg( -//---- UiGuiVersion::getBuildDate()); +//---- versionString.arg(PROGRAM_VERSION_STRING); //---- _dialogForm->versionTextBrowser->setHtml(versionString); //---- //---- _dialogForm->creditsTextBrowser->setHtml("
" @@ -115,8 +114,7 @@ void AboutDialog::changeEvent(TQEvent *event) //---- //---- TQString versionString = _dialogForm->versionTextBrowser->toHtml(); //---- versionString = -//---- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg( -//---- UiGuiVersion::getBuildDate()); +//---- versionString.arg(PROGRAM_VERSION_STRING); //---- _dialogForm->versionTextBrowser->setHtml(versionString); //---- } //---- else diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84845f3..1744c4a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,9 +7,9 @@ ################################################# include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} ${TQT_INCLUDE_DIRS} ) @@ -26,31 +26,30 @@ link_directories( set( target universal-indent-gui-tqt ) set( ${target}_SRCS - # completed - MainWindowBase.ui - ToolBarWidget.ui - - IndentHandler.cpp - SettingsPaths.cpp - TemplateBatchScript.cpp - UiGuiErrorMessage.cpp - UiGuiHighlighter.cpp - UiGuiIniFileParser.cpp - UiGuiVersion.cpp - - # ongoing - AboutDialogBase.ui - UiGuiSettingsDialogBase.ui - - AboutDialog.cpp - MainWindow.cpp - main.cpp - UiGuiSettings.cpp - UiGuiSettingsDialog.cpp + # completed + MainWindowBase.ui + ToolBarWidget.ui + + IndentHandler.cpp + SettingsPaths.cpp + TemplateBatchScript.cpp + UiGuiErrorMessage.cpp + UiGuiHighlighter.cpp + UiGuiIniFileParser.cpp + + # ongoing + AboutDialogBase.ui + UiGuiSettingsDialogBase.ui + + AboutDialog.cpp + MainWindow.cpp + main.cpp + UiGuiSettings.cpp + UiGuiSettingsDialog.cpp ) tde_add_executable( ${target} AUTOMOC SOURCES ${${target}_SRCS} - LINK ${TQT_LIBRARIES} ${TQSCINTILLA_LIBRARIES} - DESTINATION ${BIN_INSTALL_DIR} + LINK ${TQT_LIBRARIES} ${TQSCINTILLA_LIBRARIES} + DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/src/UiGuiVersion.cpp b/src/UiGuiVersion.cpp deleted file mode 100644 index c996ff5..0000000 --- a/src/UiGuiVersion.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2012 by Thomas Schweitzer * - * thomas-schweitzer(at)arcor.de * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License version 2.0 as * - * published by the Free Software Foundation. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program in the file LICENSE.GPL; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include "UiGuiVersion.h" - -#include