Less confused about absolute/relative/symbolic pathnames now.

Fixes Linux global build.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5924 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-07-20 04:50:43 +00:00
parent 8c7bdebf1e
commit 4ffea2c8b9
2 changed files with 26 additions and 25 deletions

View File

@ -203,11 +203,11 @@ tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
} }
# Object files # Object files
env['build_dir'] = os.path.join('#Build', env['build_dir'] = os.path.join('Build',
platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep) platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep)
# Static libs go here # Static libs go here
env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep env['local_libs'] = '#' + env['build_dir'] + os.sep + 'libs' + os.sep
# Install paths # Install paths
extra='' extra=''
@ -225,12 +225,12 @@ if sys.platform == 'linux2' and env['install'] == 'global':
else: else:
env['prefix'] = os.path.join('#Binary', env['prefix'] = os.path.join('#Binary',
platform.system() + '-' + platform.machine() + extra + os.sep) platform.system() + '-' + platform.machine() + extra + os.sep)
env['binary_dir'] = env['prefix'] env['binary_dir'] = '#' + env['prefix']
env['plugin_dir'] = env['prefix'] + 'plugins/' env['plugin_dir'] = '#' + env['prefix'] + 'plugins/'
env['data_dir'] = env['prefix'] env['data_dir'] = '#' + env['prefix']
if sys.platform == 'darwin': if sys.platform == 'darwin':
env['plugin_dir'] = env['prefix'] + 'Dolphin.app/Contents/PlugIns/' env['plugin_dir'] = '#' + env['prefix'] + 'Dolphin.app/Contents/PlugIns/'
env['data_dir'] = env['prefix'] + 'Dolphin.app/Contents/Resources' env['data_dir'] = '#' + env['prefix'] + 'Dolphin.app/Contents/Resources'
shared = {} shared = {}
shared['glew'] = shared['lzo'] = shared['sdl'] = \ shared['glew'] = shared['lzo'] = shared['sdl'] = \
@ -260,23 +260,25 @@ if sys.platform == 'darwin':
env['HAVE_OPENCL'] = 1 env['HAVE_OPENCL'] = 1
env['LINKFLAGS'] += ['-weak_framework', 'OpenCL'] env['LINKFLAGS'] += ['-weak_framework', 'OpenCL']
if not env['nowx']: if not env['nowx']:
frameworks = env['FRAMEWORKS']
conf = env.Configure(custom_tests = tests) conf = env.Configure(custom_tests = tests)
env['HAVE_WX'] = conf.CheckWXConfig(2.9, wxmods, 0) env['HAVE_WX'] = conf.CheckWXConfig(2.9, wxmods, 0)
wxconfig.ParseWXConfig(env)
conf.Finish() conf.Finish()
# wx-config wants us to link with the OS X QuickTime framework # 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. # which is not available for x86_64 and we don't use it anyway.
# Strip it out to silence some harmless linker warnings. # Strip it out to silence some harmless linker warnings.
# In the 10.5 SDK, Carbon is only partially built for x86_64. # In the 10.5 SDK, Carbon is only partially built for x86_64.
wxconfig.ParseWXConfig(env)
if env['CPPDEFINES'].count('WXUSINGDLL'): if env['CPPDEFINES'].count('WXUSINGDLL'):
if env['FRAMEWORKS'].count('AudioToolbox'): env['FRAMEWORKS'] = frameworks
env['FRAMEWORKS'].remove('AudioToolbox') # if env['FRAMEWORKS'].count('AudioToolbox'):
if env['FRAMEWORKS'].count('Carbon'): # env['FRAMEWORKS'].remove('AudioToolbox')
env['FRAMEWORKS'].remove('Carbon') # if env['FRAMEWORKS'].count('Carbon'):
if env['FRAMEWORKS'].count('System'): # env['FRAMEWORKS'].remove('Carbon')
env['FRAMEWORKS'].remove('System') # if env['FRAMEWORKS'].count('System'):
if env['FRAMEWORKS'].count('QuickTime'): # env['FRAMEWORKS'].remove('System')
env['FRAMEWORKS'].remove('QuickTime') # if env['FRAMEWORKS'].count('QuickTime'):
# env['FRAMEWORKS'].remove('QuickTime')
env['CPPPATH'] += ['#Externals'] env['CPPPATH'] += ['#Externals']
env['FRAMEWORKS'] += ['Cg'] env['FRAMEWORKS'] += ['Cg']
env['LINKFLAGS'] += ['-FExternals/Cg'] env['LINKFLAGS'] += ['-FExternals/Cg']
@ -455,8 +457,8 @@ for subdir in dirs:
# Data install # Data install
if sys.platform == 'darwin': if sys.platform == 'darwin':
env.Install('#' + env['data_dir'], 'Data/Sys') env.Install(env['data_dir'], 'Data/Sys')
env.Install('#' + env['data_dir'], 'Data/User') env.Install(env['data_dir'], 'Data/User')
else: else:
env.InstallAs(env['data_dir'] + 'sys', 'Data/Sys') env.InstallAs(env['data_dir'] + 'sys', 'Data/Sys')
env.InstallAs(env['data_dir'] + 'user', 'Data/User') env.InstallAs(env['data_dir'] + 'user', 'Data/User')
@ -471,9 +473,8 @@ if env['bundle']:
tar_env.Append(TARFLAGS='-j', TARCOMSTR="Creating release tarball") tar_env.Append(TARFLAGS='-j', TARCOMSTR="Creating release tarball")
env.Clean(all, tarball) env.Clean(all, tarball)
elif sys.platform == 'darwin': elif sys.platform == 'darwin':
app = env['binary_dir'] + 'Dolphin.app' app = env['prefix'] + 'Dolphin.app'
dmg = env['binary_dir'] + 'Dolphin-r' + rev + '.dmg' dmg = env['prefix'] + 'Dolphin-r' + rev + '.dmg'
env.Command('.', app + '/Contents/MacOS/Dolphin', 'rm -f ' + dmg + env.Command(dmg, app + '/Contents/MacOS/Dolphin', 'rm -f ' + dmg +
' && hdiutil create -srcfolder ' + app + ' -format UDBZ ' + dmg + ' && hdiutil create -srcfolder ' + app + ' -format UDBZ ' + dmg +
' && hdiutil internet-enable -yes ' + dmg) ' && hdiutil internet-enable -yes ' + dmg)
env.Clean(all, dmg)

View File

@ -58,15 +58,15 @@ elif sys.platform == 'darwin' and not env['HAVE_WX']:
elif sys.platform == 'darwin' and env['HAVE_WX']: elif sys.platform == 'darwin' and env['HAVE_WX']:
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin' exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
env.Install('#' + env['binary_dir'] + 'Dolphin.app/Contents/' + env.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework', 'Library/Frameworks/Cg.framework',
'#Externals/Cg/Cg.framework/Cg') '#Externals/Cg/Cg.framework/Cg')
env.Install('#' + env['binary_dir'] + 'Dolphin.app/Contents/Resources/', env.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/',
'#Source/Core/DolphinWX/resources/Dolphin.icns') '#Source/Core/DolphinWX/resources/Dolphin.icns')
env.Plist( env.Plist(
'#' + env['binary_dir'] + 'Dolphin.app/Contents/Info.plist', env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict( Value(dict(
CFBundleExecutable = 'Dolphin', CFBundleExecutable = 'Dolphin',
CFBundleIconFile = 'Dolphin.icns', CFBundleIconFile = 'Dolphin.icns',