fix for linux
This commit is contained in:
parent
bae58f8ddf
commit
7fedf86d4e
|
@ -1242,7 +1242,7 @@ void MainWindow::executeTool(PToolItem item)
|
|||
break;
|
||||
}
|
||||
QString command;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (!fileExists(program)) {
|
||||
QTemporaryFile file(QDir::tempPath()+QDir::separator()+"XXXXXX.bat");
|
||||
file.setAutoRemove(false);
|
||||
|
@ -1262,9 +1262,12 @@ void MainWindow::executeTool(PToolItem item)
|
|||
output = runAndGetOutput(cmd, workDir, args, inputContent);
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
command = escapeCommandForPlatformShell(program, params);
|
||||
output = runAndGetOutput(program, workDir, params, inputContent);
|
||||
#ifdef Q_OS_WIN
|
||||
}
|
||||
#endif
|
||||
switch(item->outputTarget) {
|
||||
case ToolItemOutputTarget::RedirectToToolsOutputPanel:
|
||||
logToolsOutput(tr(" - Command: %1").arg(command));
|
||||
|
|
|
@ -44,7 +44,11 @@ void ToolsManager::load()
|
|||
item->program = "rm";
|
||||
#endif
|
||||
item->workingDirectory = "<SOURCEPATH>";
|
||||
#ifdef Q_OS_WIN
|
||||
item->parameters = "/q /f <EXENAME>";
|
||||
#else
|
||||
item->parameters = "-f <EXENAME>";
|
||||
#endif
|
||||
item->inputOrigin = ToolItemInputOrigin::None;
|
||||
item->outputTarget = ToolItemOutputTarget::RedirectToToolsOutputPanel;
|
||||
item->isUTF8 = false;
|
||||
|
|
Loading…
Reference in New Issue