mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Allow building on OS X with static wx libs.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6400 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
17662d4ac6
commit
9b12ad6c94
@ -52,11 +52,6 @@ if(VISIBILITY_INLINES_HIDDEN)
|
|||||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden)
|
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden)
|
||||||
endif(VISIBILITY_INLINES_HIDDEN)
|
endif(VISIBILITY_INLINES_HIDDEN)
|
||||||
|
|
||||||
CHECK_CXX_COMPILER_FLAG(-fvisibility=hidden VISIBILITY_HIDDEN)
|
|
||||||
if(VISIBILITY_HIDDEN)
|
|
||||||
add_definitions(-fvisibility=hidden)
|
|
||||||
endif(VISIBILITY_HIDDEN)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_definitions(-D_SECURE_SCL=0)
|
add_definitions(-D_SECURE_SCL=0)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
@ -79,9 +79,6 @@ if env['flavor'] == 'release':
|
|||||||
elif not env['flavor'] == 'fastlog':
|
elif not env['flavor'] == 'fastlog':
|
||||||
env['CCFLAGS'] += ['-ggdb']
|
env['CCFLAGS'] += ['-ggdb']
|
||||||
env['CCFLAGS'] += ['-fno-exceptions', '-fno-strict-aliasing']
|
env['CCFLAGS'] += ['-fno-exceptions', '-fno-strict-aliasing']
|
||||||
if env['CCVERSION'] >= '4.2.0':
|
|
||||||
env['CCFLAGS'] += ['-fvisibility=hidden']
|
|
||||||
env['CXXFLAGS'] += ['-fvisibility-inlines-hidden']
|
|
||||||
|
|
||||||
if env['lint']:
|
if env['lint']:
|
||||||
env['CCFLAGS'] += ['-Werror']
|
env['CCFLAGS'] += ['-Werror']
|
||||||
@ -136,6 +133,7 @@ if sys.platform == 'darwin':
|
|||||||
env['LIBS'] = ['iconv', 'SDL']
|
env['LIBS'] = ['iconv', 'SDL']
|
||||||
env['LINKFLAGS'] += ccld
|
env['LINKFLAGS'] += ccld
|
||||||
env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z', '-F' + system]
|
env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z', '-F' + system]
|
||||||
|
env['SHLINKFLAGS'] += ['-Wl,-undefined,dynamic_lookup']
|
||||||
|
|
||||||
if platform.mac_ver()[0] >= '10.6.0':
|
if platform.mac_ver()[0] >= '10.6.0':
|
||||||
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
|
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
|
||||||
@ -160,7 +158,7 @@ if sys.platform == 'darwin':
|
|||||||
if not wxenv['CPPDEFINES'].count('WXUSINGDLL'):
|
if not wxenv['CPPDEFINES'].count('WXUSINGDLL'):
|
||||||
env['FRAMEWORKS'] = wxenv['FRAMEWORKS']
|
env['FRAMEWORKS'] = wxenv['FRAMEWORKS']
|
||||||
env['LIBPATH'] += wxenv['LIBPATH']
|
env['LIBPATH'] += wxenv['LIBPATH']
|
||||||
env['LIBS'] = wxenv['LIBS']
|
env['wxconfiglibs'] = wxenv['LIBS']
|
||||||
|
|
||||||
env['CPPPATH'] += ['#Externals']
|
env['CPPPATH'] += ['#Externals']
|
||||||
env['FRAMEWORKPATH'] += ['Externals/Cg']
|
env['FRAMEWORKPATH'] += ['Externals/Cg']
|
||||||
|
@ -47,7 +47,7 @@ if env['HAVE_WX']:
|
|||||||
|
|
||||||
wxlibs = [ 'debwx', 'debugger_ui_util', 'inputuicommon' ]
|
wxlibs = [ 'debwx', 'debugger_ui_util', 'inputuicommon' ]
|
||||||
else:
|
else:
|
||||||
files+= [
|
files += [
|
||||||
'MainNoGUI.cpp',
|
'MainNoGUI.cpp',
|
||||||
'cmdline.c',
|
'cmdline.c',
|
||||||
]
|
]
|
||||||
@ -61,6 +61,8 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
|||||||
exeGUI = 'Dolphin'
|
exeGUI = 'Dolphin'
|
||||||
exeGUIdist = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
exeGUIdist = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
||||||
|
|
||||||
|
wxlibs += env['wxconfiglibs']
|
||||||
|
|
||||||
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
||||||
'Library/Frameworks/Cg.framework',
|
'Library/Frameworks/Cg.framework',
|
||||||
'#Externals/Cg/Cg.framework/Cg')
|
'#Externals/Cg/Cg.framework/Cg')
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# OS X .dmg maker for distributable builds
|
|
||||||
# Courtesy of WntrMute
|
|
||||||
# How to use:
|
|
||||||
# run scons so that a complete and valid build is made in the normal Binary path
|
|
||||||
# run this script :)
|
|
||||||
|
|
||||||
trap "echo; exit" SIGINT SIGTERM
|
|
||||||
|
|
||||||
temp_dir="Dolphin-r`svn info | grep "Revision" | awk '{print $2}'`"
|
|
||||||
|
|
||||||
fix_shared_object_depends() {
|
|
||||||
search_string=$1
|
|
||||||
|
|
||||||
# Get list of files to work on
|
|
||||||
file_list=`find $temp_dir/Dolphin.app -name *.dylib`
|
|
||||||
|
|
||||||
# Loop over the files, and update the path
|
|
||||||
for file in ${file_list}; do
|
|
||||||
orig_paths=(`otool -L ${file} | grep ${search_string} | awk '{print $1}'`)
|
|
||||||
|
|
||||||
for orig_path in ${orig_paths[@]}; do
|
|
||||||
if test "x${orig_path}" != x; then
|
|
||||||
new_path=`echo ${orig_path} | xargs basename`
|
|
||||||
echo "$file\t$orig_path"
|
|
||||||
|
|
||||||
cp ${orig_path} $temp_dir/Dolphin.app/Contents/MacOS/${new_path}
|
|
||||||
install_name_tool -change ${orig_path} @executable_path/${new_path} ${file}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
# wxw shoves all the paths into one string, so the looping is really just for dealing with wxw crap
|
|
||||||
orig_paths=(`otool -L $temp_dir/Dolphin.app/Contents/MacOS/Dolphin | grep ${search_string} | awk '{print $1}'`)
|
|
||||||
|
|
||||||
for orig_path in ${orig_paths[@]}; do
|
|
||||||
if test "x${orig_path}" != x; then
|
|
||||||
new_path=`echo ${orig_path} | xargs basename`
|
|
||||||
cp ${orig_path} $temp_dir/Dolphin.app/Contents/MacOS/${new_path}
|
|
||||||
install_name_tool -change ${orig_path} @executable_path/${new_path} $temp_dir/Dolphin.app/Contents/MacOS/Dolphin
|
|
||||||
echo "Fixing $orig_path"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
cd Binary 2>/dev/null
|
|
||||||
if [ $? != 0 ]; then echo "Did you build dolphin yet?"; exit; fi
|
|
||||||
rm -rf $temp_dir
|
|
||||||
mkdir -p $temp_dir/Dolphin.app
|
|
||||||
cp -r Darwin-i386/Dolphin.app $temp_dir
|
|
||||||
fix_shared_object_depends libwx
|
|
||||||
|
|
||||||
find $temp_dir -name .svn -exec rm -fr {} \; 2>/dev/null
|
|
||||||
rm $temp_dir.dmg 2>/dev/null
|
|
||||||
echo "Creating dmg"
|
|
||||||
hdiutil create -srcfolder $temp_dir -format UDBZ $temp_dir.dmg
|
|
||||||
rm -rf $temp_dir
|
|
Loading…
x
Reference in New Issue
Block a user