OSDN Git Service

Now using a separate version/build number for the configuration, so INI settings...
authorLoRd_MuldeR <mulder2@gmx.de>
Thu, 2 May 2013 21:00:26 +0000 (23:00 +0200)
committerLoRd_MuldeR <mulder2@gmx.de>
Thu, 2 May 2013 21:00:26 +0000 (23:00 +0200)
LameXP.rc
src/Config.h
src/Global.cpp
src/Global.h
src/Model_Settings.cpp

index b99a203..7d4a001 100644 (file)
--- a/LameXP.rc
+++ b/LameXP.rc
@@ -1,7 +1,8 @@
 // Microsoft Visual C++ generated resource script.
 //
-#include "src/Resource.h"
+#define LAMEXP_INC_CONFIG
 #include "src/Config.h"
+#include "src/Resource.h"
 
 #define APSTUDIO_READONLY_SYMBOLS
 /////////////////////////////////////////////////////////////////////////////
index c358004..bd8861a 100644 (file)
 
 #pragma once
 
+#ifndef LAMEXP_INC_CONFIG
+#error Please do *not* include CONFIG.H directly!
+#endif
+
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP Version Info
 ///////////////////////////////////////////////////////////////////////////////
 
 #define VER_LAMEXP_MAJOR                                       4
 #define VER_LAMEXP_MINOR_HI                                    0
-#define VER_LAMEXP_MINOR_LO                                    7
-#define VER_LAMEXP_TYPE                                                Final
+#define VER_LAMEXP_MINOR_LO                                    8
+#define VER_LAMEXP_TYPE                                                Alpha
 #define VER_LAMEXP_PATCH                                       1
-#define VER_LAMEXP_BUILD                                       1286
+#define VER_LAMEXP_BUILD                                       1288
+#define VER_LAMEXP_CONFG                                       1288
 
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP Build Options
index 72e0e76..a1ed5d8 100644 (file)
@@ -50,6 +50,7 @@
 #include <QWriteLocker>
 
 //LameXP includes
+#define LAMEXP_INC_CONFIG
 #include "Resource.h"
 #include "Config.h"
 #include "LockedFile.h"
@@ -124,14 +125,16 @@ static const struct
        unsigned int ver_major;
        unsigned int ver_minor;
        unsigned int ver_build;
+       unsigned int ver_confg;
        char *ver_release_name;
 }
 g_lamexp_version =
 {
        VER_LAMEXP_MAJOR,
-       VER_LAMEXP_MINOR,
+       (10 * VER_LAMEXP_MINOR_HI) + VER_LAMEXP_MINOR_LO,
        VER_LAMEXP_BUILD,
-       VER_LAMEXP_RNAME
+       VER_LAMEXP_CONFG,
+       VER_LAMEXP_RNAME,
 };
 
 //Build date
@@ -349,6 +352,7 @@ const char* LAMEXP_DEFAULT_TRANSLATION = "LameXP_EN.qm";
 unsigned int lamexp_version_major(void) { return g_lamexp_version.ver_major; }
 unsigned int lamexp_version_minor(void) { return g_lamexp_version.ver_minor; }
 unsigned int lamexp_version_build(void) { return g_lamexp_version.ver_build; }
+unsigned int lamexp_version_confg(void) { return g_lamexp_version.ver_confg; }
 const char *lamexp_version_release(void) { return g_lamexp_version.ver_release_name; }
 const char *lamexp_version_time(void) { return g_lamexp_version_raw_time; }
 const char *lamexp_version_compiler(void) { return g_lamexp_version_compiler; }
index 4591494..5f8fcad 100644 (file)
@@ -96,6 +96,7 @@ lamexp_os_version_t;
 unsigned int lamexp_version_major(void);
 unsigned int lamexp_version_minor(void);
 unsigned int lamexp_version_build(void);
+unsigned int lamexp_version_confg(void);
 const QDate &lamexp_version_date(void);
 const char *lamexp_version_time(void);
 const char *lamexp_version_release(void);
index 21de443..4340784 100644 (file)
@@ -176,7 +176,7 @@ SettingsModel::SettingsModel(void)
        }
 
        m_settings = new QSettings(configPath, QSettings::IniFormat);
-       const QString groupKey = QString().sprintf("LameXP_%u%02u%05u", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build());
+       const QString groupKey = QString().sprintf("LameXP_%u%02u%05u", lamexp_version_major(), lamexp_version_minor(), lamexp_version_confg());
        QStringList childGroups = m_settings->childGroups();
 
        while(!childGroups.isEmpty())
@@ -187,7 +187,7 @@ SettingsModel::SettingsModel(void)
                {
                        bool ok = false;
                        unsigned int temp = filter.cap(3).toUInt(&ok) + 10;
-                       if(ok && (temp >= lamexp_version_build()))
+                       if(ok && (temp >= lamexp_version_confg()))
                        {
                                continue;
                        }