move version info to version.h, no longer needs full recompile on version change
This commit is contained in:
parent
62195dc2a3
commit
b3a2ab735b
2
.gitignore
vendored
2
.gitignore
vendored
@ -45,6 +45,8 @@ Makefile.me
|
|||||||
*.project
|
*.project
|
||||||
*.cproject
|
*.cproject
|
||||||
*.settings
|
*.settings
|
||||||
|
*.cbp
|
||||||
|
*.layout
|
||||||
config.log
|
config.log
|
||||||
*.sconsign.dblite
|
*.sconsign.dblite
|
||||||
*.sconf_temp
|
*.sconf_temp
|
||||||
|
72
src/Config.h
72
src/Config.h
@ -1,10 +1,3 @@
|
|||||||
/*
|
|
||||||
* Config.h
|
|
||||||
*
|
|
||||||
* Created on: Jan 5, 2012
|
|
||||||
* Author: Simon
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#ifndef CONFIG_H_
|
//#ifndef CONFIG_H_
|
||||||
//#define CONFIG_H_
|
//#define CONFIG_H_
|
||||||
|
|
||||||
@ -17,75 +10,10 @@
|
|||||||
#define PATH_SEP_CHAR '/'
|
#define PATH_SEP_CHAR '/'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//VersionInfoStart
|
|
||||||
#ifndef SAVE_VERSION
|
|
||||||
#define SAVE_VERSION 85
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MINOR_VERSION
|
|
||||||
#define MINOR_VERSION 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BUILD_NUM
|
|
||||||
#define BUILD_NUM 254
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SNAPSHOT_ID
|
|
||||||
#define SNAPSHOT_ID 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef STABLE
|
|
||||||
#ifndef BETA
|
|
||||||
#define BETA
|
|
||||||
#define SNAPSHOT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
//VersionInfoEnd
|
|
||||||
|
|
||||||
//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
|
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(RENDERER) || defined(X86_SSE2)
|
#if defined(DEBUG) || defined(RENDERER) || defined(X86_SSE2)
|
||||||
#define HIGH_QUALITY_RESAMPLE //High quality image resampling, slower but much higher quality than my terribad linear interpolation
|
#define HIGH_QUALITY_RESAMPLE //High quality image resampling, slower but much higher quality than my terribad linear interpolation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SNAPSHOT)
|
|
||||||
#define IDENT_RELTYPE "S"
|
|
||||||
#elif defined(BETA)
|
|
||||||
#define IDENT_RELTYPE "B"
|
|
||||||
#else
|
|
||||||
#define IDENT_RELTYPE "R"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(WIN)
|
|
||||||
#if defined(_64BIT)
|
|
||||||
#define IDENT_PLATFORM "WIN64"
|
|
||||||
#else
|
|
||||||
#define IDENT_PLATFORM "WIN32"
|
|
||||||
#endif
|
|
||||||
#elif defined(LIN)
|
|
||||||
#if defined(_64BIT)
|
|
||||||
#define IDENT_PLATFORM "LIN64"
|
|
||||||
#else
|
|
||||||
#define IDENT_PLATFORM "LIN32"
|
|
||||||
#endif
|
|
||||||
#elif defined(MACOSX)
|
|
||||||
#define IDENT_PLATFORM "MACOSX"
|
|
||||||
#else
|
|
||||||
#define IDENT_PLATFORM "UNKNOWN"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(X86_SSE3)
|
|
||||||
#define IDENT_BUILD "SSE3"
|
|
||||||
#elif defined(X86_SSE2)
|
|
||||||
#define IDENT_BUILD "SSE2"
|
|
||||||
#elif defined(X86_SSE)
|
|
||||||
#define IDENT_BUILD "SSE"
|
|
||||||
#else
|
|
||||||
#define IDENT_BUILD "NO"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter
|
|
||||||
|
|
||||||
#define MTOS_EXPAND(str) #str
|
#define MTOS_EXPAND(str) #str
|
||||||
#define MTOS(str) MTOS_EXPAND(str)
|
#define MTOS(str) MTOS_EXPAND(str)
|
||||||
|
|
||||||
|
69
src/Version.h
Normal file
69
src/Version.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
|
||||||
|
//VersionInfoStart
|
||||||
|
#ifndef SAVE_VERSION
|
||||||
|
#define SAVE_VERSION 85
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MINOR_VERSION
|
||||||
|
#define MINOR_VERSION 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BUILD_NUM
|
||||||
|
#define BUILD_NUM 254
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SNAPSHOT_ID
|
||||||
|
#define SNAPSHOT_ID 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef STABLE
|
||||||
|
#ifndef BETA
|
||||||
|
#define BETA
|
||||||
|
#define SNAPSHOT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
//VersionInfoEnd
|
||||||
|
|
||||||
|
//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
|
||||||
|
|
||||||
|
#if defined(SNAPSHOT)
|
||||||
|
#define IDENT_RELTYPE "S"
|
||||||
|
#elif defined(BETA)
|
||||||
|
#define IDENT_RELTYPE "B"
|
||||||
|
#else
|
||||||
|
#define IDENT_RELTYPE "R"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WIN)
|
||||||
|
#if defined(_64BIT)
|
||||||
|
#define IDENT_PLATFORM "WIN64"
|
||||||
|
#else
|
||||||
|
#define IDENT_PLATFORM "WIN32"
|
||||||
|
#endif
|
||||||
|
#elif defined(LIN)
|
||||||
|
#if defined(_64BIT)
|
||||||
|
#define IDENT_PLATFORM "LIN64"
|
||||||
|
#else
|
||||||
|
#define IDENT_PLATFORM "LIN32"
|
||||||
|
#endif
|
||||||
|
#elif defined(MACOSX)
|
||||||
|
#define IDENT_PLATFORM "MACOSX"
|
||||||
|
#else
|
||||||
|
#define IDENT_PLATFORM "UNKNOWN"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(X86_SSE3)
|
||||||
|
#define IDENT_BUILD "SSE3"
|
||||||
|
#elif defined(X86_SSE2)
|
||||||
|
#define IDENT_BUILD "SSE2"
|
||||||
|
#elif defined(X86_SSE)
|
||||||
|
#define IDENT_BUILD "SSE"
|
||||||
|
#else
|
||||||
|
#define IDENT_BUILD "NO"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define IDENT_VERSION "G"
|
||||||
|
|
||||||
|
#endif
|
@ -12,6 +12,7 @@
|
|||||||
#include <locale>
|
#include <locale>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "Version.h"
|
||||||
#include "Format.h"
|
#include "Format.h"
|
||||||
#include "LuaLuna.h"
|
#include "LuaLuna.h"
|
||||||
#include "LuaScriptInterface.h"
|
#include "LuaScriptInterface.h"
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "Version.h"
|
||||||
#include "Format.h"
|
#include "Format.h"
|
||||||
#include "Client.h"
|
#include "Client.h"
|
||||||
#include "MD5.h"
|
#include "MD5.h"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <bzlib.h>
|
#include <bzlib.h>
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "Version.h"
|
||||||
#include "Format.h"
|
#include "Format.h"
|
||||||
#include "bson/BSON.h"
|
#include "bson/BSON.h"
|
||||||
#include "GameSave.h"
|
#include "GameSave.h"
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "Version.h"
|
||||||
#include "HTTP.h"
|
#include "HTTP.h"
|
||||||
#include "MD5.h"
|
#include "MD5.h"
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "Version.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "GameView.h"
|
#include "GameView.h"
|
||||||
#include "graphics/Graphics.h"
|
#include "graphics/Graphics.h"
|
||||||
|
Reference in New Issue
Block a user