win32 example
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2607 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cad0ca3f5d
commit
e1d2ff6f3f
25
SConstruct
25
SConstruct
|
@ -85,7 +85,6 @@ if sys.platform == 'darwin':
|
||||||
for dstNode in target:
|
for dstNode in target:
|
||||||
writePlist(properties, str(dstNode))
|
writePlist(properties, str(dstNode))
|
||||||
builders['Plist'] = Builder(action = createPlist)
|
builders['Plist'] = Builder(action = createPlist)
|
||||||
compileFlags += [ '-I/opt/local/include' ]
|
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
env_home = os.environ['USERPROFILE']
|
env_home = os.environ['USERPROFILE']
|
||||||
|
@ -213,28 +212,18 @@ if sys.platform == 'darwin':
|
||||||
env['HAVE_SDL'] = conf.CheckSDL('1.0.0')
|
env['HAVE_SDL'] = conf.CheckSDL('1.0.0')
|
||||||
|
|
||||||
# Bluetooth for wii support
|
# Bluetooth for wii support
|
||||||
if sys.platform == 'win32':
|
env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
|
||||||
env['HAVE_BLUEZ'] = 0
|
|
||||||
else:
|
|
||||||
env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
|
|
||||||
|
|
||||||
# needed for sound
|
# needed for sound
|
||||||
if sys.platform == 'win32':
|
env['HAVE_AO'] = conf.CheckPKG('ao')
|
||||||
env['HAVE_AO'] = 0
|
|
||||||
else:
|
|
||||||
env['HAVE_AO'] = conf.CheckPKG('ao')
|
|
||||||
|
|
||||||
# needed for mic
|
# needed for mic
|
||||||
if sys.platform == 'win32':
|
env['HAVE_PORTAUDIO'] = conf.CheckPortaudio(1890)
|
||||||
env['HAVE_PORTAUDIO'] = 0
|
|
||||||
else:
|
|
||||||
env['HAVE_PORTAUDIO'] = conf.CheckPortaudio(1890)
|
|
||||||
|
|
||||||
# sfml
|
# sfml
|
||||||
env['HAVE_SFML'] = 0
|
env['HAVE_SFML'] = 0
|
||||||
if sys.platform != 'win32':
|
if conf.CheckPKG('sfml') and conf.CheckCHeader("SFML/Audio.hpp"):
|
||||||
if conf.CheckPKG('sfml') and conf.CheckCHeader("SFML/Audio.hpp"):
|
env['HAVE_SFML'] = 1;
|
||||||
env['HAVE_SFML'] = 1;
|
|
||||||
|
|
||||||
#osx 64 specifics
|
#osx 64 specifics
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
|
@ -246,9 +235,7 @@ if sys.platform == 'darwin':
|
||||||
if not env['osx'] == '32x11':
|
if not env['osx'] == '32x11':
|
||||||
env['HAVE_X11'] = 0
|
env['HAVE_X11'] = 0
|
||||||
env['HAVE_COCOA'] = 1
|
env['HAVE_COCOA'] = 1
|
||||||
elif sys.platform == 'win32':
|
|
||||||
env['HAVE_X11'] = 0
|
|
||||||
env['HAVE_COCOA'] = 0
|
|
||||||
else:
|
else:
|
||||||
env['HAVE_X11'] = conf.CheckPKG('x11')
|
env['HAVE_X11'] = conf.CheckPKG('x11')
|
||||||
env['HAVE_COCOA'] = 0
|
env['HAVE_COCOA'] = 0
|
||||||
|
|
|
@ -89,6 +89,8 @@ def ConfigPKG(context, name):
|
||||||
|
|
||||||
def CheckPKG(context, name):
|
def CheckPKG(context, name):
|
||||||
context.Message( 'Checking for %s... ' % name )
|
context.Message( 'Checking for %s... ' % name )
|
||||||
|
if platform.system().lower() == 'windows':
|
||||||
|
return 0
|
||||||
ret = 1
|
ret = 1
|
||||||
if not CheckFramework(context, name):
|
if not CheckFramework(context, name):
|
||||||
if not ConfigPKG(context, name.lower()):
|
if not ConfigPKG(context, name.lower()):
|
||||||
|
@ -101,6 +103,8 @@ def CheckPKG(context, name):
|
||||||
|
|
||||||
def CheckSDL(context, version):
|
def CheckSDL(context, version):
|
||||||
context.Message( 'Checking for sdl lib version > %s... ' % version)
|
context.Message( 'Checking for sdl lib version > %s... ' % version)
|
||||||
|
if platform.system().lower() == 'windows':
|
||||||
|
return 1
|
||||||
sdl_config = context.env.WhereIs('sdl-config')
|
sdl_config = context.env.WhereIs('sdl-config')
|
||||||
if sdl_config == None:
|
if sdl_config == None:
|
||||||
ret = 0
|
ret = 0
|
||||||
|
|
|
@ -51,7 +51,7 @@ else:
|
||||||
if gfxenv['HAVE_WX']:
|
if gfxenv['HAVE_WX']:
|
||||||
files += [
|
files += [
|
||||||
'GUI/ConfigDlg.cpp',
|
'GUI/ConfigDlg.cpp',
|
||||||
'Debugger/Debugger.cpp',
|
'Debugger/Debugger.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
if gfxenv['HAVE_COCOA']:
|
if gfxenv['HAVE_COCOA']:
|
||||||
|
@ -60,36 +60,45 @@ if gfxenv['HAVE_COCOA']:
|
||||||
'-x',
|
'-x',
|
||||||
'objective-c++',
|
'objective-c++',
|
||||||
]
|
]
|
||||||
|
|
||||||
tests = {'CheckPKG' : utils.CheckPKG}
|
tests = {'CheckPKG' : utils.CheckPKG}
|
||||||
conf = gfxenv.Configure(custom_tests = tests,
|
conf = gfxenv.Configure(custom_tests = tests,
|
||||||
config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
|
config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
|
|
||||||
|
conf.CheckPKG('OpenGL')
|
||||||
|
if not conf.CheckPKG('Cg'):
|
||||||
|
print name + " must have Cg framework from nvidia to be build"
|
||||||
|
Return()
|
||||||
|
|
||||||
# Use libraries from MacPorts.
|
|
||||||
compileFlags.append('-I/opt/local/include')
|
|
||||||
linkFlags.append('-L/opt/local/lib')
|
|
||||||
conf.CheckPKG('OpenGL')
|
|
||||||
if not conf.CheckPKG('Cg'):
|
|
||||||
print name + " must have Cg framework from nvidia to be build"
|
|
||||||
Return()
|
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
print name + " is assuming that you have opengl, glu, cg, and cggl"
|
print name + " is assuming that you have opengl, glu, cg, and cggl"
|
||||||
else:
|
else:
|
||||||
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
||||||
print name + " must have opengl and glu to be build"
|
print name + " must have opengl and glu to be build"
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
||||||
print name + " must have cg and cggl to be build"
|
print name + " must have cg and cggl to be build"
|
||||||
Return()
|
Return()
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
print name + " is assuming that you have glew"
|
print name + " is assuming that you have glew"
|
||||||
else:
|
else:
|
||||||
if not conf.CheckPKG('GLEW'):
|
if not conf.CheckPKG('GLEW'):
|
||||||
print name + " must have glew to be build"
|
print name + " must have glew to be build"
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
|
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
files += [
|
||||||
|
'OS/Win32.cpp'
|
||||||
|
]
|
||||||
|
libs += [
|
||||||
|
env['base_dir'] + '/Externals/Cg/'
|
||||||
|
]
|
||||||
|
gfxenv['CPPPATH'] += libs
|
||||||
|
|
||||||
|
|
||||||
# check for xxf86vm
|
# check for xxf86vm
|
||||||
|
|
||||||
|
@ -128,8 +137,7 @@ gfxenv.Append(
|
||||||
LINKFLAGS = linkFlags,
|
LINKFLAGS = linkFlags,
|
||||||
)
|
)
|
||||||
|
|
||||||
if sys.platform != 'win32':
|
gfxenv.SharedLibrary(
|
||||||
gfxenv.SharedLibrary(
|
|
||||||
env['plugin_dir']+name,
|
env['plugin_dir']+name,
|
||||||
files,
|
files,
|
||||||
LIBS = libs + gfxenv['LIBS']
|
LIBS = libs + gfxenv['LIBS']
|
||||||
|
|
Loading…
Reference in New Issue