[Bf-blender-cvs] [c5be1dc] input_method_editor_partial_support: IME: Initial Scons Support

Severin noreply at git.blender.org
Sat Dec 6 15:35:15 CET 2014


Commit: c5be1dc995b3deab84feb9dff5e6912d0c220139
Author: Severin
Date:   Sat Dec 6 15:32:15 2014 +0100
Branches: input_method_editor_partial_support
https://developer.blender.org/rBc5be1dc995b3deab84feb9dff5e6912d0c220139

IME: Initial Scons Support

Adds support for Scons flag WITH_BF_IME
**note:** dynamic linking of IME libs is still missing for Scons

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

M	CMakeLists.txt
M	SConstruct
M	build_files/scons/tools/btools.py
M	intern/ghost/SConscript
M	source/blender/editors/interface/SConscript
M	source/blender/windowmanager/SConscript

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51a9d96..4ee277b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -319,7 +319,7 @@ option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 
 # Misc
 if(WIN32)
-	option(WITH_INPUT_IME "Enable Input Method Editor (IME)" ON)
+	option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
 endif()
 option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
 option(WITH_RAYOPTIMIZATION	"Enable use of SIMD (SSE) optimizations for the raytracer" ON)
diff --git a/SConstruct b/SConstruct
index 4c2097f..4dacf89 100644
--- a/SConstruct
+++ b/SConstruct
@@ -266,6 +266,7 @@ if 'blenderlite' in B.targets:
     target_env_defs['WITH_BF_BOOLEAN'] = False
     target_env_defs['WITH_BF_REMESH'] = False
     target_env_defs['WITH_BF_PYTHON'] = False
+    target_env_defs['WITH_BF_IME'] = False
     target_env_defs['WITH_BF_3DMOUSE'] = False
     target_env_defs['WITH_BF_LIBMV'] = False
     target_env_defs['WITH_BF_FREESTYLE'] = False
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index cf9962d..eb5036f 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -174,6 +174,7 @@ def validate_arguments(args, bc):
             'WITH_BF_CXX_GUARDEDALLOC',
             'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
             'BUILDBOT_BRANCH',
+            'WITH_BF_IME',
             'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
             'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
             'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
@@ -507,6 +508,8 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
         (BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
 
+        (BoolVariable('WITH_BF_IME', 'Enable Input Method Editor (IME) for complex Asian character input', False)),
+
         (BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
         (BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
         ('BF_3DMOUSE', '3d mouse library base path', ''),
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 5a4572c..a41fadf 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -154,6 +154,13 @@ if env['BF_GHOST_DEBUG']:
 else:
     sources.remove('intern' + os.sep + 'GHOST_EventPrinter.cpp')
 
+if env['WITH_BF_IME']:
+    if window_system in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
+        defs.append('WITH_INPUT_IME')
+    else:
+        sources.remove('intern' + os.sep + 'GHOST_ImeWin32.h')
+        sources.remove('intern' + os.sep + 'GHOST_ImeWin32.cpp')
+
 if env['WITH_BF_3DMOUSE']:
     defs.append('WITH_INPUT_NDOF')
 
diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript
index 303ab7f..5af8bba 100644
--- a/source/blender/editors/interface/SConscript
+++ b/source/blender/editors/interface/SConscript
@@ -48,6 +48,10 @@ incs = [
 
 defs = env['BF_GL_DEFINITIONS']
 
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
+    if env['WITH_BF_IME']:
+        defs.append('WITH_INPUT_IME')
+
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript
index 3c44ff6..a6f64f7 100644
--- a/source/blender/windowmanager/SConscript
+++ b/source/blender/windowmanager/SConscript
@@ -69,6 +69,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', '
 if env['BF_BUILDINFO']:
     defs.append('WITH_BUILDINFO')
 
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
+    if env['WITH_BF_IME']:
+        defs.append('WITH_INPUT_IME')
+
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')




More information about the Bf-blender-cvs mailing list