diff --git a/Externals/Cg/Cg.framework/Cg b/Externals/Cg/Cg.framework/Cg new file mode 100755 index 0000000000..58a4308175 Binary files /dev/null and b/Externals/Cg/Cg.framework/Cg differ diff --git a/Externals/Cg/Cg.framework/Resources/Info.plist b/Externals/Cg/Cg.framework/Resources/Info.plist new file mode 100644 index 0000000000..e7c1d05734 --- /dev/null +++ b/Externals/Cg/Cg.framework/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + CFBundleGetInfoString + NVIDIA Cg version 2.2.0017 + CFBundleIdentifier + com.nvidia.cg + CFBundleName + NVIDIA Cg + CFBundleShortVersionString + 2.2.0017 + IFMajorVersion + 2 + IFMinorVersion + 2 + IFPkgFlagAllowBackRev + + IFPkgFlagAuthorizationAction + RootAuthorization + IFPkgFlagDefaultLocation + / + IFPkgFlagInstallFat + + IFPkgFlagIsRequired + + IFPkgFlagOverwritePermissions + + IFPkgFlagRelocatable + + IFPkgFlagRestartAction + NoRestart + IFPkgFlagRootVolumeOnly + + IFPkgFlagUpdateInstalledLanguages + + IFPkgFlagUseUserMask + + IFPkgFormatVersion + 0.10000000149011612 + + diff --git a/SConstruct b/SConstruct index fad76b7b9c..0974c39621 100644 --- a/SConstruct +++ b/SConstruct @@ -68,18 +68,19 @@ dirs = [ 'Source/Core/DebuggerUICommon/Src', 'Source/Core/DSPCore/Src', 'Source/DSPTool/Src', - 'Source/Core/InputUICommon/Src/', + 'Source/Core/InputUICommon/Src', 'Source/Plugins/Plugin_VideoOGL/Src', 'Source/Plugins/Plugin_VideoSoftware/Src', 'Source/Plugins/Plugin_DSP_HLE/Src', 'Source/Plugins/Plugin_DSP_LLE/Src', 'Source/Plugins/Plugin_Wiimote/Src', - 'Source/Plugins/Plugin_WiimoteNew/Src/', + 'Source/Plugins/Plugin_WiimoteNew/Src', 'Source/Core/DolphinWX/Src', 'Source/Core/DebuggerWX/Src', - 'Source/UnitTests/', + 'Source/UnitTests', ] + builders = {} if sys.platform == 'darwin': from plistlib import writePlist @@ -254,7 +255,24 @@ env['HAVE_WX'] = 0 # OS X specifics if sys.platform == 'darwin': - compileFlags.append('-mmacosx-version-min=10.5') + env['CCFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386'] + env['CCFLAGS'] += ['-mmacosx-version-min=10.5'] + env['CC'] = "gcc-4.2" + env['CFLAGS'] += ['-x', 'objective-c'] + env['CXX'] = "g++-4.2" + env['CXXFLAGS'] += ['-x', 'objective-c++'] + env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices'] + env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio'] + env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL'] + env['LIBS'] += ['gcc_s.10.5', 'iconv'] + env['LINKFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386'] + # XXX env['LINKFLAGS'] += ['-mmacosx-version-min=10.5'] + env['LINKFLAGS'] += ['-Z', '-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib', + '-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks', + '-F/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks'] + if platform.mac_ver()[0] >= '10.6.0': + env['HAVE_OPENCL'] = 1 + env['LINKFLAGS'] += ['-weak_framework', 'OpenCL'] if not env['nowx']: conf = env.Configure(custom_tests = tests) env['HAVE_WX'] = conf.CheckWXConfig(2.9, wxmods, 0) @@ -263,23 +281,17 @@ if sys.platform == 'darwin': # wx-config wants us to link with the OS X QuickTime framework # which is not available for x86_64 and we don't use it anyway. # Strip it out to silence some harmless linker warnings. + # In the 10.5 SDK, Carbon is only partially built for x86_64. if env['CPPDEFINES'].count('WXUSINGDLL'): + if env['FRAMEWORKS'].count('AudioToolbox'): + env['FRAMEWORKS'].remove('AudioToolbox') + if env['FRAMEWORKS'].count('Carbon'): + env['FRAMEWORKS'].remove('Carbon') if env['FRAMEWORKS'].count('QuickTime'): env['FRAMEWORKS'].remove('QuickTime') - env['CC'] = "gcc-4.2" - env['CFLAGS'] += ['-x', 'objective-c'] - env['CXX'] = "g++-4.2" - env['CXXFLAGS'] += ['-x', 'objective-c++'] - env['CCFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386'] - env['LIBS'] += ['iconv'] - env['LINKFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386'] - env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices'] - env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL'] - env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio'] - if platform.mac_ver()[0] >= '10.6.0': - env['HAVE_OPENCL'] = 1 - env['LINKFLAGS'] += ['-weak_framework', 'OpenCL'] + env['CPPPATH'] += ['#Externals'] env['FRAMEWORKS'] += ['Cg'] + env['LINKFLAGS'] += ['-FExternals/Cg'] shared['zlib'] = 1 if not sys.platform == 'win32' and not sys.platform == 'darwin': @@ -314,13 +326,12 @@ if not sys.platform == 'win32' and not sys.platform == 'darwin': # wxGLCanvas does not play well with wxGTK wxmods.remove('gl') env['HAVE_WX'] = conf.CheckWXConfig(2.8, wxmods, 0) + conf.Define('HAVE_WX', env['HAVE_WX']) wxconfig.ParseWXConfig(env) if not env['HAVE_WX']: print "WX libraries not found - see config.log" Exit(1) - conf.Define('HAVE_WX', env['HAVE_WX']) - env['HAVE_BLUEZ'] = conf.CheckPKG('bluez') conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ']) diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index 3c03bbe6e0..8b96c08d2b 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -57,18 +57,18 @@ else: if sys.platform == 'win32': files += [ "stdafx.cpp" ] -elif sys.platform == 'darwin': +elif sys.platform == 'darwin' and not wxenv['HAVE_WX']: files += [ 'cocoaApp.m' ] - - exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin' exeNoGUI = env['binary_dir'] + 'DolphinNoGUI' +elif sys.platform == 'darwin' and wxenv['HAVE_WX']: + exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin' wxenv.Install(env['binary_dir'] + 'Dolphin.app/Contents/' + 'Library/Frameworks/Cg.framework', - '/Library/Frameworks/Cg.framework/Cg') + '#Externals/Cg/Cg.framework/Cg') wxenv.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/', - '#/Source/Core/DolphinWX/resources/Dolphin.icns') + '#Source/Core/DolphinWX/resources/Dolphin.icns') wxenv.Plist( env['binary_dir'] + 'Dolphin.app/Contents/Info.plist', diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 5b7e811a9b..ba53df28b3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -40,7 +40,7 @@ if gfxenv['HAVE_WX']: 'Debugger/Debugger.cpp', ] -if sys.platform == 'darwin': +if sys.platform == 'darwin' and not gfxenv['HAVE_WX']: files += [ 'cocoaGL.m' ] if sys.platform == 'win32':