Browse Source

fixes number version by included date

master
Ulrich Van Den Hekke 11 years ago
parent
commit
534d9e5491
  1. 2
      cmake_modules/FindMercurial.cmake
  2. 25
      cmake_modules/map-cmdline.cmake
  3. 7
      framework/CMakeLists.txt
  4. 12
      framework/application/aboutdialogimpl.cpp
  5. 13
      framework/core/version.h.in
  6. 2
      framework/rc/libxinx.rc
  7. 2
      plugins/cvsplugin/rc/plugin.rc
  8. 2
      plugins/empty/rc/plugin.rc
  9. 2
      plugins/generix/rc/plugin.rc
  10. 2
      plugins/services/rc/plugin.rc
  11. 2
      plugins/svnplugin/rc/plugin.rc
  12. 2
      plugins/svnpluginwrapper/rc/plugin.rc
  13. 2
      xinx/rc/xinx.rc

2
cmake_modules/FindMercurial.cmake

@ -91,7 +91,7 @@ IF(MERCURIAL_EXECUTABLE)
STRING(REGEX REPLACE "^([0-9a-f]+).*"
"\\1" ${prefix}_HG_CHANGESET "${MERCURIAL_id_OUTPUT}")
MERCURIAL_COMMAND(${dir} log -r ${${prefix}_HG_CHANGESET})
MERCURIAL_COMMAND(${dir} log -r ${${prefix}_HG_CHANGESET} --style ${CMAKE_MODULE_PATH}/map-cmdline.cmake)
STRING(REGEX REPLACE ";" "\\\\;"
MERCURIAL_log_OUTPUT "${MERCURIAL_log_OUTPUT}")

25
cmake_modules/map-cmdline.cmake

@ -0,0 +1,25 @@
changeset = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|shortdate}\nsummary: {desc|firstline}\n\n'
changeset_quiet = '{rev}:{node|short}\n'
changeset_verbose = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
changeset_debug = 'changeset: {rev}:{node}\n{branches}{bookmarks}{tags}{parents}{manifest}user: {author}\ndate: {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
start_files = 'files: '
file = ' {file}'
end_files = '\n'
start_file_mods = 'files: '
file_mod = ' {file_mod}'
end_file_mods = '\n'
start_file_adds = 'files+: '
file_add = ' {file_add}'
end_file_adds = '\n'
start_file_dels = 'files-: '
file_del = ' {file_del}'
end_file_dels = '\n'
start_file_copies = 'copies: '
file_copy = ' {name} ({source})'
end_file_copies = '\n'
parent = 'parent: {rev}:{node|formatnode}\n'
manifest = 'manifest: {rev}:{node}\n'
branch = 'branch: {branch}\n'
tag = 'tag: {tag}\n'
bookmark = 'bookmark: {bookmark}\n'
extra = 'extra: {key}={value|stringescape}\n'

7
framework/CMakeLists.txt

@ -6,11 +6,14 @@ find_package(LibXslt REQUIRED)
find_package(Mercurial)
if(MERCURIAL_FOUND)
MERCURIAL_HG_INFO(${PROJECT_SOURCE_DIR} XINX_FRAMEWORK)
MERCURIAL_HG_INFO(${PROJECT_SOURCE_DIR} XINX_FRAMEWORK)
endif(MERCURIAL_FOUND)
if(NOT ${XINX_FRAMEWORK_HG_CHANGESET} STREQUAL "")
set(XINX_FRAMEWORK_HG_CHANGESET_STR "-${XINX_FRAMEWORK_HG_CHANGESET}")
string(REPLACE "-" "" XINX_FRAMEWORK_HG_DATE_ISO ${XINX_FRAMEWORK_HG_DATE})
# La date est positonné sur 5 caractère pour être inférieur à 65536 (on aura un problème en 2017,
# 65526 est la limite max, pour les fichiers de type .rc sous windows pour un numéro de version (w.x.y.z)
string(SUBSTRING ${XINX_FRAMEWORK_HG_DATE_ISO} 3 5 XINX_FRAMEWORK_HG_DATE_STR)
endif()
configure_file(core/version.h.in core/version.h)

12
framework/application/aboutdialogimpl.cpp

