dolphin/Source/Core/DolphinWX/Src/SConscript
Soren Jorvang 10b76db391 Link the OpenCL framework weakly on OS X, so that a binary built on 10.6
with OpenCL will also run on 10.5 without OpenCL.

Build with OpenCL by default now, but keep the opencl build option around
until Linux also links OpenCL weakly, at which point it can go away.

Start to merge in the actions required to make the OS X application bundle
redistributable into the main build and let bundle=true be concerned only
with the optional step of creating a dmg.

Some people are building binary snapshots for OS X without applying the
install_name_tool fixups and besides, osx_make_dmg.sh doesn't fully handle
the internal dependencies between the wx libraries, so we need to be rid
of any external dependencies by the time "scons bundle=false ." finishes.

Ideally we should just use static builds of the wx libraries, but the flat
namespace used by Objective-C for anything other than normally linked
dylibs (sadly not dlopen'ed dylibs) makes that difficult because both the
main binary and the plugins have wx linked in without any symbol ordering.

TBD: Either do automatic install_name_tool fixups for both the main binary
and the wx dylibs or find a workaround for the flat namespace problem.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5797 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 13:29:44 +00:00

102 lines
2.1 KiB
Python

# -*- python -*-
Import('env')
import os
import sys
wxenv = env.Clone()
files = [
'BootManager.cpp',
]
libs = [
'core', 'lzo2', 'discio', 'bdisasm', 'videocommon',
'inputcommon', 'inputuicommon', 'common', 'lua', 'z', 'sfml-network',
'SDL'
]
if wxenv['HAVE_WX']:
memcardfiles = [
'MemcardManager.cpp',
'MemoryCards/GCMemcard.cpp',
'WxUtils.cpp',
]
files += memcardfiles
files += [
'AboutDolphin.cpp',
'ARCodeAddEdit.cpp',
'ConfigMain.cpp',
'Frame.cpp',
'FrameAui.cpp',
'FrameTools.cpp',
'LuaWindow.cpp',
'LogWindow.cpp',
'GameListCtrl.cpp',
'Globals.cpp',
'HotkeyDlg.cpp',
'ISOFile.cpp',
'ISOProperties.cpp',
'PatchAddEdit.cpp',
'CheatsWindow.cpp',
'MemoryCards/WiiSaveCrypted.cpp',
'NetPlay.cpp',
'NetPlayClient.cpp',
'NetPlayServer.cpp',
'NetWindow.cpp',
]
CPPDEFINES = [
'wxNEEDS_CHARPP',
],
libs = [ 'debwx', 'debugger_ui_util'] + libs
else:
files+= [
'cmdline.c',
]
if sys.platform == 'win32':
files += [ "stdafx.cpp" ]
if sys.platform == 'darwin':
files += [ 'cocoaApp.m' ]
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
env.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework',
'/Library/Frameworks/Cg.framework/Cg')
wxenv.Plist(
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict(
CFBundleExecutable = 'Dolphin',
CFBundleIconFile = 'Dolphin.icns',
CFBundleIdentifier = 'com.dolphin-emu.dolphin',
CFBundlePackageType = 'APPL',
CFBundleShortVersionString =
os.popen('svnversion -n ' + Dir('#').abspath).read(),
CFBundleVersion = '2.0',
LSMinimumSystemVersion = '10.5.0',
LSRequiresCarbon = True,
))
)
else:
exeGUI = env['binary_dir'] + 'dolphin-emu'
exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
wxenv.Append(
LIBS = libs
)
if wxenv['HAVE_X11']:
files += [ 'X11Utils.cpp' ]
if wxenv['HAVE_WX']:
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
wxenv.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
else:
wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])