Allow user config files in qtcreator project.

The blender.config file used for local #defines in qtcreator projects is rewritten on every project update. To avoid losing user settings these can now be written to an optional blender_custom.config file, which is then merged into the main blender.config on updates.
This commit is contained in:
Lukas Toenne 2012-10-08 11:02:11 +00:00
parent ea3db4a71a
commit 10547d4c67

@ -105,7 +105,14 @@ def create_qtc_project_main():
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
if os.path.exists(qtc_custom_cfg):
f.write(fc.read())
fc = open(qtc_custom_cfg, 'r')
f.write(fc.read())
fc.close()
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()