diff --git a/Externals/Bochs_disasm/SConscript b/Externals/Bochs_disasm/SConscript index 4050db0764..a85995553c 100644 --- a/Externals/Bochs_disasm/SConscript +++ b/Externals/Bochs_disasm/SConscript @@ -1,6 +1,7 @@ # -*- python -*- Import('env') +import sys files = [ "dis_decode.cpp", @@ -10,6 +11,9 @@ files = [ "PowerPCDisasm.cpp", ] +if sys.platform == 'win32': + files += [ "stdafx.cpp" ] + env_bochs = env.Clone( CCFLAGS = env.filterWarnings(env['CCFLAGS']), CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), diff --git a/SConstruct b/SConstruct index 640494ac01..4ff9b1b3e2 100644 --- a/SConstruct +++ b/SConstruct @@ -30,9 +30,10 @@ compileFlags = [ '-fno-exceptions', '-fno-strict-aliasing', '-msse2', - '-fvisibility=hidden', #'-fomit-frame-pointer' ] +if sys.platform != 'win32': + compileFlags += [ '-fvisibility=hidden' ] cppDefines = [ ( '_FILE_OFFSET_BITS', 64), @@ -86,11 +87,6 @@ if sys.platform == 'darwin': writePlist(properties, str(dstNode)) builders['Plist'] = Builder(action = createPlist) -if sys.platform == 'win32': - env_home = os.environ['USERPROFILE'] -else: - env_home = os.environ['HOME'] - lib_paths = include_paths # handle command line options @@ -118,23 +114,40 @@ vars.AddVariables( ('CXX', 'The c++ compiler', 'g++'), ) - -env = Environment( - CPPPATH = include_paths, - LIBPATH = lib_paths, - RPATH = [], - variables = vars, - ENV = { - 'PATH' : os.environ['PATH'], - 'HOME' : env_home +if sys.platform == 'win32': + env = Environment( + CPPPATH = include_paths, + LIBPATH = lib_paths, + RPATH = [], + LIBS = [], + tools = [ 'mingw' ], + variables = vars, + ENV = os.environ, + BUILDERS = builders, + DESCRIPTION = description, + SUMMARY = description, + LICENSE = license, + NAME = name, + VERSION = version, + ) +else: + env = Environment( + CPPPATH = include_paths, + LIBPATH = lib_paths, + RPATH = [], + LIBS = [], + variables = vars, + ENV = { + 'PATH' : os.environ['PATH'], + 'HOME' : os.environ['HOME'] }, - BUILDERS = builders, - DESCRIPTION = description, - SUMMARY = description, - LICENSE = license, - NAME = name, - VERSION = version, - ) + BUILDERS = builders, + DESCRIPTION = description, + SUMMARY = description, + LICENSE = license, + NAME = name, + VERSION = version, + ) # save the given command line options vars.Save('args.cache', env) @@ -180,7 +193,10 @@ if env['lint']: compileFlags += [ '-W' + warning for warning in warnings ] env['CCFLAGS'] = compileFlags -env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ] +if sys.platform == 'win32': + env['CXXFLAGS'] = compileFlags +else: + env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ] env['CPPDEFINES'] = cppDefines @@ -249,6 +265,10 @@ if env['wxgl']: env['HAVE_X11'] = 0 env['HAVE_COCOA'] = 0 +if sys.platform == 'win32': + env['HAVE_WX'] = 1 + env['USE_WX'] = 1 + # Gui less build if env['nowx']: env['HAVE_WX'] = 0; diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript index c4c207fe57..76b8f4423d 100644 --- a/Source/Core/Common/Src/SConscript +++ b/Source/Core/Common/Src/SConscript @@ -1,31 +1,34 @@ # -*- python -*- Import('env') +import sys files = [ "ABI.cpp", - "MsgHandler.cpp", "CDUtils.cpp", "ChunkFile.cpp", - "ConsoleWindow.cpp", "ColorUtil.cpp", + "ConsoleWindow.cpp", "CPUDetect.cpp", "DynamicLibrary.cpp", - "Hash.cpp", - "IniFile.cpp", + "ExtendedTrace.cpp", "FileSearch.cpp", "FileUtil.cpp", + "Hash.cpp", + "IniFile.cpp", "MappedFile.cpp", "MathUtil.cpp", - "Misc.cpp", "MemArena.cpp", "MemoryUtil.cpp", + "Misc.cpp", + "MsgHandler.cpp", "Plugin.cpp", "PluginDSP.cpp", "PluginWiimote.cpp", "PluginVideo.cpp", "PluginPAD.cpp", "StringUtil.cpp", + "Thread.cpp", "Thunk.cpp", "Timer.cpp", "Thread.cpp", @@ -34,6 +37,9 @@ files = [ "x64Analyzer.cpp", ] +if sys.platform == 'win32': + files += [ "stdafx.cpp" ] + env_common = env.Clone() env_common.Append(CXXFLAGS = [ '-fPIC' ]) env_common.StaticLibrary("common", files) diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript index 881dda4369..8bb6570903 100644 --- a/Source/Core/Core/Src/SConscript +++ b/Source/Core/Core/Src/SConscript @@ -1,21 +1,23 @@ # -*- python -*- Import('env') +import sys -files = ["Console.cpp", +files = ["ActionReplay.cpp", + "ARDecrypt.cpp", "ConfigManager.cpp", + "Console.cpp", "Core.cpp", - "CoreTiming.cpp", "CoreParameter.cpp", + "CoreRerecording.cpp", + "CoreTiming.cpp", "Host.cpp", "LogManager.cpp", "MemTools.cpp", - "ActionReplay.cpp", - "ARDecrypt.cpp", "PatchEngine.cpp", + "PluginManager.cpp", "State.cpp", "Tracer.cpp", - 'PluginManager.cpp', "VolumeHandler.cpp", "Boot/Boot.cpp", "Boot/Boot_BIOSEmu.cpp", @@ -119,6 +121,9 @@ else: "PowerPC/Jit64/Jit_SystemRegisters.cpp", ] +if sys.platform == 'win32': + files += [ "stdafx.cpp" ] + libs = [ 'bdisasm', 'inputcommon', diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 5ba4d67823..c54c0b9cb7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -60,6 +60,8 @@ if gfxenv['HAVE_COCOA']: '-x', 'objective-c++', ] +if sys.platform == 'win32': + files += [ 'OS/Win32.cpp' ] tests = {'CheckPKG' : utils.CheckPKG} conf = gfxenv.Configure(custom_tests = tests,