Merge pull request #2707 from akien-mga/master

Cosmetic fixes to SCons buildsystem
This commit is contained in:
Juan Linietsky 2015-11-18 19:43:28 -03:00
commit 0c3386b2ed
65 changed files with 46 additions and 159 deletions

View file

@ -59,7 +59,7 @@ platform_arg = ARGUMENTS.get("platform", False)
if (os.name=="posix"):
pass
elif (os.name=="nt"):
if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"):
if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"):
custom_tools=['mingw']
env_base=Environment(tools=custom_tools,ENV = {'PATH' : os.environ['PATH']});
@ -185,7 +185,7 @@ if selected_platform in platform_list:
if env['vsproj']=="yes":
env.vs_incs = []
env.vs_srcs = []
def AddToVSProject( sources ):
for x in sources:
if type(x) == type(""):
@ -197,12 +197,12 @@ if selected_platform in platform_list:
basename = pieces[0]
basename = basename.replace('\\\\','/')
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
env.vs_incs = env.vs_incs + [basename + ".h"]
#print basename
env.AddToVSProject = AddToVSProject
env.vs_incs = env.vs_incs + [basename + ".h"]
#print basename
env.AddToVSProject = AddToVSProject
env.extra_suffix=""
if env["extra_suffix"] != '' :
env.extra_suffix += '.'+env["extra_suffix"]
@ -229,7 +229,7 @@ if selected_platform in platform_list:
#must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
detect.configure(env)
#env['platform_libsuffix'] = env['LIBSUFFIX']
#env['platform_libsuffix'] = env['LIBSUFFIX']
suffix="."+selected_platform
@ -284,10 +284,11 @@ if selected_platform in platform_list:
if (env['musepack']=='yes'):
env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']);
if (env['openssl']!='no'):
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
if (env['openssl']=="builtin"):
env.Append(CPPPATH=['#drivers/builtin_openssl2'])
if (env['openssl']!='no'):
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
if (env['openssl']=="builtin"):
env.Append(CPPPATH=['#drivers/builtin_openssl2'])
if (env["builtin_zlib"]=='yes'):
env.Append(CPPPATH=['#drivers/builtin_zlib/zlib'])
@ -337,7 +338,7 @@ if selected_platform in platform_list:
if (env['colored']=='yes'):
methods.colored(sys,env)
if (env['etc1']=='yes'):
env.Append(CPPFLAGS=['-DETC1_ENABLED'])
@ -356,22 +357,22 @@ if selected_platform in platform_list:
SConscript("main/SCsub")
SConscript("platform/"+selected_platform+"/SCsub"); # build selected platform
# Microsoft Visual Studio Project Generation
if (env['vsproj'])=="yes":
# Microsoft Visual Studio Project Generation
if (env['vsproj'])=="yes":
AddToVSProject(env.core_sources)
AddToVSProject(env.main_sources)
AddToVSProject(env.modules_sources)
AddToVSProject(env.modules_sources)
AddToVSProject(env.scene_sources)
AddToVSProject(env.servers_sources)
AddToVSProject(env.tool_sources)
#env['MSVS_VERSION']='9.0'
env['MSVSBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
env['MSVSREBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes vsproj=true"
env['MSVSCLEANCOM'] = "scons --clean platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
debug_variants = ['Debug|Win32']+['Debug|x64']
release_variants = ['Release|Win32']+['Release|x64']
release_debug_variants = ['Release_Debug|Win32']+['Release_Debug|x64']
@ -382,11 +383,11 @@ if selected_platform in platform_list:
targets = debug_targets + release_targets + release_debug_targets
msvproj = env.MSVSProject(target = ['#godot' + env['MSVSPROJECTSUFFIX'] ],
incs = env.vs_incs,
srcs = env.vs_srcs,
runfile = targets,
buildtarget = targets,
auto_build_solution=1,
variant = variants)
srcs = env.vs_srcs,
runfile = targets,
buildtarget = targets,
auto_build_solution=1,
variant = variants)
else:

View file

@ -10,5 +10,3 @@ Export('env')
lib = env.Library("tests",env.tests_sources)
env.Prepend(LIBS=[lib])

View file

@ -63,5 +63,3 @@ SConscript('bind/SCsub');
lib = env.Library("core",env.core_sources)
env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.core_sources,"*.cpp")
Export('env')

View file

@ -5,5 +5,3 @@ env.add_source_files(env.core_sources,"*.c")
#env.core_sources.append("io/fastlz.c")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.core_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.core_sources,"*.cpp")
Export('env')

View file

@ -99,4 +99,3 @@ env.Prepend(LIBS=lib_list)
#lib = env.Library("drivers",env.drivers_sources)
#env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.drivers_sources,"*.cpp")
Export('env')

View file

