[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41902] trunk/blender/build_files/cmake: support for creating project files in utf8 paths ( was defaulting to ascii and throwing errors)
Campbell Barton
ideasman42 at gmail.com
Wed Nov 16 04:44:12 CET 2011
Revision: 41902
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41902
Author: campbellbarton
Date: 2011-11-16 03:44:08 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
support for creating project files in utf8 paths (was defaulting to ascii and throwing errors)
Modified Paths:
--------------
trunk/blender/build_files/cmake/cmake_qtcreator_project.py
trunk/blender/build_files/cmake/project_info.py
Modified: trunk/blender/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-11-16 03:10:15 UTC (rev 41901)
+++ trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-11-16 03:44:08 UTC (rev 41902)
@@ -89,7 +89,7 @@
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
- f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w')
+ f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8')
f.write("\n".join(sorted(includes)))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
@@ -104,7 +104,7 @@
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
- print("Blender project file written to: %s" % qtc_prj)
+ print("Blender project file written to: %r" % qtc_prj)
# --- end
@@ -133,7 +133,7 @@
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
- print("Python project file written to: %s" % qtc_prj)
+ print("Python project file written to: %r" % qtc_prj)
def main():
Modified: trunk/blender/build_files/cmake/project_info.py
===================================================================
--- trunk/blender/build_files/cmake/project_info.py 2011-11-16 03:10:15 UTC (rev 41901)
+++ trunk/blender/build_files/cmake/project_info.py 2011-11-16 03:44:08 UTC (rev 41902)
@@ -186,7 +186,7 @@
def cmake_cache_var(var):
- cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
+ cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"), encoding='utf-8')
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
cache_file.close()
More information about the Bf-blender-cvs
mailing list