[vlmc-devel] commit: Don't use the git revision when checking the config file version. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Tue Oct 26 16:17:30 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Oct 26 12:56:36 2010 +0200| [b03f5b767f6dcd9109f9c99a14d8f529d2e6c6c9] | committer: Hugo Beauzée-Luyssen
Don't use the git revision when checking the config file version.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=b03f5b767f6dcd9109f9c99a14d8f529d2e6c6c9
---
CMakeLists.txt | 1 +
cmake/config.h.cmake | 3 +++
src/Gui/MainWindow.cpp | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59a7daf..8204f75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,6 +55,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
SET(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
+SET(PROJECT_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
MESSAGE(STATUS "VLMC Version: ${PROJECT_VERSION}")
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 94196fd..98e54a6 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -19,6 +19,9 @@
/* OS Name */
#cmakedefine SYSNAME "@SYSNAME@"
+/* VLMC's major version */
+#cmakedefine PROJECT_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@"
+
/* VLMC's version */
#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@"
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 18bcda1..9538a00 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -322,7 +322,7 @@ MainWindow::initVlmcPreferences()
//Load saved preferences :
QSettings s;
- if ( s.value( "VlmcVersion" ).toString() != PROJECT_VERSION )
+ if ( s.value( "VlmcVersion" ).toString() != PROJECT_VERSION_MAJOR )
s.clear();
else
{
@@ -331,7 +331,7 @@ MainWindow::initVlmcPreferences()
loadVlmcPreferences( "youtube" );
loadVlmcPreferences( "network" );
}
- s.setValue( "VlmcVersion", PROJECT_VERSION );
+ s.setValue( "VlmcVersion", PROJECT_VERSION_MAJOR );
}
void
More information about the Vlmc-devel
mailing list