2009-01-15 06:48:15 +00:00
|
|
|
# -*- python -*-
|
2008-09-21 19:54:29 +00:00
|
|
|
|
2008-09-07 20:26:38 +00:00
|
|
|
Import('env')
|
2010-05-31 16:18:40 +00:00
|
|
|
import os
|
2008-09-07 20:26:38 +00:00
|
|
|
import sys
|
|
|
|
|
2008-12-05 13:46:19 +00:00
|
|
|
wxenv = env.Clone()
|
|
|
|
|
2008-09-07 20:26:38 +00:00
|
|
|
files = [
|
|
|
|
'BootManager.cpp',
|
2008-09-23 07:00:18 +00:00
|
|
|
'cmdline.c',
|
2008-09-07 20:26:38 +00:00
|
|
|
]
|
2008-10-20 17:32:15 +00:00
|
|
|
|
2009-11-08 08:54:09 +00:00
|
|
|
libs = [
|
2010-03-09 22:17:33 +00:00
|
|
|
'core', 'lzo2', 'discio', 'bdisasm', 'videocommon',
|
2010-06-03 06:13:09 +00:00
|
|
|
'inputuicommon', 'inputcommon', 'common', 'lua', 'z', 'sfml-network'
|
2009-11-08 08:54:09 +00:00
|
|
|
]
|
2008-12-05 13:46:19 +00:00
|
|
|
|
|
|
|
if wxenv['HAVE_WX']:
|
2008-11-01 17:07:35 +00:00
|
|
|
files += [
|
2008-10-31 05:40:52 +00:00
|
|
|
'AboutDolphin.cpp',
|
2008-12-17 04:14:24 +00:00
|
|
|
'ARCodeAddEdit.cpp',
|
2008-11-01 17:07:35 +00:00
|
|
|
'ConfigMain.cpp',
|
|
|
|
'Frame.cpp',
|
2009-09-01 15:16:44 +00:00
|
|
|
'FrameAui.cpp',
|
2009-01-04 21:53:41 +00:00
|
|
|
'FrameTools.cpp',
|
2009-11-08 08:54:09 +00:00
|
|
|
'LuaWindow.cpp',
|
2009-09-01 15:16:44 +00:00
|
|
|
'LogWindow.cpp',
|
2008-11-01 17:07:35 +00:00
|
|
|
'GameListCtrl.cpp',
|
|
|
|
'Globals.cpp',
|
2010-04-12 01:33:10 +00:00
|
|
|
'HotkeyDlg.cpp',
|
2008-11-01 17:07:35 +00:00
|
|
|
'ISOFile.cpp',
|
2008-11-11 19:09:52 +00:00
|
|
|
'ISOProperties.cpp',
|
2008-11-01 17:07:35 +00:00
|
|
|
'MemcardManager.cpp',
|
|
|
|
'MemoryCards/GCMemcard.cpp',
|
2008-12-17 04:14:24 +00:00
|
|
|
'PatchAddEdit.cpp',
|
2008-11-30 11:13:14 +00:00
|
|
|
'CheatsWindow.cpp',
|
2008-11-01 17:07:35 +00:00
|
|
|
'stdafx.cpp',
|
2009-02-24 19:31:32 +00:00
|
|
|
'WxUtils.cpp',
|
2010-01-05 08:07:06 +00:00
|
|
|
'MemoryCards/WiiSaveCrypted.cpp',
|
2010-05-01 19:10:35 +00:00
|
|
|
'NetPlay.cpp',
|
2010-05-05 04:31:21 +00:00
|
|
|
'NetPlayClient.cpp',
|
|
|
|
'NetPlayServer.cpp',
|
2010-02-21 20:09:49 +00:00
|
|
|
'NetWindow.cpp',
|
2008-10-20 17:32:15 +00:00
|
|
|
]
|
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
CPPDEFINE = [
|
2008-12-05 13:46:19 +00:00
|
|
|
'wxNEEDS_CHARPP',
|
|
|
|
],
|
2008-09-07 20:26:38 +00:00
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
compileFlags = [
|
|
|
|
],
|
|
|
|
|
|
|
|
|
2009-11-08 08:54:09 +00:00
|
|
|
libs = [ 'debwx', 'debugger_ui_util'] + libs
|
|
|
|
|
2009-01-12 20:52:45 +00:00
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
files += [ 'cocoaApp.m', ]
|
2009-01-12 20:52:45 +00:00
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
compileFlags = [
|
|
|
|
'-x',
|
|
|
|
'objective-c++',
|
|
|
|
]
|
2008-12-05 13:46:19 +00:00
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
linkflags = [
|
|
|
|
'-pthread', '-framework', 'IOKit'
|
|
|
|
]
|
2008-09-07 20:26:38 +00:00
|
|
|
|
2008-11-13 08:12:48 +00:00
|
|
|
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
|
|
|
|
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
|
2008-09-07 20:26:38 +00:00
|
|
|
|
2009-09-18 19:56:49 +00:00
|
|
|
wxenv['FRAMEWORKS'] = ['Cocoa', 'CoreFoundation', 'System']
|
2008-09-07 20:26:38 +00:00
|
|
|
wxenv.Plist(
|
2008-11-13 08:12:48 +00:00
|
|
|
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
|
2008-09-07 20:26:38 +00:00
|
|
|
Value(dict(
|
|
|
|
CFBundleExecutable = 'Dolphin',
|
2010-05-31 16:18:40 +00:00
|
|
|
CFBundleIconFile = 'Dolphin.icns',
|
2008-09-07 20:26:38 +00:00
|
|
|
CFBundleIdentifier = 'com.dolphin-emu.dolphin',
|
|
|
|
CFBundleName = 'Dolphin',
|
|
|
|
CFBundlePackageType = 'APPL',
|
2010-05-31 16:18:40 +00:00
|
|
|
CFBundleShortVersionString =
|
|
|
|
os.popen('svnversion -n ' + Dir('#').abspath).read(),
|
|
|
|
CFBundleVersion = '2.0',
|
2008-09-07 20:26:38 +00:00
|
|
|
LSRequiresCarbon = True,
|
|
|
|
))
|
|
|
|
)
|
|
|
|
else:
|
2010-02-02 21:56:29 +00:00
|
|
|
exeGUI = env['binary_dir'] + 'dolphin-emu'
|
|
|
|
exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
|
2010-06-03 01:24:26 +00:00
|
|
|
linkflags = [ '-pthread' ]
|
2008-09-07 20:26:38 +00:00
|
|
|
|
2010-04-22 04:28:34 +00:00
|
|
|
if wxenv['HAVE_X11']:
|
|
|
|
files += [ 'X11Utils.cpp' ]
|
|
|
|
|
2010-06-03 01:24:26 +00:00
|
|
|
|
|
|
|
wxenv.Append(
|
|
|
|
CXXFLAGS = compileFlags,
|
|
|
|
LINKFLAGS = linkflags,
|
|
|
|
LIBS = libs,
|
|
|
|
)
|
2008-12-05 13:46:19 +00:00
|
|
|
|
2008-12-07 00:28:00 +00:00
|
|
|
if wxenv['HAVE_WX']:
|
2008-12-05 13:46:19 +00:00
|
|
|
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
|
2009-03-21 19:55:10 +00:00
|
|
|
else:
|
|
|
|
wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])
|