Incredibuild: Tr::tr and code cosmetics

Change-Id: Id2facedde38dd09311069711b9e621a95439d433
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-19 17:19:57 +01:00
parent 0fff2aa172
commit 2e98acfdfd
20 changed files with 192 additions and 365 deletions

View File

@@ -46005,7 +46005,7 @@ Do you want to display them anyway?</source>
</message>
</context>
<context>
<name>IncrediBuild::Internal::BuildConsoleBuildStep</name>
<name>::IncrediBuild</name>
<message>
<source>IncrediBuild for Windows</source>
<translation type="unfinished">IncrediBuild für Windows</translation>
@@ -46186,37 +46186,10 @@ Do you want to display them anyway?</source>
<source>Opens Build Monitor once the build starts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::IBConsoleBuildStep</name>
<message>
<source>IncrediBuild for Linux</source>
<translation type="unfinished">IncrediBuild für Linux</translation>
</message>
<message>
<source>Target and Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the appropriate arguments to your build command.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Make sure the build command&apos;s multi-job parameter value is large enough (such as -j200 for the JOM or Make build tools)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep original jobs number:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Forces IncrediBuild to not override the -j command line switch, that controls the number of parallel spawned tasks. The default IncrediBuild behavior is to set it to 200.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>IncrediBuild Distribution Control</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Specify nice value. Nice Value should be numeric and between -20 and 19</source>
<translation type="unfinished"></translation>
@@ -52938,21 +52911,15 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CMakeCommandBuilder</name>
<name>::IncrediBuild</name>
<message>
<source>CMake</source>
<translation type="unfinished">CMake</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CommandBuilder</name>
<message>
<source>Custom Command</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CommandBuilderAspect</name>
<message>
<source>Command Helper:</source>
<translation type="unfinished"></translation>
@@ -52969,9 +52936,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
<source>Make arguments:</source>
<translation type="unfinished">Kommandozeilenargumente für make:</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::MakeCommandBuilder</name>
<message>
<source>Make</source>
<translation type="unfinished">Make</translation>

View File

@@ -46069,28 +46069,19 @@ Stepping into the module or setting breakpoints by file and line is expected to
</message>
</context>
<context>
<name>IncrediBuild::Internal::BuildConsoleBuildStep</name>
<name>::IncrediBuild</name>
<message>
<source>Miscellaneous</source>
<translation></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CMakeCommandBuilder</name>
<message>
<source>CMake</source>
<translation>CMake</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CommandBuilderAspect</name>
<message>
<source>Make arguments:</source>
<translation>Make :</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::MakeCommandBuilder</name>
<message>
<source>Make</source>
<translation>Make</translation>

View File

@@ -22953,7 +22953,7 @@ Would you like to overwrite them?</source>
</message>
</context>
<context>
<name>IncrediBuild::Internal::BuildConsoleBuildStep</name>
<name>::IncrediBuild</name>
<message>
<source>Miscellaneous</source>
<translation>Разное</translation>
@@ -23026,10 +23026,6 @@ Would you like to overwrite them?</source>
<source>Maximum CPUs to utilize in the build:</source>
<translation>Максимальное количество ЦП для сборки:</translation>
</message>
<message>
<source>Make arguments:</source>
<translation>Параметры Make:</translation>
</message>
<message>
<source>When specified, the execution will stop as soon as an error is encountered. This is the default behavior in &apos;Visual Studio&apos; builds, but not the default for &apos;Make and Build tools&apos; or &apos;Dev Tools&apos; builds</source>
<translation>Включение остановки выполнения при возникновении ошибки. Это поведение по умолчанию в сборках «Visual Studio», но не по умолчанию для сборок «Make and Build tools» или «Dev Tools»</translation>
@@ -23146,16 +23142,10 @@ Would you like to overwrite them?</source>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic; color:#ff0000;&quot;&gt;Please make sure the build command&apos;s multi-job parameter value is large enough (such as -J200 for the JOM or Make build tools)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic; color:#ff0000;&quot;&gt;Убедитесь, что значение параметра multi-job команды сборки достаточно велико (например, -J200 для сборщиков JOM или Make)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::BuildConsoleStepConfigWidget</name>
<message>
<source>IncrediBuild for Windows</source>
<translation>IncrediBuild для Windows</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::IBConsoleBuildStep</name>
<message>
<source>Enter the appropriate arguments to your build command</source>
<translation>Введите параметры соответствующие команде сборки</translation>
@@ -23164,26 +23154,10 @@ Would you like to overwrite them?</source>
<source>Setting this option to true, forces IncrediBuild to not override the -j command line switch. The default IncrediBuild behavior is to set a high value to the -j command line switch which controls the number of processes that the build tools executed by QT will execute in parallel (the default IncrediBuild behavior will set this value to 200).</source>
<translation>При включении IncrediBuild не переопределяет параметр командной строки -j. По умолчанию Incredibuild устанавливает большое значение (200) для ключа -j, задающего число параллельных процессов сборки, запускаемых Qt.</translation>
</message>
<message>
<source>Keep Original Jobs Num</source>
<translation>Исходное число задач</translation>
</message>
<message>
<source>Target and configuration</source>
<translation>Цель и конфигурация</translation>
</message>
<message>
<source>Make command:</source>
<translation>Команда Make:</translation>
</message>
<message>
<source>Force remote</source>
<translation>Принудительно внешняя</translation>
</message>
<message>
<source>IncrediBuild Distribution control</source>
<translation>Распределение IncrediBuild</translation>
</message>
<message>
<source>Specify nice value. Nice Value should be numeric and between -20 and 19</source>
<translation>Задание значения nice. Оно должно быть целым числом от -20 до 19.</translation>
@@ -23196,14 +23170,6 @@ Would you like to overwrite them?</source>
<source>Make arguments:</source>
<translation>Параметры make:</translation>
</message>
<message>
<source>Select an helper to establish the build command.</source>
<translation type="unfinished">Помощник для запуска команды сборки.</translation>
</message>
<message>
<source>Command Helper:</source>
<translation type="unfinished">Помощник запуска:</translation>
</message>
<message>
<source>Alternate tasks preference</source>
<translation>Изменять настройки задач</translation>
@@ -23212,9 +23178,6 @@ Would you like to overwrite them?</source>
<source>Make sure the build command&apos;s multi-job parameter value is large enough (such as -J200 for the JOM or Make build tools).</source>
<translation>Убедитесь, что значение многозадачности команды сборки достаточно велико (например, -J200 для JOM или Make).</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::IBConsoleStepConfigWidget</name>
<message>
<source>IncrediBuild for Linux</source>
<translation>IncrediBuild для Linux</translation>

