Make Cg conditional on those platforms for which it is available.

Of course, this doesn't do much good without another shader compiler..

WIP of OS X application bundle building.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5961 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-24 10:24:16 +00:00
parent 7828a689e7
commit 53f5bc682d
9 changed files with 59 additions and 41 deletions

View File

@ -57,29 +57,40 @@ elif sys.platform == 'darwin' and not env['HAVE_WX']:
files += [ 'cocoaApp.m' ]
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
elif sys.platform == 'darwin' and env['HAVE_WX']:
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
exeGUI = 'Dolphin'
exeGUIdist = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
env.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework',
'#Externals/Cg/Cg.framework/Cg')
env.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/',
env.Install(env['data_dir'],
'#Source/Core/DolphinWX/resources/Dolphin.icns')
env.Plist(
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict(
CFBundleExecutable = 'Dolphin',
CFBundleIconFile = 'Dolphin.icns',
CFBundleIdentifier = 'com.dolphin-emu.dolphin',
CFBundlePackageType = 'APPL',
CFBundleShortVersionString =
from plistlib import writePlist
def createPlist(target, source, env):
for srcNode in source:
writePlist(srcNode.value, str(target[0]))
env.Append(BUILDERS = {'Plist' : Builder(action = createPlist)})
env.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,
))
)
CFBundleVersion = '2.0',
LSMinimumSystemVersion = '10.5.0',
LSRequiresCarbon = True,
)))
def Fixup(target, source, env):
os.link(str(source[0]), str(target[0]))
env.Append(BUILDERS = {'Fixup' : Builder(action = Fixup)})
env.Depends(exeGUIdist, env['plugin_dir'])
if env['CPPDEFINES'].count('WXUSINGDLL'):
env.Fixup(exeGUIdist, exeGUI)
else:
files += [ 'X11Utils.cpp' ]
libs += [ 'SDL' ]