Skip to content

Commit

Permalink
fix: Fixed an issue where cmake could not be found when the project w…
Browse files Browse the repository at this point in the history
…as opened

Modify prompt information

Log: fix issue
  • Loading branch information
Kakueeen authored and deepin-mozart committed Aug 20, 2024
1 parent 0abe7a9 commit d52cd0a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class CMakeBuilderGeneratorPrivate
CMakeBuilderGenerator::CMakeBuilderGenerator()
: d(new CMakeBuilderGeneratorPrivate())
{

}

CMakeBuilderGenerator::~CMakeBuilderGenerator()
Expand Down Expand Up @@ -67,19 +66,20 @@ void CMakeBuilderGenerator::appendOutputParser(std::unique_ptr<AbstractOutputPar
bool CMakeBuilderGenerator::checkCommandValidity(const BuildCommandInfo &info, QString &retMsg)
{
if (info.program.trimmed().isEmpty()) {
retMsg = tr("The build command of %1 project is null! "\
"please install it in console with \"sudo apt install cmake\", and then restart the tool.")
.arg(info.kitName.toUpper());
retMsg = tr("The build command %1 project is null! You can solve this problem in the following ways:\n"
"1.Check whether cmake is installed;\n"
"2.Global Options > CMake > Select the CMake tool installed locally;\n"
"3.If none of the above methods work, delete the \".unioncode\" folder in the current project directory and open the project again.")
.arg(info.kitName.toUpper());
return false;
}

if (!QFileInfo(info.workingDir.trimmed()).exists()) {
retMsg = tr("The path of \"%1\" is not exist! "\
retMsg = tr("The path of \"%1\" is not exist! "
"please check and reopen the project.")
.arg(info.workingDir);
.arg(info.workingDir);
return false;
}

return true;
}

0 comments on commit d52cd0a

Please sign in to comment.