diff --git a/Binary/linux/Sys b/Binary/linux/Sys deleted file mode 120000 index 26db8ed62b..0000000000 --- a/Binary/linux/Sys +++ /dev/null @@ -1 +0,0 @@ -../../Data/Sys \ No newline at end of file diff --git a/Binary/linux/User b/Binary/linux/User deleted file mode 120000 index f217ca7882..0000000000 --- a/Binary/linux/User +++ /dev/null @@ -1 +0,0 @@ -../../Data/User \ No newline at end of file diff --git a/SConstruct b/SConstruct index 18631438b5..d54948553c 100644 --- a/SConstruct +++ b/SConstruct @@ -2,6 +2,7 @@ import os import sys +import platform # Home made tests sys.path.append('SconsTests') @@ -213,13 +214,19 @@ if not env['osx64']: # add methods from utils to env env.AddMethod(utils.filterWarnings) -# output -if sys.platform == 'darwin': - platform = 'mac' -else: - platform = 'linux' +# Where do we run from +env['base_dir'] = os.getcwd()+ '/'; + +# install paths +# TODO: support global install +env['prefix'] = os.path.join(env['base_dir'] + 'Binary', platform.system() + '-' + platform.machine() + '/') +#TODO add lib +env['plugin_dir'] = env['prefix'] + 'Plugins/' +#TODO add bin +env['binary_dir'] = env['prefix'] +#TODO where should this go? +env['data_dir'] = env['prefix'] -env['plugin_dir'] = 'Binary/%s/Plugins/' % platform Export('env') utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h", @@ -241,3 +248,11 @@ for subdir in dirs: subdir + os.sep + 'SConscript', duplicate = 0 ) + +# Data install +env.Install(env['data_dir'], 'Data/Sys') +env.Install(env['data_dir'], 'Data/User') + +if sys.platform == 'darwin': + env.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/', + Source/Core/DolphinWX/resources/Dolphin.icns) diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index 73a389ec22..36f28c72cd 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -56,13 +56,13 @@ else: ) if sys.platform == 'darwin': - exeGUI = '../../../../Binary/mac/Dolphin.app/Contents/MacOS/Dolphin' - exeNoGUI = '../../../../Binary/mac/DolphinNoGUI' + exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin' + exeNoGUI = env['binary_dir'] + 'DolphinNoGUI' icon = 'Dolphin' version = 'svn' wxenv.Plist( - '../../../../Binary/mac/Dolphin.app/Contents/Info.plist', + env['binary_dir'] + 'Dolphin.app/Contents/Info.plist', Value(dict( CFAppleHelpAnchor = 'index', CFBundleExecutable = 'Dolphin', @@ -80,8 +80,8 @@ if sys.platform == 'darwin': )) ) else: - exeGUI = '../../../../Binary/linux/Dolphin' - exeNoGUI = '../../../../Binary/linux/DolphinNoGUI' + exeGUI = env['binary_dir'] + 'Dolphin' + exeNoGUI = env['binary_dir'] + 'DolphinNoGUI' objects = [ wxenv.Object(srcFile) for srcFile in files ] if not wxenv['osx64']: diff --git a/Binary/mac/Dolphin.app/Contents/Resources/Dolphin.icns b/Source/Core/DolphinWX/resources/Dolphin.icns similarity index 100% rename from Binary/mac/Dolphin.app/Contents/Resources/Dolphin.icns rename to Source/Core/DolphinWX/resources/Dolphin.icns diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript b/Source/Plugins/Plugin_DSP_HLE/Src/SConscript index 66cba3fc2d..0da67958ce 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_HLE/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_DSP_HLE.so" +name = "Plugin_DSP_HLE" files = [ 'DSPHandler.cpp', @@ -32,5 +32,5 @@ dspenv.Append( CXXFLAGS = [ '-fPIC' ], LIBS = [ 'common' ], ) -if not env['osx64']: - dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) + +dspenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript b/Source/Plugins/Plugin_DSP_LLE/Src/SConscript index d7005422bd..21cf40fd6c 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_LLE/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_DSP_LLE.so" +name = "Plugin_DSP_LLE" files = [ "AOSoundStream.cpp", @@ -31,5 +31,5 @@ lleenv.Append( CXXFLAGS = [ '-fPIC' ], LIBS = [ 'common' ], ) -if not env['osx64']: - lleenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) + +lleenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_DSP_NULL/Src/SConscript b/Source/Plugins/Plugin_DSP_NULL/Src/SConscript index c85a58f34d..aee92df1d4 100644 --- a/Source/Plugins/Plugin_DSP_NULL/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_NULL/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_DSP_NULL.so" +name = "Plugin_DSP_NULL" files = [ "DSPHandler.cpp", @@ -32,4 +32,4 @@ else: LIBS = [ 'common' ], ) -dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) +dspenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_PadSimple/Src/SConscript b/Source/Plugins/Plugin_PadSimple/Src/SConscript index e831bed11d..a3430103da 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/SConscript +++ b/Source/Plugins/Plugin_PadSimple/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_PadSimple.so" +name = "Plugin_PadSimple" files = [ "PadSimple.cpp", @@ -24,4 +24,4 @@ if padenv['osx64']: LINKFLAGS = [ '-arch', 'x86_64' ], ) -padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) +padenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 15c298d19f..91ee6f8d4a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -3,10 +3,10 @@ Import('env') # can we import path in one place? import sys -sys.path.append('../../../SconsTests') +sys.path.append(env['base_dir']+'SconsTests') import utils -name = "Plugin_VideoOGL.so" +name = "Plugin_VideoOGL" files = [ 'BPStructs.cpp', @@ -111,7 +111,7 @@ gfxenv.Append( ) gfxenv.SharedLibrary( - '../../../../'+env['plugin_dir']+name, + env['plugin_dir']+name, files, LIBS = libs + gfxenv['LIBS'] ) diff --git a/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript b/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript index bcc3bb93e1..aa76e2a7b6 100644 --- a/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript +++ b/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_Wiimote.so" +name = "Plugin_Wiimote" files = [ "Wiimote.cpp", @@ -23,4 +23,4 @@ else: LIBS = [ 'common' ], ) -padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) +padenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript index c3b47e72b8..cb02dce39c 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript @@ -3,7 +3,7 @@ Import('env') import sys -name = "Plugin_nJoy_SDL.so" +name = "Plugin_nJoy_SDL" files = [ 'nJoy.cpp', @@ -17,4 +17,4 @@ padenv.Append( LIBS = [ 'common' ], ) if not env['osx64']: - padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) + padenv.SharedLibrary(env['plugin_dir']+name, files)