diff --git a/SConstruct b/SConstruct index d3ff632ae3..480939101b 100644 --- a/SConstruct +++ b/SConstruct @@ -40,9 +40,6 @@ cppDefines = [ 'GCC_HASCLASSVISIBILITY', ] - - - include_paths = [ '../../../Core/Common/Src', '../../../Core/DiscIO/Src', @@ -92,21 +89,26 @@ lib_paths = include_paths # handle command line options vars = Variables('args.cache') + vars.AddVariables( BoolVariable('verbose', 'Set for compilation line', False), BoolVariable('bundle', 'Set to create bundle', False), BoolVariable('lint', 'Set for lint build (extra warnings)', False), BoolVariable('nowx', 'Set For Building with no WX libs (WIP)', False), - BoolVariable('osx64', 'Set For Building for osx in 64 bits (WIP)', False), EnumVariable('flavor', 'Choose a build flavor', 'release', allowed_values = ('release', 'devel', 'debug'), ignorecase = 2 ), + EnumVariable('osx', 'Choose a backend (WIP)', '32coca', + allowed_values = ('32x11', '32coca', '64coca'), + ignorecase = 2 + ), PathVariable('wxconfig', 'Path to the wxconfig', None), ('CC', 'The c compiler', 'gcc'), ('CXX', 'The c++ compiler', 'g++'), ) + env = Environment( CPPPATH = include_paths, LIBPATH = lib_paths, @@ -188,16 +190,17 @@ env['HAVE_AO'] = conf.CheckPKG('ao') env['HAVE_WX'] = conf.CheckWXConfig('2.8', ['gl', 'adv', 'core', 'base'], 0) #env['flavor'] == 'debug') -# X11 detection -env['HAVE_X11'] = conf.CheckPKG('x11') - #osx 64 specifics -if env['osx64']: - # SDL and WX are broken on osx 64 -# env['HAVE_SDL'] = 0 -# env['HAVE_WX'] = 0; - compileFlags += ['-arch' , 'x86_64', '-DOSX64'] - +if sys.platform == 'darwin': + if env['osx'] == '64coca': + compileFlags += ['-arch' , 'x86_64', '-DOSX64'] + if env['osx'] == '64coca' or env['osx'] == '32coca': + env['HAVE_X11'] = 0 + env['HAVE_COCOA'] = conf.CheckPKG('cocoa') +else: + env['HAVE_X11'] = conf.CheckPKG('x11') + env['HAVE_COCOA'] = 0 + # Gui less build if env['nowx']: env['HAVE_WX'] = 0; @@ -208,6 +211,7 @@ conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ']) conf.Define('HAVE_AO', env['HAVE_AO']) conf.Define('HAVE_WX', env['HAVE_WX']) conf.Define('HAVE_X11', env['HAVE_X11']) +conf.Define('HAVE_COCOA', env['HAVE_COCOA']) # After all configuration tests are done conf.Finish() diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index a18f3a30a4..bdc95b9453 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -123,10 +123,11 @@ CFrame::CFrame(wxFrame* parent, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style) - , m_Panel(NULL) , m_pStatusBar(NULL) - , m_pMenuBar(NULL) , HaveLeds(false), HaveSpeakers(false) + , m_Panel(NULL) + , m_pMenuBar(NULL) + { InitBitmaps(); diff --git a/Source/Plugins/Plugin_DSP_NULL/Src/SConscript b/Source/Plugins/Plugin_DSP_NULL/Src/SConscript index aee92df1d4..5bc79e6aef 100644 --- a/Source/Plugins/Plugin_DSP_NULL/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_NULL/Src/SConscript @@ -20,16 +20,8 @@ files = [ ] dspenv = env.Clone() -if not dspenv['osx64']: - dspenv.Append( - CXXFLAGS = [ '-fPIC' ], - LIBS = [ 'common' ], - ) -else: - dspenv.Append( - CXXFLAGS = [ '-fPIC','-arch', 'x86_64' ], - LINKFLAGS = [ '-arch', 'x86_64' ], - LIBS = [ 'common' ], - ) - +dspenv.Append( + CXXFLAGS = [ '-fPIC' ], + LIBS = [ 'common' ], + ) dspenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_PadSimple/Src/SConscript b/Source/Plugins/Plugin_PadSimple/Src/SConscript index 0141df719a..22b33e43f1 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/SConscript +++ b/Source/Plugins/Plugin_PadSimple/Src/SConscript @@ -14,7 +14,7 @@ files = [ ] padenv = env.Clone() -if not padenv['osx64']: +if not padenv['HAVE_WX']: files += [ "GUI/ConfigDlg.cpp", "XInputBase.cpp", @@ -22,10 +22,4 @@ if not padenv['osx64']: padenv.Append(LIBS = [ 'common' ]) -if padenv['osx64']: - padenv.Append( - CXXFLAGS = [ '-arch', 'x86_64' ], - LINKFLAGS = [ '-arch', 'x86_64' ], - ) - padenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 03fd888676..b54fce6413 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -54,14 +54,12 @@ if gfxenv['HAVE_WX']: 'Debugger/PBView.cpp', ] -if gfxenv['osx64']: - files += [ 'cocoaGL.m' ] - compileFlags += [ - '-x', - 'objective-c++', - ] - - +if gfxenv['HAVE_COCOA']: + files += [ 'cocoaGL.m' ] + compileFlags += [ + '-x', + 'objective-c++', + ] tests = {'CheckPKG' : utils.CheckPKG} conf = gfxenv.Configure(custom_tests = tests, @@ -72,24 +70,27 @@ if sys.platform == 'darwin': # Use libraries from MacPorts. compileFlags.append('-I/opt/local/include') linkFlags.append('-L/opt/local/lib') - conf.CheckPKG('cocoa') conf.CheckPKG('OpenGL') + if not conf.CheckPKG('Cg'): + print name + " must have Cg from nvidia to be build" + else: if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')): print name + " must have opengl and glu to be build" Return() -if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'): - print name + " must have cg and cggl to be build" - Return() + if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'): + print name + " must have cg and cggl to be build" + Return() if not conf.CheckPKG('GLEW'): print name + " must have glew to be build" Return() # check for xxf86vm + +gfxenv['HAVE_XXF86VM'] = gfxenv['HAVE_X11'] and conf.CheckPKG('xxf86vm') -gfxenv['HAVE_XXF86VM'] = conf.CheckPKG('xxf86vm') conf.Define('HAVE_XXF86VM', gfxenv['HAVE_XXF86VM']) conf.Finish() diff --git a/Source/Plugins/Plugin_nJoy_Testing/Src/SConscript b/Source/Plugins/Plugin_nJoy_Testing/Src/SConscript index c306a9743b..01076b85c6 100644 --- a/Source/Plugins/Plugin_nJoy_Testing/Src/SConscript +++ b/Source/Plugins/Plugin_nJoy_Testing/Src/SConscript @@ -20,5 +20,5 @@ padenv.Append( CXXFLAGS = [ '-fPIC' ], LIBS = [ 'common' ], ) -if not env['osx64']: - padenv.SharedLibrary(env['plugin_dir']+name, files) + +padenv.SharedLibrary(env['plugin_dir']+name, files)