mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
(requires review for windows/mac)
Fix up so that various libraries wont be fatal for build with scons wiiuse lib is used only if HAVE_WIIUSE is defined to 1 made major cleanup for darwin and osx64 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1404 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -35,8 +35,10 @@
|
||||
#endif
|
||||
|
||||
#include "../../../PluginSpecs/CommonTypes.h"
|
||||
#define HAVE_WIIUSE 1
|
||||
#else
|
||||
#include "CommonTypes.h"
|
||||
#include "Config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
Import('env')
|
||||
|
||||
if not env['HAVE_WX']:
|
||||
Return()
|
||||
|
||||
files = ["LogWindow.cpp",
|
||||
"BreakPointDlg.cpp",
|
||||
"BreakpointView.cpp",
|
||||
|
@ -3,13 +3,19 @@
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
wxenv = env.Clone()
|
||||
|
||||
files = [
|
||||
'BootManager.cpp',
|
||||
'Config.cpp',
|
||||
'cmdline.c',
|
||||
]
|
||||
|
||||
if not env['osx64']:
|
||||
libs = [
|
||||
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'common', 'z'
|
||||
]
|
||||
|
||||
if wxenv['HAVE_WX']:
|
||||
files += [
|
||||
'AboutDolphin.cpp',
|
||||
'ConfigMain.cpp',
|
||||
@ -26,36 +32,21 @@ if not env['osx64']:
|
||||
'stdafx.cpp',
|
||||
]
|
||||
|
||||
libs = [
|
||||
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'common', 'z'
|
||||
]
|
||||
CPPDEFINES = [
|
||||
'USE_XPM_BITMAPS',
|
||||
'wxNEEDS_CHARPP',
|
||||
],
|
||||
|
||||
wxenv = env.Clone()
|
||||
if not wxenv['osx64']:
|
||||
libs = [ 'debwx' ] + libs
|
||||
wxenv.Append(
|
||||
CPPDEFINES = [
|
||||
'USE_XPM_BITMAPS',
|
||||
'wxNEEDS_CHARPP',
|
||||
],
|
||||
LINKFLAGS = [
|
||||
'-pthread',
|
||||
],
|
||||
LIBS = libs
|
||||
)
|
||||
else:
|
||||
wxenv.Append(
|
||||
CPPDEFINES = [
|
||||
'USE_XPM_BITMAPS',
|
||||
'wxNEEDS_CHARPP',
|
||||
],
|
||||
LINKFLAGS = [
|
||||
'-pthread',
|
||||
'-arch',
|
||||
'x86_64'
|
||||
],
|
||||
LIBS = libs
|
||||
)
|
||||
|
||||
|
||||
|
||||
wxenv.Append(
|
||||
LINKFLAGS = [
|
||||
'-pthread',
|
||||
],
|
||||
LIBS = libs
|
||||
)
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
|
||||
@ -85,7 +76,8 @@ else:
|
||||
exeGUI = env['binary_dir'] + 'Dolphin'
|
||||
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
|
||||
|
||||
objects = [ wxenv.Object(srcFile) for srcFile in files ]
|
||||
if not wxenv['osx64']:
|
||||
wxenv.Program(exeGUI, objects + [ 'Main.cpp' ])
|
||||
wxenv.Program(exeNoGUI, objects + [ 'MainNoGUI.cpp' ])
|
||||
#objects = [ wxenv.Object(srcFile) for srcFile in files ]
|
||||
|
||||
if not wxenv['HAVE_WX']:
|
||||
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
|
||||
wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])
|
||||
|
@ -5,6 +5,10 @@ import sys
|
||||
|
||||
name = "Plugin_DSP_HLE"
|
||||
|
||||
if not env['HAVE_AO']:
|
||||
print name + " must have AO to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'DSPHandler.cpp',
|
||||
'MailHandler.cpp',
|
||||
|
@ -5,6 +5,10 @@ import sys
|
||||
|
||||
name = "Plugin_DSP_LLE"
|
||||
|
||||
if not env['HAVE_AO']:
|
||||
print name + " must have AO to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
"AOSoundStream.cpp",
|
||||
# "DisAsmDlg.cpp",
|
||||
|
@ -46,12 +46,12 @@ libs = [
|
||||
|
||||
gfxenv = env.Clone()
|
||||
|
||||
if not gfxenv['osx64']:
|
||||
if gfxenv['HAVE_WX']:
|
||||
files += [
|
||||
'GUI/ConfigDlg.cpp',
|
||||
'Debugger/Debugger.cpp',
|
||||
'Debugger/PBView.cpp',
|
||||
]
|
||||
'GUI/ConfigDlg.cpp',
|
||||
'Debugger/Debugger.cpp',
|
||||
'Debugger/PBView.cpp',
|
||||
]
|
||||
|
||||
if gfxenv['osx64']:
|
||||
files += [ 'cocoaGL.m' ]
|
||||
@ -66,13 +66,10 @@ if gfxenv['osx64']:
|
||||
'x86_64'
|
||||
]
|
||||
|
||||
useSDL = gfxenv['HAVE_SDL']
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
# SDL is currently the only way to get video on Mac OS X.
|
||||
if gfxenv['osx64']:
|
||||
useSDL = False
|
||||
else:
|
||||
useSDL = True
|
||||
# TODO: clean it up (use incpath and libpath)
|
||||
|
||||
# Use libraries from MacPorts.
|
||||
compileFlags.append('-I/opt/local/include')
|
||||
linkFlags.append('-L/opt/local/lib')
|
||||
@ -83,6 +80,8 @@ if sys.platform == 'darwin':
|
||||
]
|
||||
else:
|
||||
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
|
||||
# TODO: build both sdl and non X
|
||||
useSDL = False
|
||||
# instead if you like, by changing the line below.
|
||||
tests = {'CheckPKG' : utils.CheckPKG}
|
||||
|
||||
@ -96,7 +95,7 @@ else:
|
||||
|
||||
gfxenv = conf.Finish()
|
||||
|
||||
useSDL = False
|
||||
|
||||
gfxenv.ParseConfig("pkg-config x11 --cflags --libs")
|
||||
gfxenv.ParseConfig("pkg-config xxf86vm --cflags --libs")
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
wmenv = env.Clone()
|
||||
name = "Plugin_Wiimote"
|
||||
|
||||
files = [
|
||||
@ -16,21 +17,20 @@ files = [
|
||||
"Encryption.cpp",
|
||||
"FillReport.cpp",
|
||||
"main.cpp",
|
||||
"wiimote_real.cpp",
|
||||
]
|
||||
|
||||
wiimoteenv = env.Clone()
|
||||
libs = [ 'common' ]
|
||||
|
||||
if wiimoteenv['osx64']:
|
||||
wiimoteenv.Append(
|
||||
CXXFLAGS = [ '-arch', 'x86_64' ],
|
||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
||||
LIBS = [ 'common' ],
|
||||
)
|
||||
else:
|
||||
wiimoteenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common', 'wiiuse' ],
|
||||
)
|
||||
cxxflags = [ '-fPIC' ]
|
||||
|
||||
wiimoteenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
if wmenv['HAVE_WIIUSE']:
|
||||
libs += [ 'wiiuse' ]
|
||||
files += [ "wiimote_real.cpp" ]
|
||||
cxxflags += ['-DHAVE_WIIUSE']
|
||||
|
||||
wmenv.Append(
|
||||
CXXFLAGS = cxxflags,
|
||||
LIBS = libs,
|
||||
)
|
||||
|
||||
wmenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
@ -28,7 +28,10 @@
|
||||
#include "pluginspecs_wiimote.h"
|
||||
|
||||
#include "EmuMain.h"
|
||||
|
||||
#if HAVE_WIIUSE
|
||||
#include "wiimote_real.h"
|
||||
#endif
|
||||
|
||||
#include "Console.h" // for startConsoleWin, wprintf, GetConsoleHwnd
|
||||
|
||||
@ -128,8 +131,9 @@ extern "C" void Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize)
|
||||
/* We will run WiiMoteReal::Initialize() even if we are not using a real wiimote,
|
||||
we will initiate wiiuse.dll, but we will return before creating a new thread
|
||||
for it in that case */
|
||||
#if HAVE_WIIUSE
|
||||
g_UseRealWiiMote = WiiMoteReal::Initialize() > 0;
|
||||
|
||||
#endif
|
||||
g_Config.Load(); // load config settings
|
||||
|
||||
WiiMoteEmu::Initialize();
|
||||
@ -146,13 +150,17 @@ extern "C" void Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize)
|
||||
|
||||
extern "C" void Wiimote_DoState(void* ptr, int mode)
|
||||
{
|
||||
#if HAVE_WIIUSE
|
||||
WiiMoteReal::DoState(ptr, mode);
|
||||
#endif
|
||||
WiiMoteEmu::DoState(ptr, mode);
|
||||
}
|
||||
|
||||
extern "C" void Wiimote_Shutdown(void)
|
||||
{
|
||||
#if HAVE_WIIUSE
|
||||
WiiMoteReal::Shutdown();
|
||||
#endif
|
||||
WiiMoteEmu::Shutdown();
|
||||
}
|
||||
|
||||
@ -173,10 +181,13 @@ extern "C" void Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32
|
||||
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||
}
|
||||
|
||||
if (g_UseRealWiiMote)
|
||||
WiiMoteReal::InterruptChannel(_channelID, _pData, _Size);
|
||||
if (! g_UseRealWiiMote)
|
||||
WiiMoteEmu::InterruptChannel(_channelID, _pData, _Size);
|
||||
#if HAVE_WIIUSE
|
||||
else
|
||||
WiiMoteEmu::InterruptChannel(_channelID, _pData, _Size);
|
||||
WiiMoteReal::InterruptChannel(_channelID, _pData, _Size);
|
||||
#endif
|
||||
|
||||
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
||||
}
|
||||
|
||||
@ -192,19 +203,25 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
|
||||
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||
}
|
||||
|
||||
if (g_UseRealWiiMote)
|
||||
WiiMoteReal::ControlChannel(_channelID, _pData, _Size);
|
||||
else
|
||||
WiiMoteEmu::ControlChannel(_channelID, _pData, _Size);
|
||||
|
||||
if (! g_UseRealWiiMote)
|
||||
WiiMoteEmu::ControlChannel(_channelID, _pData, _Size);
|
||||
#if HAVE_WIIUSE
|
||||
else
|
||||
WiiMoteReal::ControlChannel(_channelID, _pData, _Size);
|
||||
#endif
|
||||
|
||||
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
||||
}
|
||||
|
||||
extern "C" void Wiimote_Update()
|
||||
{
|
||||
if (g_UseRealWiiMote)
|
||||
WiiMoteReal::Update();
|
||||
else
|
||||
WiiMoteEmu::Update();
|
||||
if (! g_UseRealWiiMote)
|
||||
WiiMoteEmu::Update();
|
||||
#if HAVE_WIIUSE
|
||||
else
|
||||
WiiMoteReal::Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" unsigned int Wiimote_GetAttachedControllers()
|
||||
|
@ -5,6 +5,10 @@ import sys
|
||||
|
||||
name = "Plugin_nJoy_SDL"
|
||||
|
||||
if not env['HAVE_SDL']:
|
||||
print name + " must have SDL to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'nJoy.cpp',
|
||||
'GUI/AboutBox.cpp',
|
||||
@ -16,5 +20,5 @@ padenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common' ],
|
||||
)
|
||||
if not env['osx64']:
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
@ -5,6 +5,10 @@ import sys
|
||||
|
||||
name = "Plugin_nJoy_Testing"
|
||||
|
||||
if not env['HAVE_SDL']:
|
||||
print name + " must have SDL to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'nJoy.cpp',
|
||||
'GUI/AboutBox.cpp',
|
||||
|
Reference in New Issue
Block a user