View File

@@ -22890,7 +22890,7 @@ Would you like to overwrite them?</source>
</message>
</context>
<context>
<name>IncrediBuild::Internal::BuildConsoleBuildStep</name>
<name>::IncrediBuild</name>
<message>
<source>IncrediBuild for Windows</source>
<translation type="unfinished"></translation>
@@ -23071,23 +23071,14 @@ Would you like to overwrite them?</source>
<source>Opens Build Monitor once the build starts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CMakeCommandBuilder</name>
<message>
<source>CMake</source>
<translation type="unfinished">CMake</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CommandBuilder</name>
<message>
<source>Custom Command</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::CommandBuilderAspect</name>
<message>
<source>Command Helper:</source>
<translation type="unfinished"></translation>
@@ -23104,37 +23095,10 @@ Would you like to overwrite them?</source>
<source>Make arguments:</source>
<translation type="unfinished">Make :</translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::IBConsoleBuildStep</name>
<message>
<source>IncrediBuild for Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Target and Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the appropriate arguments to your build command.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Make sure the build command&apos;s multi-job parameter value is large enough (such as -j200 for the JOM or Make build tools)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep original jobs number:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Forces IncrediBuild to not override the -j command line switch, that controls the number of parallel spawned tasks. The default IncrediBuild behavior is to set it to 200.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>IncrediBuild Distribution Control</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Specify nice value. Nice Value should be numeric and between -20 and 19</source>
<translation type="unfinished"></translation>
@@ -23151,9 +23115,6 @@ Would you like to overwrite them?</source>
<source>Alternate tasks preference:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>IncrediBuild::Internal::MakeCommandBuilder</name>
<message>
<source>Make</source>
<translation type="unfinished">Make</translation>

View File

