how to change script in Qt Creator/Preferences/Build&Run/DefaultBuildProperties/ to make my build dir lookup someting like MPU-d or MPU-Debug?
-
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
-
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
@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:
-
C Christian Ehrlicher moved this topic from General and Desktop on
-
@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:
@ChrisW67 well,I dont want to edit each project, I need to set settings for all projects to be build as per above
-
@ChrisW67 well,I dont want to edit each project, I need to set settings for all projects to be build as per above
@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".
-
@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".
@ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?
-
@ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?
@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}")} -
@ChrisW67 if I have existing projects, only way to shorten their build dir to create new and copy files there?
@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.
-
@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.
@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}")} -
@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}")}@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-DYes, 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.