@ -1,7 +1,7 @@
Import('env')
zlib_sources = [
"builtin_zlib/zlib/adler32.c",
"builtin_zlib/zlib/compress.c",
"builtin_zlib/zlib/crc32.c",

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.drivers_sources,"*.cpp")
Export('env')

View file

@ -8,4 +8,3 @@ dds_sources = [
env.drivers_sources+=dds_sources
#env.add_source_files(env.drivers_sources, dds_sources)

View file

@ -12,4 +12,3 @@ if (env["etc1"] != "no"):
#env.add_source_files(env.drivers_sources, etc_sources)
Export('env')

View file

@ -3,4 +3,3 @@ Export('env');
env.add_source_files(env.drivers_sources,"*.cpp")
env.add_source_files(env.drivers_sources,"*.c")

View file

@ -6,5 +6,3 @@ if env['BUILDERS'].has_key('GLSL120GLES'):
env.GLSL120GLES('canvas_shadow.glsl');
env.GLSL120GLES('blur.glsl');
env.GLSL120GLES('copy.glsl');

View file

@ -10,4 +10,3 @@ jpg_sources = [
env.drivers_sources+=jpg_sources
#env.add_source_files(env.drivers_sources, jpg_sources)

View file

@ -19,4 +19,3 @@ env.add_source_files(env.drivers_sources,"*.cpp")
#env.add_source_files(env.drivers_sources, mpc_sources)
Export('env')

View file

@ -3,4 +3,3 @@ Export('env');
env.add_source_files(env.drivers_sources,"*.cpp")
#env.add_source_files(env.drivers_sources,"*.c")

View file

@ -1,4 +1,3 @@
Import('env')
sources = [
@ -6,4 +5,3 @@ sources = [
'regex.cpp',
]
env.add_source_files(env.drivers_sources, sources)

View file

@ -8,4 +8,3 @@ ogg_sources = [
if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes":
env.drivers_sources+=ogg_sources

View file

@ -4,5 +4,3 @@ env.add_source_files(env.drivers_sources,"*.cpp")
env.add_source_files(env.drivers_sources,"*.c")
Export('env')

View file

@ -38,4 +38,3 @@ env.drivers_sources+=png_sources
#env.add_source_files(env.drivers_sources, png_sources)
Export('env')

View file

@ -21,4 +21,3 @@ if (env["tools"]=="yes"):
#env.add_source_files(env.drivers_sources, squish_sources)
Export('env')

View file

@ -1,4 +1,3 @@
Import('env')
sources = [
@ -34,5 +33,3 @@ sources = [
if env['use_theoraplayer_binary'] != "yes":
env.drivers_sources += sources

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.drivers_sources,"*.cpp")
Export('env')

View file

@ -1,4 +1,3 @@
Import('env')
sources = [
@ -37,4 +36,3 @@ env.drivers_sources += sources
if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes":
env.drivers_sources += sources_lib

View file

@ -61,4 +61,3 @@ env.drivers_sources+=webp_sources
#env.add_source_files(env.drivers_sources, webp_sources)
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.drivers_sources,"*.cpp")
Export('env')

View file

@ -8,5 +8,3 @@ Export('env')
lib = env.Library("main",env.main_sources)
env.Prepend(LIBS=[lib])

View file

@ -19,5 +19,3 @@ for x in env.module_list:
lib = env_modules.Library("modules",env.modules_sources)
env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.modules_sources,"*.cpp")
Export('env')

View file

@ -1,6 +1,3 @@
Import('env')
env.add_source_files(env.modules_sources,"*.cpp")

View file

@ -62,10 +62,10 @@ pp_baseout.write( manifest )
for x in env.android_source_files:
shutil.copy(x,abspath+"/java/src/com/android/godot")
shutil.copy(x,abspath+"/java/src/com/android/godot")
for x in env.android_module_libraries:
shutil.copy(x,abspath+"/java/libs")
shutil.copy(x,abspath+"/java/libs")
env_android.SharedLibrary("#bin/libgodot",[android_objects],SHLIBSUFFIX=env["SHLIBSUFFIX"])

View file

@ -19,4 +19,3 @@ if env['bb10_lgles_override'] == "yes":
prog = None
prog = env_bps.Program('#bin/godot', bb10_lib)

View file

@ -36,5 +36,3 @@ java -jar $ALCHEMY/usr/lib/asc2.jar -md -strict -optimize -AS3 \
-import ../platform/flash/lib/libGL.abc \
../platform/flash/Console.as
"""

View file

@ -13,7 +13,7 @@ common_win=[
env.Program('#bin/godot',['godot_win.cpp']+common_win,PROGSUFFIX=env["PROGSUFFIX"])
# Microsoft Visual Studio Project Generation
# Microsoft Visual Studio Project Generation
if (env['vsproj'])=="yes":
env.vs_srcs = env.vs_srcs + ["platform/windows/godot_win.cpp"]
for x in common_win:

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -4,10 +4,8 @@ Import('env')
if (env["disable_3d"]=="yes"):
env.scene_sources.append("3d/spatial.cpp")
env.scene_sources.append("3d/skeleton.cpp")
env.scene_sources.append("3d/skeleton.cpp")
else:
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -18,5 +18,3 @@ SConscript('io/SCsub');
lib = env.Library("scene",env.scene_sources)
env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -6,4 +6,3 @@ env.add_source_files(env.scene_sources,"*.c")
Export('env')
SConscript("default_theme/SCsub");

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')

View file

@ -15,5 +15,3 @@ SConscript('spatial_sound_2d/SCsub');
lib = env.Library("servers",env.servers_sources)
env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.servers_sources,"*.cpp")
Export('env')

View file

@ -5,5 +5,3 @@ env.add_source_files(env.servers_sources,"*.cpp")
Export('env')
SConscript("joints/SCsub")

View file

@ -3,6 +3,3 @@ Import('env')
env.add_source_files(env.servers_sources,"*.cpp")
Export('env')

View file

@ -1,4 +1,3 @@
Import('env')
env.add_source_files(env.servers_sources,"*.cpp")

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.servers_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.servers_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.servers_sources,"*.cpp")
Export('env')

View file

@ -17,5 +17,3 @@ if (env["tools"]!="no"):
lib = env.Library("tool",env.tool_sources)
env.Prepend(LIBS=[lib])

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')

View file

@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')

View file

@ -28,7 +28,7 @@ def make_doc_header(target,source,env):
if (env["tools"]=="yes"):
@ -43,17 +43,16 @@ if (env["tools"]=="yes"):
f.write(reg_exporters_inc)
f.write(reg_exporters)
f.close()
env.Depends("#tools/editor/doc_data_compressed.h","#doc/base/classes.xml")
env.Command("#tools/editor/doc_data_compressed.h","#doc/base/classes.xml",make_doc_header)
#make_doc_header(env.File("#tools/editor/doc_data_raw.h").srcnode().abspath,env.File("#doc/base/classes.xml").srcnode().abspath,env)
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')
SConscript('icons/SCsub');
SConscript('icons/SCsub');
SConscript('plugins/SCsub');
SConscript('fileserver/SCsub');
SConscript('io_plugins/SCsub');

View file

@ -1,7 +1,3 @@
Import('env')
Export('env')
env.add_source_files(env.tool_sources,"*.cpp")

View file

@ -9,30 +9,30 @@ def make_editor_icons_action(target, source, env):
pixmaps = source
s = cStringIO.StringIO()
s.write("#include \"editor_icons.h\"\n\n")
s.write("#include \"scene/resources/theme.h\"\n\n")
for x in pixmaps:
x=str(x)
var_str=os.path.basename(x)[:-4]+"_png";
#print(var_str)
s.write("static const unsigned char "+ var_str +"[]={\n");
pngf=open(x,"rb");
b=pngf.read(1);
while(len(b)==1):
s.write(hex(ord(b)))
b=pngf.read(1);
if (len(b)==1):
s.write(",")
s.write("\n};\n\n\n");
pngf.close();
s.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png) {\n")
s.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
s.write("\ttexture->create_from_image( Image(p_png),ImageTexture::FLAG_FILTER );\n")
@ -42,14 +42,14 @@ def make_editor_icons_action(target, source, env):
s.write("void editor_register_icons(Ref<Theme> p_theme) {\n\n")
for x in pixmaps:
x=os.path.basename(str(x))
type=x[5:-4].title().replace("_","");
var_str=x[:-4]+"_png";
s.write("\tp_theme->set_icon(\""+type+"\",\"EditorIcons\",make_icon("+var_str+"));\n");
s.write("\n\n}\n\n");
f = open(dst,"wb")
f.write(s.getvalue())
f.close()
@ -63,4 +63,3 @@ env.Alias('editor_icons',[env.MakeEditorIconsBuilder('#tools/editor/editor_icons
env.tool_sources.append("#tools/editor/editor_icons.cpp")
Export('env')

View file

@ -1,7 +1,3 @@
Import('env')
Export('env')
env.add_source_files(env.tool_sources,"*.cpp")

View file

@ -1,7 +1,3 @@
Import('env')
Export('env')
env.add_source_files(env.tool_sources,"*.cpp")

View file

@ -65,7 +65,5 @@ if (env["freetype"]=="builtin"):
# lib = env.Library("freetype_builtin",ft_sources)
# env.Prepend(LIBS=[lib])
Export('env')

View file

@ -2,4 +2,3 @@ Import('env')
if env["tools"] == "yes":
env.add_source_files(env.tool_sources, "*.cpp")