Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Storing build configurations in creator.shared?
QtWS25 Last Chance

Storing build configurations in creator.shared?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ndeubert
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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)

      alt text

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved