changeset 413:10ac0c080564

Added the install-dlls target for the win32 platform only. It copies all dlls to both the Python site-packages/fife directory and the <FIFE>/engine/python/fife directory. This assumes you have the Development Kit is installed in the build/win32 directory. I have not tested to make sure this doesn't break other platforms. [t:430]
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 02 Feb 2010 20:47:20 +0000
parents 49646eb39fe1
children 92433f507feb
files SConstruct build/win32/build_environments/scons/install_engine.bat build/win32/build_environments/scons/loginstall_engine.bat engine/SConscript
diffstat 4 files changed, 23 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/SConstruct	Mon Feb 01 21:18:09 2010 +0000
+++ b/SConstruct	Tue Feb 02 20:47:20 2010 +0000
@@ -291,6 +291,7 @@
 #TODO: clean this up a bit.  Should probably make sure unittest++ exists.
 #**************************************************************************
 opts = {'SRC' : os.path.join(os.getcwd(), 'engine',),
+		'DLLPATH' : os.path.join(os.getcwd(), 'build', 'win32', 'binaries', 'mingw'),
 		'DEBUG' : debug,
 		'PREFIX' : prefix,
 		'TESTLIBS' : ['fife', 'UnitTest++'],
--- a/build/win32/build_environments/scons/install_engine.bat	Mon Feb 01 21:18:09 2010 +0000
+++ b/build/win32/build_environments/scons/install_engine.bat	Tue Feb 02 20:47:20 2010 +0000
@@ -1,7 +1,5 @@
 @echo off
 
 :: run scons
-python ..\..\applications\scons\scons.py -C ..\..\..\..\ install-python
+python ..\..\applications\scons\scons.py -C ..\..\..\..\ install-python install-dlls
 
-:: copy the needed dlls to the path where fife was installed
-call copy_dlls.bat install
--- a/build/win32/build_environments/scons/loginstall_engine.bat	Mon Feb 01 21:18:09 2010 +0000
+++ b/build/win32/build_environments/scons/loginstall_engine.bat	Tue Feb 02 20:47:20 2010 +0000
@@ -1,7 +1,4 @@
 @echo off
 
 :: run scons
-python ..\..\applications\scons\scons.py -C ..\..\..\..\ install-python > engine_build_log.txt 2>&1
-
-:: copy the needed dlls to the path where fife was installed
-call copy_dlls.bat install
\ No newline at end of file
+python ..\..\applications\scons\scons.py -C ..\..\..\..\ install-python install-dlls > engine_build_log.txt 2>&1
--- a/engine/SConscript	Mon Feb 01 21:18:09 2010 +0000
+++ b/engine/SConscript	Tue Feb 02 20:47:20 2010 +0000
@@ -56,6 +56,16 @@
 intfiles = utils.filter_by_dir(['swigwrappers'], swigfiles)
 compilefiles = utils.filter_by_dir(['swigwrappers'], implfiles)
 
+if sys.platform == 'win32':
+	dllpath = upath(opts['DLLPATH'])
+	dllfilelist = list(dllpath.walkfiles('*.dll'))
+	dllfiles = list()
+	for f in dllfilelist:
+		dllfiles.append(utils.relpath(f,opts['DLLPATH'])) 
+	
+	
+
+
 
 #**************************************************************************
 #python
@@ -173,6 +183,13 @@
 install_python_module = env.Install(pypath, ['#/engine/python/fife/fife.py','#/engine/python/fife/__init__.py'])
 install_python_extensions = env.InstallAs(extdestfilelist, extensionfiles)
 
+if sys.platform == 'win32':
+	dlldestfilelist = utils.gen_dest_files(pypath, dllfiles)
+	dlldestfilelist2 = utils.gen_dest_files(os.path.join(engine_path, 'python', 'fife'), dllfiles)
+	
+	install_dlls = env.InstallAs(dlldestfilelist, dllfilelist)
+	install_dlls2 = env.InstallAs(dlldestfilelist2, dllfilelist)
+
 #**************************************************************************
 #Alias definitions
 #**************************************************************************
@@ -189,6 +206,9 @@
 alias_python = Alias('fife-python', [pythonlib, copy_cmd, alias_swig])
 Alias('fife', [alias_shared, alias_static, alias_python])
 
+if sys.platform == 'win32':
+	Alias('install-dlls', [install_dlls, install_dlls2])
+
 alias_install_shared = Alias('install-shared', install_shared)
 alias_install_static = Alias('install-static', install_static)
 alias_install_python = Alias('install-python', [alias_python, install_python_lib, install_python_module, install_python_extensions])