Changes to sconscript to allow building with specific version number
This commit is contained in:
parent
97bf9a517e
commit
45c31030a6
26
SConscript
26
SConscript
@ -40,6 +40,12 @@ AddOption('--sse2',dest="sse2",action='store_true',default=False,help="Enable SS
|
|||||||
AddOption('--sse3',dest="sse3",action='store_true',default=False,help="Enable SSE3 optimisations")
|
AddOption('--sse3',dest="sse3",action='store_true',default=False,help="Enable SSE3 optimisations")
|
||||||
AddOption('--x86',dest="x86",action='store_true',default=True,help="Target Intel x86 platform")
|
AddOption('--x86',dest="x86",action='store_true',default=True,help="Target Intel x86 platform")
|
||||||
|
|
||||||
|
AddOption('--beta',dest="beta",action='store_true',default=False,help="Beta build.")
|
||||||
|
AddOption('--save-version',dest="save-version",default=False,help="Save version.")
|
||||||
|
AddOption('--minor-version',dest="minor-version",default=False,help="Minor version.")
|
||||||
|
AddOption('--build-number',dest="build-number",default=False,help="Build number.")
|
||||||
|
AddOption('--snapshot',dest="snapshot",default=False,help="Snapshot build.")
|
||||||
|
|
||||||
if((not GetOption('lin32')) and (not GetOption('lin64')) and (not GetOption('win32')) and (not GetOption('macosx'))):
|
if((not GetOption('lin32')) and (not GetOption('lin64')) and (not GetOption('win32')) and (not GetOption('macosx'))):
|
||||||
print "You must specify a platform to target"
|
print "You must specify a platform to target"
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
@ -120,6 +126,18 @@ if(GetOption('lin32') or GetOption('lin64')):
|
|||||||
env.Append(CCFLAGS=['-m64'])
|
env.Append(CCFLAGS=['-m64'])
|
||||||
env.Append(CPPDEFINES=["LIN64"])
|
env.Append(CPPDEFINES=["LIN64"])
|
||||||
|
|
||||||
|
if(GetOption('beta')):
|
||||||
|
env.Append(CPPDEFINES='BETA')
|
||||||
|
|
||||||
|
if(GetOption('snapshot')):
|
||||||
|
env.Append(CPPDEFINES={'SNAPSHOT_ID': GetOption('snapshot')})
|
||||||
|
env.Append(CPPDEFINES='SNAPSHOT')
|
||||||
|
|
||||||
|
if(GetOption('save-version')):
|
||||||
|
env.Append(CPPDEFINES={'SAVE_VERSION': GetOption('major-version')})
|
||||||
|
|
||||||
|
if(GetOption('minor-version')):
|
||||||
|
env.Append(CPPDEFINES={'MINOR_VERSION': GetOption('minor-version')})
|
||||||
|
|
||||||
if(GetOption('release')):
|
if(GetOption('release')):
|
||||||
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer', '-funsafe-loop-optimizations', '-Wunsafe-loop-optimizations'])
|
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer', '-funsafe-loop-optimizations', '-Wunsafe-loop-optimizations'])
|
||||||
@ -159,6 +177,12 @@ sources+=Glob("generated/*.cpp")
|
|||||||
|
|
||||||
SetupSpawn(env)
|
SetupSpawn(env)
|
||||||
|
|
||||||
t=env.Program(target='powder', source=sources)
|
if(GetOption('win32')):
|
||||||
|
t=env.Program(target='powder.exe', source=sources)
|
||||||
|
else:
|
||||||
|
t=env.Program(target='powder', source=sources)
|
||||||
Default(t)
|
Default(t)
|
||||||
|
|
||||||
|
if(GetOption('release')):
|
||||||
|
StripExecutable(t);
|
||||||
|
|
||||||
|
13
src/Config.h
13
src/Config.h
@ -16,15 +16,24 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//VersionInfoStart
|
//VersionInfoStart
|
||||||
|
#ifndef SAVE_VERSION
|
||||||
#define SAVE_VERSION 80
|
#define SAVE_VERSION 80
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MINOR_VERSION
|
||||||
#define MINOR_VERSION 3
|
#define MINOR_VERSION 3
|
||||||
#define BETA
|
#endif
|
||||||
#define SNAPSHOT
|
|
||||||
|
#ifndef BUILD_NUM
|
||||||
#define BUILD_NUM 155
|
#define BUILD_NUM 155
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SNAPSHOT_ID
|
#ifndef SNAPSHOT_ID
|
||||||
#define SNAPSHOT_ID 0
|
#define SNAPSHOT_ID 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BETA
|
||||||
|
#define SNAPSHOT
|
||||||
//VersionInfoEnd
|
//VersionInfoEnd
|
||||||
|
|
||||||
#if defined(SNAPSHOT)
|
#if defined(SNAPSHOT)
|
||||||
|
Reference in New Issue
Block a user