diff engine/SConscript @ 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 efa51189ffc3
children 92433f507feb
line wrap: on
line diff
--- 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])