@ -49,7 +49,17 @@ AboutDialogImpl::AboutDialogImpl(QWidget * parent, Qt::WFlags f) : QDialog(paren
{
setupUi(this);
m_labelVersion->setText(tr("<b>XINX %1 (use Qt %2)</b>").arg(LONG_VERSION_STRING).arg(qVersion()));
QString versionString;
if(!QString(VERSION_CHANGESET).isEmpty())
{
versionString = tr("<b>XINX %1 (Changeset %2 using Qt %3)</b>").arg(VERSION).arg(VERSION_CHANGESET).arg(qVersion());
}
else
{
versionString = tr("<b>XINX %1 (using Qt %2)</b>").arg(VERSION).arg(qVersion());
}
m_labelVersion->setText(versionString);
m_aboutLabel->setText("<b>XINX</b> Is Not only XML<br/>"
"(c) 2006-2011, Ulrich Van Den Hekke<br/>"

13
framework/core/version.h.in

@ -24,20 +24,19 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 10
#define VERSION_RELEASE 1
#define VERSION_BUILD ${XINX_FRAMEWORK_HG_DATE_STR}
#define VERSION_CHANGESET "${XINX_FRAMEWORK_HG_CHANGESET}"
#define VERSION_CHANGESET_STR "${XINX_FRAMEWORK_HG_CHANGESET_STR}"
#define str(s) #s
#define xstr(s) str(s)
#define FILEVER VERSION_MAJOR , VERSION_MINOR , VERSION_RELEASE , 0
#define PRODUCTVER VERSION_MAJOR , VERSION_MINOR , VERSION_RELEASE , 0
#define STRFILEVER xstr(VERSION_MAJOR) "," xstr(VERSION_MINOR) "," xstr(VERSION_RELEASE) "\0"
#define STRPRODUCTVER xstr(VERSION_MAJOR) "," xstr(VERSION_MINOR) "," xstr(VERSION_RELEASE) "\0"
#define FILEVER VERSION_MAJOR , VERSION_MINOR , VERSION_RELEASE , VERSION_BUILD
#define PRODUCTVER VERSION_MAJOR , VERSION_MINOR , VERSION_RELEASE , VERSION_BUILD
#define STRFILEVER xstr(VERSION_MAJOR) "," xstr(VERSION_MINOR) "," xstr(VERSION_RELEASE) "," xstr(VERSION_BUILD) "\0"
#define STRPRODUCTVER xstr(VERSION_MAJOR) "," xstr(VERSION_MINOR) "," xstr(VERSION_RELEASE) "," xstr(VERSION_BUILD) "\0"
#define VERSION xstr(VERSION_MAJOR) "." xstr(VERSION_MINOR) "." xstr(VERSION_RELEASE) VERSION_CHANGESET_STR
#define VERSION xstr(VERSION_MAJOR) "." xstr(VERSION_MINOR) "." xstr(VERSION_RELEASE) "." xstr(VERSION_BUILD)
#define VERSION_STRING "v" xstr(VERSION_MAJOR) "." xstr(VERSION_MINOR)
#define LONG_VERSION_STRING "v" xstr(VERSION_MAJOR) "." xstr(VERSION_MINOR) "." xstr(VERSION_RELEASE) VERSION_CHANGESET_STR
#endif /* _VERSION_H_ */

2
framework/rc/libxinx.rc

@ -20,7 +20,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "XINX Shared Library"
VALUE "InternalName", "libframework"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "framework.dll"
VALUE "PrivateBuild", "\0"

2
plugins/cvsplugin/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "Wrapper of CVS"
VALUE "InternalName", "cvsplugin"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "cvsplugin.dll"
VALUE "PrivateBuild", "\0"

2
plugins/empty/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "XINX Demo Empty Plugin"
VALUE "InternalName", "empty"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "empty.dll"
VALUE "PrivateBuild", "\0"

2
plugins/generix/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "XINX Generix Plugin"
VALUE "InternalName", "generix"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "generix.dll"
VALUE "PrivateBuild", "\0"

2
plugins/services/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "XINX WebServices"
VALUE "InternalName", "services"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "services.dll"
VALUE "PrivateBuild", "\0"

2
plugins/svnplugin/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "Wrapper for SubVersion"
VALUE "InternalName", "subversion"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "svnplugin.dll"
VALUE "PrivateBuild", "\0"

2
plugins/svnpluginwrapper/rc/plugin.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "Wrapper for SubVersion"
VALUE "InternalName", "subversion"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "svnplugin.dll"
VALUE "PrivateBuild", "\0"

2
xinx/rc/xinx.rc

@ -21,7 +21,7 @@ BEGIN
VALUE "CompanyName", "Ulrich Van Den Hekke"
VALUE "FileDescription", "XINX Application"
VALUE "InternalName", "xinx"
VALUE "LegalCopyright", "Copyleft (C) U. Van Den Hekke 2010"
VALUE "LegalCopyright", "Copyleft 2007-2011 (C) by Ulrich Van Den Hekke"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "xinx.exe"
VALUE "PrivateBuild", "\0"

Loading…
Cancel
Save