From 9d31c99c26956ecedf0bdcf9e02ce412d313257b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Nov 2011 03:44:08 +0000 Subject: support for creating project files in utf8 paths (was defaulting to ascii and throwing errors) --- build_files/cmake/cmake_qtcreator_project.py | 6 +++--- build_files/cmake/project_info.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'build_files') diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index a89bcd01523..07ffa659437 100755 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -89,7 +89,7 @@ def create_qtc_project_main(): 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 @@ def create_qtc_project_main(): 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 @@ def create_qtc_project_python(): 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(): diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py index eed002ce7ba..0b922979a63 100755 --- a/build_files/cmake/project_info.py +++ b/build_files/cmake/project_info.py @@ -186,7 +186,7 @@ def cmake_advanced_info(): 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() -- cgit v1.2.3