[Bf-blender-cvs] [73a104b] master: Fix T44968: Python executable crashes due to missing .DLL

Sergey Sharybin noreply at git.blender.org
Wed Jun 10 13:41:25 CEST 2015


Commit: 73a104b8e86c45912ad99ea349c296e502811584
Author: Sergey Sharybin
Date:   Wed Jun 10 13:39:57 2015 +0500
Branches: master
https://developer.blender.org/rB73a104b8e86c45912ad99ea349c296e502811584

Fix T44968: Python executable crashes due to missing .DLL

For now we work this around by copying python DLL to the
bin folder. Ideally the DLL should be shared between blender
and python, but that's a bit tricky to do on windows.

===================================================================

M	SConstruct
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/SConstruct b/SConstruct
index d05e689..573d4c1 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1300,6 +1300,15 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
     windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
     allinstall += windlls
 
+    # TODO(sergey): For unti we've got better way to deal with python binary
+    if env['WITH_BF_PYTHON']:
+        py_target = os.path.join(env['BF_INSTALLDIR'], VERSION, 'python', 'bin')
+        if env['BF_DEBUG']:
+            allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll'])
+        else:
+            allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll'])
+
+
 if env['OURPLATFORM'] == 'win64-mingw':
     dllsources = []
 
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index eb91277..1b2dd21 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -679,6 +679,19 @@ elseif(WIN32)
 				install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
 						DESTINATION ${BLENDER_VERSION}/python/lib/site-packages)
 			endif()
+
+
+			# TODO(sergey): For unti we've got better way to deal with python binary
+			install(
+				FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
+				DESTINATION ${BLENDER_VERSION}/python/bin
+				CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
+			)
+			install(
+				FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
+				DESTINATION ${BLENDER_VERSION}/python/bin
+				CONFIGURATIONS Debug
+			)
 		endif()
 
 		unset(_PYTHON_VERSION_NO_DOTS)




More information about the Bf-blender-cvs mailing list