No more Binary in svn + scons clean up

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1158 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2008-11-13 08:12:48 +00:00
parent a3abeed4f2
commit 2c74f66070
12 changed files with 43 additions and 30 deletions

View File

@ -1 +0,0 @@
../../Data/Sys

View File

@ -1 +0,0 @@
../../Data/User

View File

@ -2,6 +2,7 @@
import os import os
import sys import sys
import platform
# Home made tests # Home made tests
sys.path.append('SconsTests') sys.path.append('SconsTests')
@ -213,13 +214,19 @@ if not env['osx64']:
# add methods from utils to env # add methods from utils to env
env.AddMethod(utils.filterWarnings) env.AddMethod(utils.filterWarnings)
# output # Where do we run from
if sys.platform == 'darwin': env['base_dir'] = os.getcwd()+ '/';
platform = 'mac'
else: # install paths
platform = 'linux' # 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') Export('env')
utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h", utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h",
@ -241,3 +248,11 @@ for subdir in dirs:
subdir + os.sep + 'SConscript', subdir + os.sep + 'SConscript',
duplicate = 0 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)

View File

@ -56,13 +56,13 @@ else:
) )
if sys.platform == 'darwin': if sys.platform == 'darwin':
exeGUI = '../../../../Binary/mac/Dolphin.app/Contents/MacOS/Dolphin' exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
exeNoGUI = '../../../../Binary/mac/DolphinNoGUI' exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
icon = 'Dolphin' icon = 'Dolphin'
version = 'svn' version = 'svn'
wxenv.Plist( wxenv.Plist(
'../../../../Binary/mac/Dolphin.app/Contents/Info.plist', env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
Value(dict( Value(dict(
CFAppleHelpAnchor = 'index', CFAppleHelpAnchor = 'index',
CFBundleExecutable = 'Dolphin', CFBundleExecutable = 'Dolphin',
@ -80,8 +80,8 @@ if sys.platform == 'darwin':
)) ))
) )
else: else:
exeGUI = '../../../../Binary/linux/Dolphin' exeGUI = env['binary_dir'] + 'Dolphin'
exeNoGUI = '../../../../Binary/linux/DolphinNoGUI' exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
objects = [ wxenv.Object(srcFile) for srcFile in files ] objects = [ wxenv.Object(srcFile) for srcFile in files ]
if not wxenv['osx64']: if not wxenv['osx64']:

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_DSP_HLE.so" name = "Plugin_DSP_HLE"
files = [ files = [
'DSPHandler.cpp', 'DSPHandler.cpp',
@ -32,5 +32,5 @@ dspenv.Append(
CXXFLAGS = [ '-fPIC' ], CXXFLAGS = [ '-fPIC' ],
LIBS = [ 'common' ], LIBS = [ 'common' ],
) )
if not env['osx64']:
dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) dspenv.SharedLibrary(env['plugin_dir']+name, files)

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_DSP_LLE.so" name = "Plugin_DSP_LLE"
files = [ files = [
"AOSoundStream.cpp", "AOSoundStream.cpp",
@ -31,5 +31,5 @@ lleenv.Append(
CXXFLAGS = [ '-fPIC' ], CXXFLAGS = [ '-fPIC' ],
LIBS = [ 'common' ], LIBS = [ 'common' ],
) )
if not env['osx64']:
lleenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) lleenv.SharedLibrary(env['plugin_dir']+name, files)

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_DSP_NULL.so" name = "Plugin_DSP_NULL"
files = [ files = [
"DSPHandler.cpp", "DSPHandler.cpp",
@ -32,4 +32,4 @@ else:
LIBS = [ 'common' ], LIBS = [ 'common' ],
) )
dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) dspenv.SharedLibrary(env['plugin_dir']+name, files)

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_PadSimple.so" name = "Plugin_PadSimple"
files = [ files = [
"PadSimple.cpp", "PadSimple.cpp",
@ -24,4 +24,4 @@ if padenv['osx64']:
LINKFLAGS = [ '-arch', 'x86_64' ], LINKFLAGS = [ '-arch', 'x86_64' ],
) )
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) padenv.SharedLibrary(env['plugin_dir']+name, files)

View File

@ -3,10 +3,10 @@
Import('env') Import('env')
# can we import path in one place? # can we import path in one place?
import sys import sys
sys.path.append('../../../SconsTests') sys.path.append(env['base_dir']+'SconsTests')
import utils import utils
name = "Plugin_VideoOGL.so" name = "Plugin_VideoOGL"
files = [ files = [
'BPStructs.cpp', 'BPStructs.cpp',
@ -111,7 +111,7 @@ gfxenv.Append(
) )
gfxenv.SharedLibrary( gfxenv.SharedLibrary(
'../../../../'+env['plugin_dir']+name, env['plugin_dir']+name,
files, files,
LIBS = libs + gfxenv['LIBS'] LIBS = libs + gfxenv['LIBS']
) )

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_Wiimote.so" name = "Plugin_Wiimote"
files = [ files = [
"Wiimote.cpp", "Wiimote.cpp",
@ -23,4 +23,4 @@ else:
LIBS = [ 'common' ], LIBS = [ 'common' ],
) )
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) padenv.SharedLibrary(env['plugin_dir']+name, files)

View File

@ -3,7 +3,7 @@
Import('env') Import('env')
import sys import sys
name = "Plugin_nJoy_SDL.so" name = "Plugin_nJoy_SDL"
files = [ files = [
'nJoy.cpp', 'nJoy.cpp',
@ -17,4 +17,4 @@ padenv.Append(
LIBS = [ 'common' ], LIBS = [ 'common' ],
) )
if not env['osx64']: if not env['osx64']:
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files) padenv.SharedLibrary(env['plugin_dir']+name, files)