Storing build configurations in creator.shared?
-
Re: Custom C++ settings and shared configurations
Hello, I am trying to figure out the best way to share build configurations across users. My makefiles take in several possible arguments or variables depending on whether I am building for the target/host, debug/release etc. QtCreator has a very nice interface for configuring build configurations where you can specify make arguments so I just want to be able to do this once and share it with other users. I've read that creator.shared can contain settings but not build configurations because the build configurations reference kits. However, in my case I am not using kits because all of that knowledge is contained in my makefiles therefore my build configurations do not reference the kits because they are just make arguments. i.e.
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.5"> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/scratch/svn/Shelby3</value> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/> <value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value> <value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">sdk=arm cfg=Release VERBOSE=1</value> <value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericMakeStep</value> </valuemap> <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> </valuemap> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"> <value type="QString">clean</value> </valuelist> <value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">true</value> <value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments"></value> <value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericMakeStep</value> </valuemap> <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> </valuemap> <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Default</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release Verbose</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericBuildConfiguration</value> </valuemap>
Is there anyway to do what I need to here?
Thanks for your time. -
Hi
We tried using a tool to add to the xml .user file but in the end it turn out it was just easier
to merge build steps with the tools we normally use for code merging.Since all of use use this tool on a regular basis, it became a non issue very fast as it's
far less complicated than resolving code conflicts. ( one click and u are done in most cases)This works pretty well but only if the others have a pro.user that is somewhat similar to the "master"
If the others have added their own build steps, a little more care must be taken with the numbering of each step. ( the key)Other option is to use the shared feature
http://doc.qt.io/qtcreator/creator-sharing-project-settings.html
But we found it was more work removing the unwanted parts (and NOT ruin the structure)
and only having the shared part remaining
than simply merge the build step area.