Some pathnames are used both by SCons and cpp which can be a bit tricky.
Should revisit and make the distinction more explicit. Put the Data and Sys directories under Resources in the OS X app bundle. Construct config.h (now lower-case to avoid confusion with other Config.h instances in the tree) in the root. One tiny step towards a read-only and cross-buildable source tree. Some minor bits of non-Linux Unix portability. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5921 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c9855f2c22
commit
6813a75ab2
|
@ -17,4 +17,4 @@ libs = [
|
|||
|
||||
exeGUI = env['binary_dir'] + 'MemcardManager'
|
||||
|
||||
env.Program(exeGUI, files, LIBS = env['LIBS'] + libs)
|
||||
env.Program('#' + exeGUI, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
46
SConstruct
46
SConstruct
|
@ -35,6 +35,7 @@ cppDefines = [
|
|||
]
|
||||
|
||||
include_paths = [
|
||||
'#',
|
||||
'#Source/Core/Common/Src',
|
||||
'#Source/Core/DiscIO/Src',
|
||||
'#Source/PluginSpecs',
|
||||
|
@ -132,25 +133,15 @@ if not sys.platform == 'win32' and not sys.platform == 'darwin':
|
|||
)
|
||||
|
||||
env = Environment(
|
||||
CPPPATH = include_paths,
|
||||
RPATH = [],
|
||||
LIBS = [],
|
||||
LIBPATH = [],
|
||||
BUILDERS = builders,
|
||||
CPPPATH = include_paths,
|
||||
ENV = os.environ,
|
||||
LIBPATH = [],
|
||||
LIBS = [],
|
||||
RPATH = [],
|
||||
variables = vars,
|
||||
)
|
||||
|
||||
if sys.platform == 'win32':
|
||||
env['tools'] = ['mingw']
|
||||
env['ENV'] = os.environ
|
||||
else:
|
||||
env['CXXFLAGS'] = ['-fvisibility-inlines-hidden']
|
||||
env['ENV'] = {
|
||||
'PATH' : os.environ['PATH'],
|
||||
'HOME' : os.environ['HOME'],
|
||||
'PKG_CONFIG_PATH' : os.environ.get('PKG_CONFIG_PATH')
|
||||
}
|
||||
|
||||
# Save the given command line options
|
||||
vars.Save('args.cache', env)
|
||||
|
||||
|
@ -200,6 +191,7 @@ if env['lint']:
|
|||
compileFlags += [ ('-W' + warning) for warning in warnings ]
|
||||
|
||||
env['CCFLAGS'] = compileFlags
|
||||
env['CXXFLAGS'] = ['-fvisibility-inlines-hidden']
|
||||
env['CPPDEFINES'] = cppDefines
|
||||
|
||||
# Configuration tests section
|
||||
|
@ -231,14 +223,14 @@ if sys.platform == 'linux2' and env['install'] == 'global':
|
|||
env['plugin_dir'] = env['prefix'] + 'lib/dolphin-emu/'
|
||||
env['data_dir'] = env['prefix'] + "share/dolphin-emu/"
|
||||
else:
|
||||
env['prefix'] = os.path.join('#Binary',
|
||||
env['prefix'] = os.path.join('Binary',
|
||||
platform.system() + '-' + platform.machine() + extra + os.sep)
|
||||
env['binary_dir'] = env['prefix']
|
||||
env['plugin_dir'] = env['prefix'] + 'plugins/'
|
||||
env['data_dir'] = env['prefix']
|
||||
if sys.platform == 'darwin':
|
||||
env['plugin_dir'] = env['prefix'] + 'Dolphin.app/Contents/PlugIns/'
|
||||
env['data_dir'] = env['prefix'] + 'Dolphin.app/Contents/'
|
||||
env['data_dir'] = env['prefix'] + 'Dolphin.app/Contents/Resources'
|
||||
|
||||
shared = {}
|
||||
shared['glew'] = shared['lzo'] = shared['sdl'] = \
|
||||
|
@ -290,9 +282,11 @@ if sys.platform == 'darwin':
|
|||
env['LINKFLAGS'] += ['-FExternals/Cg']
|
||||
shared['zlib'] = 1
|
||||
|
||||
if not sys.platform == 'win32' and not sys.platform == 'darwin':
|
||||
conf = env.Configure(custom_tests = tests,
|
||||
config_h="Source/Core/Common/Src/Config.h")
|
||||
elif sys.platform == 'win32':
|
||||
env['tools'] = ['mingw']
|
||||
|
||||
else:
|
||||
conf = env.Configure(custom_tests = tests, config_h="#config.h")
|
||||
|
||||
if not conf.CheckPKGConfig('0.15.0'):
|
||||
print "Can't find pkg-config, some tests will fail"
|
||||
|
@ -437,8 +431,8 @@ Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5)
|
|||
# package will later install it to the prefix as it was defined before this.
|
||||
if env.has_key('destdir'):
|
||||
env['prefix'] = env['destdir'] + env['prefix']
|
||||
env['plugin_dir'] = env['destdir'] + env['plugin_dir']
|
||||
env['binary_dir'] = env['destdir'] + env['binary_dir']
|
||||
env['plugin_dir'] = env['destdir'] + env['plugin_dir']
|
||||
env['data_dir'] = env['destdir'] + env['data_dir']
|
||||
|
||||
# Die on unknown variables
|
||||
|
@ -455,17 +449,17 @@ Export('env')
|
|||
for subdir in dirs:
|
||||
SConscript(
|
||||
subdir + os.sep + 'SConscript',
|
||||
variant_dir = env[ 'build_dir' ] + subdir + os.sep,
|
||||
variant_dir = env['build_dir'] + subdir + os.sep,
|
||||
duplicate=0
|
||||
)
|
||||
|
||||
# Data install
|
||||
if sys.platform == 'darwin':
|
||||
env.Install(env['data_dir'], 'Data/Sys')
|
||||
env.Install(env['data_dir'], 'Data/User')
|
||||
env.Install('#' + env['data_dir'], 'Data/Sys')
|
||||
env.Install('#' + env['data_dir'], 'Data/User')
|
||||
else:
|
||||
env.InstallAs(env['data_dir'] + 'sys', 'Data/Sys')
|
||||
env.InstallAs(env['data_dir'] + 'user', 'Data/User')
|
||||
env.InstallAs('#' + env['data_dir'] + 'sys', 'Data/Sys')
|
||||
env.InstallAs('#' + env['data_dir'] + 'user', 'Data/User')
|
||||
|
||||
env.Alias('install', env['prefix'])
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ extern const char *netplay_dolphin_ver;
|
|||
#endif // end DEBUG/FAST
|
||||
|
||||
#else
|
||||
#include "Config.h" // SCons autoconfiguration defines
|
||||
#include "config.h" // SCons autoconfiguration defines
|
||||
#endif
|
||||
|
||||
#if defined __linux__ && HAVE_BLUEZ
|
||||
|
|
|
@ -18,9 +18,8 @@
|
|||
#ifndef _COMMON_PATHS_H_
|
||||
#define _COMMON_PATHS_H_
|
||||
|
||||
#ifdef __linux__
|
||||
#include "Config.h"
|
||||
#endif
|
||||
// Make sure we pick up USER_DIR if set in config.h
|
||||
#include "Common.h"
|
||||
|
||||
// Library suffix/prefix
|
||||
#ifdef _WIN32
|
||||
|
@ -29,7 +28,7 @@
|
|||
#elif defined __APPLE__
|
||||
#define PLUGIN_PREFIX "lib"
|
||||
#define PLUGIN_SUFFIX ".dylib"
|
||||
#elif defined __linux__
|
||||
#else
|
||||
#define PLUGIN_PREFIX "lib"
|
||||
#define PLUGIN_SUFFIX ".so"
|
||||
#endif
|
||||
|
@ -43,7 +42,7 @@
|
|||
#define PLUGINS_DIR "Plugins"
|
||||
#elif defined __APPLE__
|
||||
#define PLUGINS_DIR "Contents/PlugIns"
|
||||
#elif defined __linux__
|
||||
#else
|
||||
#ifdef LIBS_DIR
|
||||
#define PLUGINS_DIR LIBS_DIR "dolphin-emu"
|
||||
#else
|
||||
|
@ -60,9 +59,9 @@
|
|||
// On OS X, USERDATA_DIR exists within the .app, but *always* reference
|
||||
// the copy in Application Support instead! (Copied on first run)
|
||||
// You can use the File::GetUserPath() util for this
|
||||
#define USERDATA_DIR "Contents/User"
|
||||
#define USERDATA_DIR "Contents/Resources/User"
|
||||
#define DOLPHIN_DATA_DIR "Library/Application Support/Dolphin"
|
||||
#elif defined __linux__
|
||||
#else
|
||||
#define USERDATA_DIR "user"
|
||||
#ifdef USER_DIR
|
||||
#define DOLPHIN_DATA_DIR USER_DIR
|
||||
|
@ -75,8 +74,8 @@
|
|||
#ifdef _WIN32
|
||||
#define SYSDATA_DIR "Sys"
|
||||
#elif defined __APPLE__
|
||||
#define SYSDATA_DIR "Contents/Sys"
|
||||
#elif defined __linux__
|
||||
#define SYSDATA_DIR "Contents/Resources/Sys"
|
||||
#else
|
||||
#ifdef DATA_DIR
|
||||
#define SYSDATA_DIR DATA_DIR "sys"
|
||||
#define SHARED_USER_DIR DATA_DIR USERDATA_DIR DIR_SEP
|
||||
|
|
|
@ -422,11 +422,6 @@ bool RunCode(const ARCode &arcode)
|
|||
|
||||
switch (addr.type)
|
||||
{
|
||||
case 0x08:
|
||||
LogInfo("Bad Normal Code type: 0x08");
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
if (false == NormalCode(addr, data))
|
||||
return false;
|
||||
|
|
|
@ -58,15 +58,15 @@ elif sys.platform == 'darwin' and not env['HAVE_WX']:
|
|||
elif sys.platform == 'darwin' and env['HAVE_WX']:
|
||||
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',
|
||||
'#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')
|
||||
|
||||
env.Plist(
|
||||
env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
|
||||
'#' + env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
|
||||
Value(dict(
|
||||
CFBundleExecutable = 'Dolphin',
|
||||
CFBundleIconFile = 'Dolphin.icns',
|
||||
|
@ -86,6 +86,6 @@ else:
|
|||
|
||||
if env['HAVE_WX']:
|
||||
env.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
|
||||
env.Program(exeGUI, files, LIBS = env['LIBS'] + wxlibs + libs)
|
||||
env.Program('#' + exeGUI, files, LIBS = env['LIBS'] + wxlibs + libs)
|
||||
else:
|
||||
env.Program(exeNoGUI, files, LIBS = env['LIBS'] + libs)
|
||||
env.Program('#' + exeNoGUI, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -18,18 +18,20 @@
|
|||
#ifndef XINPUTBASE_H
|
||||
#define XINPUTBASE_H
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/keysym.h>
|
||||
#include "Config.h"
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
namespace InputCommon
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
KeySym wxCharCodeWXToX(int id);
|
||||
int wxKeyModWXToX(int modstate);
|
||||
KeySym wxCharCodeWXToX(int id);
|
||||
int wxKeyModWXToX(int modstate);
|
||||
#endif
|
||||
void XKeyToString(unsigned int keycode, char *keyStr);
|
||||
void XKeyToString(unsigned int keycode, char *keyStr);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -11,4 +11,4 @@ libs = [
|
|||
'common',
|
||||
]
|
||||
|
||||
env.Program(env['binary_dir'] + 'dsptool', files, LIBS = libs)
|
||||
env.Program('#' + env['binary_dir'] + 'dsptool', files, LIBS = libs)
|
||||
|
|
|
@ -29,4 +29,4 @@ if env['HAVE_WX']:
|
|||
|
||||
libs = [ 'common', 'audiocommon' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -26,4 +26,4 @@ libs = [ 'dspcore', 'audiocommon', 'common' ]
|
|||
if env['HAVE_WX']:
|
||||
libs += [ 'debugger_ui_util' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -38,4 +38,4 @@ elif sys.platform == 'win32':
|
|||
elif not sys.platform == 'darwin' and env['HAVE_OPENCL']:
|
||||
libs += [ 'OpenCL' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -40,4 +40,4 @@ if sys.platform == 'darwin' and not env['HAVE_WX']:
|
|||
elif sys.platform == 'win32':
|
||||
files += [ 'Win32.cpp' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -33,4 +33,4 @@ if env['HAVE_WIIUSE']:
|
|||
libs += [ 'wiiuse' ]
|
||||
files += [ 'wiimote_real.cpp' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -31,4 +31,4 @@ if env['HAVE_WIIUSE']:
|
|||
files += [ 'WiimoteReal/WiimoteReal.cpp' ]
|
||||
libs += [ 'wiiuse' ]
|
||||
|
||||
env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
env.SharedLibrary('#' + env['plugin_dir'] + name, files, LIBS = env['LIBS'] + libs)
|
||||
|
|
|
@ -12,4 +12,4 @@ libs = [
|
|||
'dspcore', 'common',
|
||||
]
|
||||
|
||||
env.Program(env['binary_dir'] + 'tester', files, LIBS = libs)
|
||||
env.Program('#' + env['binary_dir'] + 'tester', files, LIBS = libs)
|
||||
|
|
Loading…
Reference in New Issue