Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?
Forum Updated to NodeBB v4.3 + New Features

how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 2 Posters 990 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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by aha_1980
    #1

    current build dir build-MPU-Desktop_Qt_6_2_4_GCC_64bit-Debug
    ../%{JS: Util.asciify("build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}")}
    settings
    how to change script in Qt Creator/Prefferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?

    tried to trim script a little, but it had no effect

    C 1 Reply Last reply
    0
    • J JacobNovitsky

      current build dir build-MPU-Desktop_Qt_6_2_4_GCC_64bit-Debug
      ../%{JS: Util.asciify("build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}")}
      settings
      how to change script in Qt Creator/Prefferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?

      tried to trim script a little, but it had no effect

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by ChrisW67
      #2

      @JacobNovitsky You don't, those settings affects the defaults for all new projects, and I would guess they are not all going to be called MPU. If you really must do that then simply edit the template and create a new project; it will not affect existing projects.

      The build directory is part of each Project's settings and you can edit that for each project:
      05988c21-f8d8-4580-9ffb-59c8039bf91a-image.png

      J 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
      • C ChrisW67

        @JacobNovitsky You don't, those settings affects the defaults for all new projects, and I would guess they are not all going to be called MPU. If you really must do that then simply edit the template and create a new project; it will not affect existing projects.

        The build directory is part of each Project's settings and you can edit that for each project:
        05988c21-f8d8-4580-9ffb-59c8039bf91a-image.png

        J Offline
        J Offline
        JacobNovitsky
        wrote on last edited by
        #3

        @ChrisW67 well,I dont want to edit each project, I need to set settings for all projects to be build as per above

        C 1 Reply Last reply
        0
        • J JacobNovitsky

          @ChrisW67 well,I dont want to edit each project, I need to set settings for all projects to be build as per above

          C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          @JacobNovitsky Well then, edit the default setting. Cannot see why this is not obvious. Seems that:

          ../%{JS: Util.asciify("build-%{Project:Name}-%{BuildConfig:Name}")}
          

          is close to what you want if, and only if, your project name is "MPU".

          J 1 Reply Last reply
          1
          • C ChrisW67

            @JacobNovitsky Well then, edit the default setting. Cannot see why this is not obvious. Seems that:

            ../%{JS: Util.asciify("build-%{Project:Name}-%{BuildConfig:Name}")}
            

            is close to what you want if, and only if, your project name is "MPU".

            J Offline
            J Offline
            JacobNovitsky
            wrote on last edited by
            #5

            @ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?

            J C 2 Replies Last reply
            0
            • J JacobNovitsky

              @ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?

              J Offline
              J Offline
              JacobNovitsky
              wrote on last edited by
              #6

              @ChrisW67 also I need to crop Debug or Release to first character:
              projectName-Debug > projectName-D
              not much familiar with JS, kindly advise, maybe there is other way
              current line in settings:
              ../%{JS: Util.asciify("%{Project:Name}-%{BuildConfig:Name}")}

              1 Reply Last reply
              0
              • J JacobNovitsky

                @ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?

                C Offline
                C Offline
                ChrisW67
                wrote on last edited by
                #7

                @JacobNovitsky As explained before, changing the default setting for new projects will not change existing projects. Open the existing Project settings and edit the build path, then move the existing build directory to match or discard the existing build directory and rebuild from source.

                @JacobNovitsky said in how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?:

                also I need to crop Debug or Release to first character:

                You have a limited range of variables that you can use in the default build directory template, and the one it is using meets your original requirement. If you need (I cannot fathom why) to truncate it then I suggest you exercise some Google-fu, e.g. this result, and try something for yourself.

                If you cannot achieve it then come back here and explain what you have tried, how it behaves, and what you expected to happen.

                J 1 Reply Last reply
                1
                • C ChrisW67

                  @JacobNovitsky As explained before, changing the default setting for new projects will not change existing projects. Open the existing Project settings and edit the build path, then move the existing build directory to match or discard the existing build directory and rebuild from source.

                  @JacobNovitsky said in how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?:

                  also I need to crop Debug or Release to first character:

                  You have a limited range of variables that you can use in the default build directory template, and the one it is using meets your original requirement. If you need (I cannot fathom why) to truncate it then I suggest you exercise some Google-fu, e.g. this result, and try something for yourself.

                  If you cannot achieve it then come back here and explain what you have tried, how it behaves, and what you expected to happen.

                  J Offline
                  J Offline
                  JacobNovitsky
                  wrote on last edited by
                  #8

                  @ChrisW67
                  is there a way to crop build folder to
                  projectName-Debug > projectName-D
                  need to ammend script somehow:
                  ../%{JS: Util.asciify("%{Project:Name}-%{BuildConfig:Name}")}

                  C 1 Reply Last reply
                  0
                  • J JacobNovitsky

                    @ChrisW67
                    is there a way to crop build folder to
                    projectName-Debug > projectName-D
                    need to ammend script somehow:
                    ../%{JS: Util.asciify("%{Project:Name}-%{BuildConfig:Name}")}

                    C Offline
                    C Offline
                    ChrisW67
                    wrote on last edited by ChrisW67
                    #9

                    @JacobNovitsky said in how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?:

                    is there a way to crop build folder to
                    projectName-Debug > projectName-D

                    Yes, there is.

                    @ChrisW67 said in his last post:

                    If you cannot achieve it then come back here and explain what you have tried, how it behaves, and what you expected to happen.

                    You are the one that is making an unusual requirement, for no discernible reason, and trying to bend the tool to your will. Demonstrate what you have tried rather than expect everything handed to you on a silver platter.

                    1 Reply Last reply
                    1

                    • Login

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