@@ -5,6 +5,7 @@
#include "commandbuilderaspect.h"
#include "incredibuildconstants.h"
#include "incredibuildtr.h"
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildconfiguration.h>
@@ -20,31 +21,7 @@
using namespace ProjectExplorer;
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace Constants {
const QLatin1String BUILDCONSOLE_AVOIDLOCAL("IncrediBuild.BuildConsole.AvoidLocal");
const QLatin1String BUILDCONSOLE_PROFILEXML("IncrediBuild.BuildConsole.ProfileXml");
const QLatin1String BUILDCONSOLE_MAXCPU("IncrediBuild.BuildConsole.MaxCpu");
const QLatin1String BUILDCONSOLE_MAXWINVER("IncrediBuild.BuildConsole.MaxWinVer");
const QLatin1String BUILDCONSOLE_MINWINVER("IncrediBuild.BuildConsole.MinWinVer");
const QLatin1String BUILDCONSOLE_TITLE("IncrediBuild.BuildConsole.Title");
const QLatin1String BUILDCONSOLE_MONFILE("IncrediBuild.BuildConsole.MonFile");
const QLatin1String BUILDCONSOLE_SUPPRESSSTDOUT("IncrediBuild.BuildConsole.SuppressStdOut");
const QLatin1String BUILDCONSOLE_LOGFILE("IncrediBuild.BuildConsole.LogFile");
const QLatin1String BUILDCONSOLE_SHOWCMD("IncrediBuild.BuildConsole.ShowCmd");
const QLatin1String BUILDCONSOLE_SHOWAGENTS("IncrediBuild.BuildConsole.ShowAgents");
const QLatin1String BUILDCONSOLE_SHOWTIME("IncrediBuild.BuildConsole.ShowTime");
const QLatin1String BUILDCONSOLE_HIDEHEADER("IncrediBuild.BuildConsole.HideHeader");
const QLatin1String BUILDCONSOLE_LOGLEVEL("IncrediBuild.BuildConsole.LogLevel");
const QLatin1String BUILDCONSOLE_SETENV("IncrediBuild.BuildConsole.SetEnv");
const QLatin1String BUILDCONSOLE_STOPONERROR("IncrediBuild.BuildConsole.StopOnError");
const QLatin1String BUILDCONSOLE_ADDITIONALARGUMENTS("IncrediBuild.BuildConsole.AdditionalArguments");
const QLatin1String BUILDCONSOLE_OPENMONITOR("IncrediBuild.BuildConsole.OpenMonitor");
const QLatin1String BUILDCONSOLE_KEEPJOBNUM("IncrediBuild.BuildConsole.KeepJobNum");
const QLatin1String BUILDCONSOLE_COMMANDBUILDER("IncrediBuild.BuildConsole.CommandBuilder");
}
namespace IncrediBuild::Internal {
static QString normalizeWinVerArgument(QString winVer)
{
@@ -69,8 +46,6 @@ const QStringList &supportedWindowsVersions()
class BuildConsoleBuildStep : public AbstractProcessStep
{
Q_DECLARE_TR_FUNCTIONS(IncrediBuild::Internal::BuildConsoleBuildStep)
public:
BuildConsoleBuildStep(BuildStepList *buildStepList, Id id);
@@ -80,35 +55,35 @@ public:
BuildConsoleBuildStep::BuildConsoleBuildStep(BuildStepList *buildStepList, Id id)
: AbstractProcessStep(buildStepList, id)
{
setDisplayName(tr("IncrediBuild for Windows"));
setDisplayName(Tr::tr("IncrediBuild for Windows"));
addAspect<TextDisplay>("<b>" + tr("Target and Configuration"));
addAspect<TextDisplay>("<b>" + Tr::tr("Target and Configuration"));
auto commandBuilder = addAspect<CommandBuilderAspect>(this);
commandBuilder->setSettingsKey(Constants::BUILDCONSOLE_COMMANDBUILDER);
commandBuilder->setSettingsKey("IncrediBuild.BuildConsole.CommandBuilder");
addAspect<TextDisplay>("<i>" + tr("Enter the appropriate arguments to your build command."));
addAspect<TextDisplay>("<i>" + tr("Make sure the build command's multi-job "
addAspect<TextDisplay>("<i>" + Tr::tr("Enter the appropriate arguments to your build command."));
addAspect<TextDisplay>("<i>" + Tr::tr("Make sure the build command's multi-job "
"parameter value is large enough "
"(such as -j200 for the JOM or Make build tools)"));
auto keepJobNum = addAspect<BoolAspect>();
keepJobNum->setSettingsKey(Constants::BUILDCONSOLE_KEEPJOBNUM);
keepJobNum->setLabel(tr("Keep original jobs number:"));
keepJobNum->setToolTip(tr("Forces IncrediBuild to not override the -j command line switch, "
keepJobNum->setSettingsKey("IncrediBuild.BuildConsole.KeepJobNum");
keepJobNum->setLabel(Tr::tr("Keep original jobs number:"));
keepJobNum->setToolTip(Tr::tr("Forces IncrediBuild to not override the -j command line switch, "
"that controls the number of parallel spawned tasks. The default "
"IncrediBuild behavior is to set it to 200."));
addAspect<TextDisplay>("<b>" + tr("IncrediBuild Distribution Control"));
addAspect<TextDisplay>("<b>" + Tr::tr("IncrediBuild Distribution Control"));
auto profileXml = addAspect<StringAspect>();
profileXml->setSettingsKey(Constants::BUILDCONSOLE_PROFILEXML);
profileXml->setLabelText(tr("Profile.xml:"));
profileXml->setSettingsKey("IncrediBuild.BuildConsole.ProfileXml");
profileXml->setLabelText(Tr::tr("Profile.xml:"));
profileXml->setDisplayStyle(StringAspect::PathChooserDisplay);
profileXml->setExpectedKind(PathChooser::Kind::File);
profileXml->setBaseFileName(PathChooser::homePath());
profileXml->setHistoryCompleter("IncrediBuild.BuildConsole.ProfileXml.History");
profileXml->setToolTip(tr("Defines how Automatic "
profileXml->setToolTip(Tr::tr("Defines how Automatic "
"Interception Interface should handle the various processes "
"involved in a distributed job. It is not necessary for "
"\"Visual Studio\" or \"Make and Build tools\" builds, "
@@ -118,138 +93,138 @@ BuildConsoleBuildStep::BuildConsoleBuildStep(BuildStepList *buildStepList, Id id
"processes in \"Dev Tools\" builds."));
auto avoidLocal = addAspect<BoolAspect>();
avoidLocal->setSettingsKey(Constants::BUILDCONSOLE_AVOIDLOCAL);
avoidLocal->setLabel(tr("Avoid local task execution:"));
avoidLocal->setToolTip(tr("Overrides the Agent Settings dialog Avoid task execution on local "
avoidLocal->setSettingsKey("IncrediBuild.BuildConsole.AvoidLocal");
avoidLocal->setLabel(Tr::tr("Avoid local task execution:"));
avoidLocal->setToolTip(Tr::tr("Overrides the Agent Settings dialog Avoid task execution on local "
"machine when possible option. This allows to free more resources "
"on the initiator machine and could be beneficial to distribution "
"in scenarios where the initiating machine is bottlenecking the "
"build with High CPU usage."));
auto maxCpu = addAspect<IntegerAspect>();
maxCpu->setSettingsKey(Constants::BUILDCONSOLE_MAXCPU);
maxCpu->setToolTip(tr("Determines the maximum number of CPU cores that can be used in a "
maxCpu->setSettingsKey("IncrediBuild.BuildConsole.MaxCpu");
maxCpu->setToolTip(Tr::tr("Determines the maximum number of CPU cores that can be used in a "
"build, regardless of the number of available Agents. "
"It takes into account both local and remote cores, even if the "
"Avoid Task Execution on Local Machine option is selected."));
maxCpu->setLabel(tr("Maximum CPUs to utilize in the build:"));
maxCpu->setLabel(Tr::tr("Maximum CPUs to utilize in the build:"));
maxCpu->setRange(0, 65536);
auto maxWinVer = addAspect<SelectionAspect>();
maxWinVer->setSettingsKey(Constants::BUILDCONSOLE_MAXWINVER);
maxWinVer->setDisplayName(tr("Newest allowed helper machine OS:"));
maxWinVer->setSettingsKey("IncrediBuild.BuildConsole.MaxWinVer");
maxWinVer->setDisplayName(Tr::tr("Newest allowed helper machine OS:"));
maxWinVer->setDisplayStyle(SelectionAspect::DisplayStyle::ComboBox);
maxWinVer->setToolTip(tr("Specifies the newest operating system installed on a helper "
maxWinVer->setToolTip(Tr::tr("Specifies the newest operating system installed on a helper "
"machine to be allowed to participate as helper in the build."));
for (const QString &version : supportedWindowsVersions())
maxWinVer->addOption(version);
auto minWinVer = addAspect<SelectionAspect>();
minWinVer->setSettingsKey(Constants::BUILDCONSOLE_MINWINVER);
minWinVer->setDisplayName(tr("Oldest allowed helper machine OS:"));
minWinVer->setSettingsKey("IncrediBuild.BuildConsole.MinWinVer");
minWinVer->setDisplayName(Tr::tr("Oldest allowed helper machine OS:"));
minWinVer->setDisplayStyle(SelectionAspect::DisplayStyle::ComboBox);
minWinVer->setToolTip(tr("Specifies the oldest operating system installed on a helper "
minWinVer->setToolTip(Tr::tr("Specifies the oldest operating system installed on a helper "
"machine to be allowed to participate as helper in the build."));
for (const QString &version : supportedWindowsVersions())
minWinVer->addOption(version);
addAspect<TextDisplay>("<b>" + tr("Output and Logging"));
addAspect<TextDisplay>("<b>" + Tr::tr("Output and Logging"));
auto title = addAspect<StringAspect>();
title->setSettingsKey(Constants::BUILDCONSOLE_TITLE);
title->setLabelText(tr("Build title:"));
title->setSettingsKey("IncrediBuild.BuildConsole.Title");
title->setLabelText(Tr::tr("Build title:"));
title->setDisplayStyle(StringAspect::LineEditDisplay);
title->setToolTip(tr("Specifies a custom header line which will be displayed in the "
title->setToolTip(Tr::tr("Specifies a custom header line which will be displayed in the "
"beginning of the build output text. This title will also be used "
"for the Build History and Build Monitor displays."));
auto monFile = addAspect<StringAspect>();
monFile->setSettingsKey(Constants::BUILDCONSOLE_MONFILE);
monFile->setLabelText(tr("Save IncrediBuild monitor file:"));
monFile->setSettingsKey("IncrediBuild.BuildConsole.MonFile");
monFile->setLabelText(Tr::tr("Save IncrediBuild monitor file:"));
monFile->setDisplayStyle(StringAspect::PathChooserDisplay);
monFile->setExpectedKind(PathChooser::Kind::Any);
monFile->setBaseFileName(PathChooser::homePath());
monFile->setHistoryCompleter(QLatin1String("IncrediBuild.BuildConsole.MonFile.History"));
monFile->setToolTip(tr("Writes a copy of the build progress file (.ib_mon) to the specified "
monFile->setToolTip(Tr::tr("Writes a copy of the build progress file (.ib_mon) to the specified "
"location. If only a folder name is given, a generated GUID will serve "
"as the file name. The full path of the saved Build Monitor will be "
"written to the end of the build output."));
auto suppressStdOut = addAspect<BoolAspect>();
suppressStdOut->setSettingsKey(Constants::BUILDCONSOLE_SUPPRESSSTDOUT);
suppressStdOut->setLabel(tr("Suppress STDOUT:"));
suppressStdOut->setToolTip(tr("Does not write anything to the standard output."));
suppressStdOut->setSettingsKey("IncrediBuild.BuildConsole.SuppressStdOut");
suppressStdOut->setLabel(Tr::tr("Suppress STDOUT:"));
suppressStdOut->setToolTip(Tr::tr("Does not write anything to the standard output."));
auto logFile = addAspect<StringAspect>();
logFile->setSettingsKey(Constants::BUILDCONSOLE_LOGFILE);
logFile->setLabelText(tr("Output Log file:"));
logFile->setSettingsKey("IncrediBuild.BuildConsole.LogFile");
logFile->setLabelText(Tr::tr("Output Log file:"));
logFile->setDisplayStyle(StringAspect::PathChooserDisplay);
logFile->setExpectedKind(PathChooser::Kind::SaveFile);
logFile->setBaseFileName(PathChooser::homePath());
logFile->setHistoryCompleter(QLatin1String("IncrediBuild.BuildConsole.LogFile.History"));
logFile->setToolTip(tr("Writes build output to a file."));
logFile->setToolTip(Tr::tr("Writes build output to a file."));
auto showCmd = addAspect<BoolAspect>();
showCmd->setSettingsKey(Constants::BUILDCONSOLE_SHOWCMD);
showCmd->setLabel(tr("Show Commands in output:"));
showCmd->setToolTip(tr("Shows, for each file built, the command-line used by IncrediBuild "
showCmd->setSettingsKey("IncrediBuild.BuildConsole.ShowCmd");
showCmd->setLabel(Tr::tr("Show Commands in output:"));
showCmd->setToolTip(Tr::tr("Shows, for each file built, the command-line used by IncrediBuild "
"to build the file."));
auto showAgents = addAspect<BoolAspect>();
showAgents->setSettingsKey(Constants::BUILDCONSOLE_SHOWAGENTS);
showAgents->setLabel(tr("Show Agents in output:"));
showAgents->setToolTip(tr("Shows the Agent used to build each file."));
showAgents->setSettingsKey("IncrediBuild.BuildConsole.ShowAgents");
showAgents->setLabel(Tr::tr("Show Agents in output:"));
showAgents->setToolTip(Tr::tr("Shows the Agent used to build each file."));
auto showTime = addAspect<BoolAspect>();
showTime->setSettingsKey(Constants::BUILDCONSOLE_SHOWTIME);
showTime->setLabel(tr("Show Time in output:"));
showTime->setToolTip(tr("Shows the Start and Finish time for each file built."));
showTime->setSettingsKey("IncrediBuild.BuildConsole.ShowTime");
showTime->setLabel(Tr::tr("Show Time in output:"));
showTime->setToolTip(Tr::tr("Shows the Start and Finish time for each file built."));
auto hideHeader = addAspect<BoolAspect>();
hideHeader->setSettingsKey(Constants::BUILDCONSOLE_HIDEHEADER);
hideHeader->setLabel(tr("Hide IncrediBuild Header in output:"));
hideHeader->setToolTip(tr("Suppresses IncrediBuild's header in the build output"));
hideHeader->setSettingsKey("IncrediBuild.BuildConsole.HideHeader");
hideHeader->setLabel(Tr::tr("Hide IncrediBuild Header in output:"));
hideHeader->setToolTip(Tr::tr("Suppresses IncrediBuild's header in the build output"));
auto logLevel = addAspect<SelectionAspect>();
logLevel->setSettingsKey(Constants::BUILDCONSOLE_LOGLEVEL);
logLevel->setDisplayName(tr("Internal IncrediBuild logging level:"));
logLevel->setSettingsKey("IncrediBuild.BuildConsole.LogLevel");
logLevel->setDisplayName(Tr::tr("Internal IncrediBuild logging level:"));
logLevel->setDisplayStyle(SelectionAspect::DisplayStyle::ComboBox);
logLevel->addOption(QString());
logLevel->addOption("Minimal");
logLevel->addOption("Extended");
logLevel->addOption("Detailed");
logLevel->setToolTip(tr("Overrides the internal Incredibuild logging level for this build. "
logLevel->setToolTip(Tr::tr("Overrides the internal Incredibuild logging level for this build. "
"Does not affect output or any user accessible logging. Used mainly "
"to troubleshoot issues with the help of IncrediBuild support"));
addAspect<TextDisplay>("<b>" + tr("Miscellaneous"));
addAspect<TextDisplay>("<b>" + Tr::tr("Miscellaneous"));
auto setEnv = addAspect<StringAspect>();
setEnv->setSettingsKey(Constants::BUILDCONSOLE_SETENV);
setEnv->setLabelText(tr("Set an Environment Variable:"));
setEnv->setSettingsKey("IncrediBuild.BuildConsole.SetEnv");
setEnv->setLabelText(Tr::tr("Set an Environment Variable:"));
setEnv->setDisplayStyle(StringAspect::LineEditDisplay);
setEnv->setToolTip(tr("Sets or overrides environment variables for the context of the build."));
setEnv->setToolTip(Tr::tr("Sets or overrides environment variables for the context of the build."));
auto stopOnError = addAspect<BoolAspect>();
stopOnError->setSettingsKey(Constants::BUILDCONSOLE_STOPONERROR);
stopOnError->setLabel(tr("Stop on errors:"));
stopOnError->setToolTip(tr("When specified, the execution will stop as soon as an error "
stopOnError->setSettingsKey("IncrediBuild.BuildConsole.StopOnError");
stopOnError->setLabel(Tr::tr("Stop on errors:"));
stopOnError->setToolTip(Tr::tr("When specified, the execution will stop as soon as an error "
"is encountered. This is the default behavior in "
"\"Visual Studio\" builds, but not the default for "
"\"Make and Build tools\" or \"Dev Tools\" builds"));
auto additionalArguments = addAspect<StringAspect>();
additionalArguments->setSettingsKey(Constants::BUILDCONSOLE_ADDITIONALARGUMENTS);
additionalArguments->setLabelText(tr("Additional Arguments:"));
additionalArguments->setSettingsKey("IncrediBuild.BuildConsole.AdditionalArguments");
additionalArguments->setLabelText(Tr::tr("Additional Arguments:"));
additionalArguments->setDisplayStyle(StringAspect::LineEditDisplay);
additionalArguments->setToolTip(tr("Add additional buildconsole arguments manually. "
additionalArguments->setToolTip(Tr::tr("Add additional buildconsole arguments manually. "
"The value of this field will be concatenated to the "
"final buildconsole command line"));
auto openMonitor = addAspect<BoolAspect>();
openMonitor->setSettingsKey(Constants::BUILDCONSOLE_OPENMONITOR);
openMonitor->setLabel(tr("Open Build Monitor:"));
openMonitor->setToolTip(tr("Opens Build Monitor once the build starts."));
openMonitor->setSettingsKey("IncrediBuild.BuildConsole.OpenMonitor");
openMonitor->setLabel(Tr::tr("Open Build Monitor:"));
openMonitor->setToolTip(Tr::tr("Opens Build Monitor once the build starts."));
setCommandLineProvider([=] {
QStringList args;
@@ -328,10 +303,9 @@ void BuildConsoleBuildStep::setupOutputFormatter(OutputFormatter *formatter)
BuildConsoleStepFactory::BuildConsoleStepFactory()
{
registerStep<BuildConsoleBuildStep>(IncrediBuild::Constants::BUILDCONSOLE_BUILDSTEP_ID);
setDisplayName(BuildConsoleBuildStep::tr("IncrediBuild for Windows"));
setDisplayName(Tr::tr("IncrediBuild for Windows"));
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_BUILD,
ProjectExplorer::Constants::BUILDSTEPS_CLEAN});
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/buildstep.h>
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class BuildConsoleStepFactory final : public ProjectExplorer::BuildStepFactory
{
@@ -14,5 +13,4 @@ public:
BuildConsoleStepFactory();
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -3,6 +3,8 @@
#include "cmakecommandbuilder.h"
#include "incredibuildtr.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsteplist.h>
@@ -16,14 +18,18 @@
using namespace ProjectExplorer;
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
QList<Utils::Id> CMakeCommandBuilder::migratableSteps() const
QList<Id> CMakeCommandBuilder::migratableSteps() const
{
return {CMakeProjectManager::Constants::CMAKE_BUILD_STEP_ID};
}
QString CMakeCommandBuilder::displayName() const
{
return Tr::tr("CMake");
}
FilePath CMakeCommandBuilder::defaultCommand() const
{
const QString defaultCMake = "cmake";
@@ -42,7 +48,7 @@ QString CMakeCommandBuilder::defaultArguments() const
if (buildDir.isEmpty())
buildDir = ".";
return Utils::ProcessArgs::joinArgs({"--build", buildDir, "--target", "all"});
return ProcessArgs::joinArgs({"--build", buildDir, "--target", "all"});
}
QString CMakeCommandBuilder::setMultiProcessArg(QString args)
@@ -54,5 +60,4 @@ QString CMakeCommandBuilder::setMultiProcessArg(QString args)
return args;
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,25 +5,21 @@
#include "commandbuilder.h"
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class CMakeCommandBuilder : public CommandBuilder
{
Q_DECLARE_TR_FUNCTIONS(IncrediBuild::Internal::CMakeCommandBuilder)
public:
CMakeCommandBuilder(ProjectExplorer::BuildStep *buildStep) : CommandBuilder(buildStep) {}
private:
QList<Utils::Id> migratableSteps() const final;
QString id() const final { return "CMakeCommandBuilder"; }
QString displayName() const final { return tr("CMake"); }
QString displayName() const final;
Utils::FilePath defaultCommand() const final;
QString defaultArguments() const final;
QString setMultiProcessArg(QString args) final;
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -3,14 +3,20 @@
#include "commandbuilder.h"
#include "incredibuildtr.h"
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
const char CUSTOMCOMMANDBUILDER_COMMAND[] = "IncrediBuild.BuildConsole.%1.Command";
const char CUSTOMCOMMANDBUILDER_ARGS[] = "IncrediBuild.BuildConsole.%1.Arguments";
QString CommandBuilder::displayName() const
{
return Tr::tr("Custom Command");
}
void CommandBuilder::fromMap(const QVariantMap &map)
{
m_command = FilePath::fromSettings(map.value(QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())));
@@ -36,5 +42,4 @@ void CommandBuilder::setArguments(const QString &arguments)
m_args = arguments;
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,15 +5,10 @@
#include <projectexplorer/buildstep.h>
#include <QCoreApplication>
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class CommandBuilder
{
Q_DECLARE_TR_FUNCTIONS(IncrediBuild::Internal::CommandBuilder)
public:
CommandBuilder(ProjectExplorer::BuildStep *buildStep) : m_buildStep(buildStep) {}
virtual ~CommandBuilder() = default;
@@ -23,7 +18,7 @@ public:
ProjectExplorer::BuildStep *buildStep() const { return m_buildStep; }
virtual QString id() const { return "CustomCommandBuilder"; }
virtual QString displayName() const { return tr("Custom Command"); }
virtual QString displayName() const;
virtual void fromMap(const QVariantMap &map);
virtual void toMap(QVariantMap *map) const;
@@ -45,5 +40,4 @@ private:
QString m_args;
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,6 +5,7 @@
#include "cmakecommandbuilder.h"
#include "incredibuildconstants.h"
#include "incredibuildtr.h"
#include "makecommandbuilder.h"
#include <projectexplorer/abstractprocessstep.h>
@@ -22,8 +23,7 @@
using namespace ProjectExplorer;
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class CommandBuilderAspectPrivate
{
@@ -143,8 +143,8 @@ void CommandBuilderAspect::addToLayout(LayoutBuilder &builder)
}
if (!d->label) {
d->label = new QLabel(tr("Command Helper:"));
d->label->setToolTip(tr("Select a helper to establish the build command."));
d->label = new QLabel(Tr::tr("Command Helper:"));
d->label->setToolTip(Tr::tr("Select a helper to establish the build command."));
}
// On first creation of the step, attempt to detect and migrate from preceding steps
@@ -152,8 +152,8 @@ void CommandBuilderAspect::addToLayout(LayoutBuilder &builder)
d->tryToMigrate();
builder.addRow({d->label.data(), d->commandBuilder.data()});
builder.addRow({tr("Make command:"), d->makePathChooser.data()});
builder.addRow({tr("Make arguments:"), d->makeArgumentsLineEdit.data()});
builder.addRow({Tr::tr("Make command:"), d->makePathChooser.data()});
builder.addRow({Tr::tr("Make arguments:"), d->makeArgumentsLineEdit.data()});
updateGui();
}
@@ -197,5 +197,4 @@ void CommandBuilderAspect::updateGui()
d->makeArgumentsLineEdit->setText(d->m_activeCommandBuilder->arguments());
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -10,8 +10,7 @@
#include <QLabel>
#include <QPointer>
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class CommandBuilderAspect final : public Utils::BaseAspect
{
@@ -33,5 +32,4 @@ private:
class CommandBuilderAspectPrivate *d = nullptr;
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,6 +5,7 @@
#include "commandbuilderaspect.h"
#include "incredibuildconstants.h"
#include "incredibuildtr.h"
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildconfiguration.h>
@@ -19,21 +20,10 @@
using namespace ProjectExplorer;
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace Constants {
const QLatin1String IBCONSOLE_NICE("IncrediBuild.IBConsole.Nice");
const QLatin1String IBCONSOLE_COMMANDBUILDER("IncrediBuild.IBConsole.CommandBuilder");
const QLatin1String IBCONSOLE_KEEPJOBNUM("IncrediBuild.IBConsole.KeepJobNum");
const QLatin1String IBCONSOLE_FORCEREMOTE("IncrediBuild.IBConsole.ForceRemote");
const QLatin1String IBCONSOLE_ALTERNATE("IncrediBuild.IBConsole.Alternate");
}
namespace IncrediBuild::Internal {
class IBConsoleBuildStep final : public AbstractProcessStep
{
Q_DECLARE_TR_FUNCTIONS(IncrediBuild::Internal::IBConsoleBuildStep)
public:
IBConsoleBuildStep(BuildStepList *buildStepList, Id id);
@@ -43,40 +33,40 @@ public:
IBConsoleBuildStep::IBConsoleBuildStep(BuildStepList *buildStepList, Id id)
: AbstractProcessStep(buildStepList, id)
{
setDisplayName(tr("IncrediBuild for Linux"));
setDisplayName(Tr::tr("IncrediBuild for Linux"));
addAspect<TextDisplay>("<b>" + tr("Target and Configuration"));
addAspect<TextDisplay>("<b>" + Tr::tr("Target and Configuration"));
auto commandBuilder = addAspect<CommandBuilderAspect>(this);
commandBuilder->setSettingsKey(Constants::IBCONSOLE_COMMANDBUILDER);
commandBuilder->setSettingsKey("IncrediBuild.IBConsole.CommandBuilder");
addAspect<TextDisplay>("<i>" + tr("Enter the appropriate arguments to your build command."));
addAspect<TextDisplay>("<i>" + tr("Make sure the build command's "
addAspect<TextDisplay>("<i>" + Tr::tr("Enter the appropriate arguments to your build command."));
addAspect<TextDisplay>("<i>" + Tr::tr("Make sure the build command's "
"multi-job parameter value is large enough (such as "
"-j200 for the JOM or Make build tools)"));
auto keepJobNum = addAspect<BoolAspect>();
keepJobNum->setSettingsKey(Constants::IBCONSOLE_KEEPJOBNUM);
keepJobNum->setLabel(tr("Keep original jobs number:"));
keepJobNum->setToolTip(tr("Forces IncrediBuild to not override the -j command line switch, "
keepJobNum->setSettingsKey("IncrediBuild.IBConsole.KeepJobNum");
keepJobNum->setLabel(Tr::tr("Keep original jobs number:"));
keepJobNum->setToolTip(Tr::tr("Forces IncrediBuild to not override the -j command line switch, "
"that controls the number of parallel spawned tasks. The default "
"IncrediBuild behavior is to set it to 200."));
addAspect<TextDisplay>("<b>" + tr("IncrediBuild Distribution Control"));
addAspect<TextDisplay>("<b>" + Tr::tr("IncrediBuild Distribution Control"));
auto nice = addAspect<IntegerAspect>();
nice->setSettingsKey(Constants::IBCONSOLE_NICE);
nice->setToolTip(tr("Specify nice value. Nice Value should be numeric and between -20 and 19"));
nice->setLabel(tr("Nice value:"));
nice->setSettingsKey("IncrediBuild.IBConsole.Nice");
nice->setToolTip(Tr::tr("Specify nice value. Nice Value should be numeric and between -20 and 19"));
nice->setLabel(Tr::tr("Nice value:"));
nice->setRange(-20, 19);
auto forceRemote = addAspect<BoolAspect>();
forceRemote->setSettingsKey(Constants::IBCONSOLE_ALTERNATE);
forceRemote->setLabel(tr("Force remote:"));
forceRemote->setSettingsKey("IncrediBuild.IBConsole.Alternate");
forceRemote->setLabel(Tr::tr("Force remote:"));
auto alternate = addAspect<BoolAspect>();
alternate->setSettingsKey(Constants::IBCONSOLE_FORCEREMOTE);
alternate->setLabel(tr("Alternate tasks preference:"));
alternate->setSettingsKey("IncrediBuild.IBConsole.ForceRemote");
alternate->setLabel(Tr::tr("Alternate tasks preference:"));
setCommandLineProvider([=] {
QStringList args;
@@ -109,10 +99,9 @@ void IBConsoleBuildStep::setupOutputFormatter(OutputFormatter *formatter)
IBConsoleStepFactory::IBConsoleStepFactory()
{
registerStep<IBConsoleBuildStep>(IncrediBuild::Constants::IBCONSOLE_BUILDSTEP_ID);
setDisplayName(IBConsoleBuildStep::tr("IncrediBuild for Linux"));
setDisplayName(Tr::tr("IncrediBuild for Linux"));
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_BUILD,
ProjectExplorer::Constants::BUILDSTEPS_CLEAN});
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/buildstep.h>
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class IBConsoleStepFactory : public ProjectExplorer::BuildStepFactory
{
@@ -14,5 +13,4 @@ public:
IBConsoleStepFactory();
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -3,13 +3,11 @@
#pragma once
namespace IncrediBuild {
namespace Constants {
namespace IncrediBuild::Constants {
const char INCREDIBUILD_BUILDSTEP_TYPE[] = "IncrediBuild.BuildStep.Type";
const char BUILDCONSOLE_BUILDSTEP_ID[] = "IncrediBuild.BuildStep.BuildConsole";
const char IBCONSOLE_BUILDSTEP_ID[] = "IncrediBuild.BuildStep.IB_Console";
} // namespace Constants
} // namespace IncrediBuild
} // IncrediBuild::Constants

View File

@@ -6,8 +6,7 @@
#include "buildconsolebuildstep.h"
#include "ibconsolebuildstep.h"
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class IncrediBuildPluginPrivate
{
@@ -31,5 +30,4 @@ bool IncrediBuildPlugin::initialize(const QStringList &arguments, QString *error
return true;
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,8 +5,7 @@
#include <extensionsystem/iplugin.h>
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class IncrediBuildPlugin final : public ExtensionSystem::IPlugin
{
@@ -23,5 +22,4 @@ private:
class IncrediBuildPluginPrivate *d = nullptr;
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -12,4 +12,4 @@ struct Tr
Q_DECLARE_TR_FUNCTIONS(::IncrediBuild)
};
} // namespace IncrediBuild
} // IncrediBuild

View File

@@ -3,9 +3,10 @@
#include "makecommandbuilder.h"
#include "incredibuildtr.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
@@ -15,24 +16,26 @@
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> // Compile-time only
#include <QDebug>
#include <QFileInfo>
#include <QRegularExpression>
using namespace ProjectExplorer;
using namespace Utils;
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
QList<Utils::Id> MakeCommandBuilder::migratableSteps() const
QList<Id> MakeCommandBuilder::migratableSteps() const
{
return {QmakeProjectManager::Constants::MAKESTEP_BS_ID};
}
Utils::FilePath MakeCommandBuilder::defaultCommand() const
QString MakeCommandBuilder::displayName() const
{
BuildConfiguration *buildConfig = buildStep()->buildConfiguration();
if (buildConfig) {
return Tr::tr("Make");
}
FilePath MakeCommandBuilder::defaultCommand() const
{
if (BuildConfiguration *buildConfig = buildStep()->buildConfiguration()) {
if (Target *target = buildStep()->target()) {
if (ToolChain *toolChain = ToolChainKitAspect::cxxToolChain(target->kit()))
return toolChain->makeCommand(buildConfig->environment());
@@ -63,5 +66,4 @@ QString MakeCommandBuilder::setMultiProcessArg(QString args)
return args;
}
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal

View File

@@ -5,23 +5,19 @@
#include "commandbuilder.h"
namespace IncrediBuild {
namespace Internal {
namespace IncrediBuild::Internal {
class MakeCommandBuilder final : public CommandBuilder
{
Q_DECLARE_TR_FUNCTIONS(IncrediBuild::Internal::MakeCommandBuilder)
public:
MakeCommandBuilder(ProjectExplorer::BuildStep *buildStep) : CommandBuilder(buildStep) {}
private:
QList<Utils::Id> migratableSteps() const final;
QString id() const final { return "MakeCommandBuilder"; }
QString displayName() const final { return tr("Make"); }
QString displayName() const final;
Utils::FilePath defaultCommand() const final;
QString setMultiProcessArg(QString args) final;
};
} // namespace Internal
} // namespace IncrediBuild
} // IncrediBuild::Internal