support for creating project files in utf8 paths (was defaulting to ascii and throwing errors)
This commit is contained in:
@@ -89,7 +89,7 @@ def create_qtc_project_main():
|
|||||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
||||||
f.write("\n".join(files_rel))
|
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)))
|
f.write("\n".join(sorted(includes)))
|
||||||
|
|
||||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
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()
|
defines_final += cmake_compiler_defines()
|
||||||
f.write("\n".join(defines_final))
|
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
|
# --- end
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ def create_qtc_project_python():
|
|||||||
f = open(qtc_cfg, 'w')
|
f = open(qtc_cfg, 'w')
|
||||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
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():
|
def main():
|
||||||
|
@@ -186,7 +186,7 @@ def cmake_advanced_info():
|
|||||||
|
|
||||||
|
|
||||||
def cmake_cache_var(var):
|
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("#")]
|
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()
|
cache_file.close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user