Added check for yosys availability
This commit is contained in:
parent
6269d97474
commit
a5f93343b6
@ -195,7 +195,7 @@ void BaseMainWindow::yosys()
|
|||||||
yosysTab->setAttribute(Qt::WA_DeleteOnClose);
|
yosysTab->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
centralTabWidget->addTab(yosysTab, "Yosys");
|
centralTabWidget->addTab(yosysTab, "Yosys");
|
||||||
centralTabWidget->setCurrentWidget(yosysTab);
|
centralTabWidget->setCurrentWidget(yosysTab);
|
||||||
centralTabWidget->setTabToolTip(centralTabWidget->indexOf(yosysTab),folder);
|
centralTabWidget->setTabToolTip(centralTabWidget->indexOf(yosysTab), folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
@ -400,10 +400,7 @@ void FPGAViewWidget::paintGL()
|
|||||||
}
|
}
|
||||||
lineShader_.draw(grid, gridColor_, thick1Px, matrix);
|
lineShader_.draw(grid, gridColor_, thick1Px, matrix);
|
||||||
|
|
||||||
LineShaderData shaders[4] = {LineShaderData(),
|
LineShaderData shaders[4] = {LineShaderData(), LineShaderData(), LineShaderData(), LineShaderData()};
|
||||||
LineShaderData(),
|
|
||||||
LineShaderData(),
|
|
||||||
LineShaderData()};
|
|
||||||
|
|
||||||
if (ctx_) {
|
if (ctx_) {
|
||||||
// Draw Bels.
|
// Draw Bels.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "yosystab.h"
|
#include "yosystab.h"
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
|
|||||||
lineEdit->setMaximumHeight(30);
|
lineEdit->setMaximumHeight(30);
|
||||||
lineEdit->setFont(f);
|
lineEdit->setFont(f);
|
||||||
lineEdit->setFocus();
|
lineEdit->setFocus();
|
||||||
|
lineEdit->setEnabled(false);
|
||||||
lineEdit->setPlaceholderText("yosys>");
|
lineEdit->setPlaceholderText("yosys>");
|
||||||
connect(lineEdit, SIGNAL(textLineInserted(QString)), this, SLOT(editLineReturnPressed(QString)));
|
connect(lineEdit, SIGNAL(textLineInserted(QString)), this, SLOT(editLineReturnPressed(QString)));
|
||||||
|
|
||||||
@ -58,6 +60,15 @@ YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
|
|||||||
process = new QProcess();
|
process = new QProcess();
|
||||||
connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError()));
|
connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError()));
|
||||||
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
|
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
|
||||||
|
connect(process, &QProcess::started, this, [this] { lineEdit->setEnabled(true); });
|
||||||
|
connect(process, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
|
||||||
|
if (error == QProcess::FailedToStart) {
|
||||||
|
QMessageBox::critical(
|
||||||
|
this, QString::fromUtf8("Yosys cannot be started!"),
|
||||||
|
QString::fromUtf8("<p>Please make sure you have Yosys installed and available in path</p>"));
|
||||||
|
Q_EMIT deleteLater();
|
||||||
|
}
|
||||||
|
});
|
||||||
process->setWorkingDirectory(folder);
|
process->setWorkingDirectory(folder);
|
||||||
process->start("yosys");
|
process->start("yosys");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user