diff options
author | David Shah <davey1576@gmail.com> | 2019-04-19 17:40:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-19 17:40:55 +0100 |
commit | 5344bc3b65f4e06f983db781e9a82d30b3f1512b (patch) | |
tree | 5f794074ccc963a9dbf756558e34a8eba0d5fa26 /gui | |
parent | 0be844e6a8d0a36a50815ec5331fd7480dd20db6 (diff) | |
parent | 87a24460813b9f52189323352554a1c352836ee2 (diff) | |
download | nextpnr-5344bc3b65f4e06f983db781e9a82d30b3f1512b.tar.gz nextpnr-5344bc3b65f4e06f983db781e9a82d30b3f1512b.tar.bz2 nextpnr-5344bc3b65f4e06f983db781e9a82d30b3f1512b.zip |
Merge pull request #261 from YosysHQ/pygeneric
Python API for generic architecture
Diffstat (limited to 'gui')
-rw-r--r-- | gui/generic/mainwindow.cc | 13 | ||||
-rw-r--r-- | gui/pythontab.cc | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/gui/generic/mainwindow.cc b/gui/generic/mainwindow.cc index 12912cc9..54d1f2c8 100644 --- a/gui/generic/mainwindow.cc +++ b/gui/generic/mainwindow.cc @@ -19,6 +19,9 @@ #include "mainwindow.h"
+#include <QMessageBox>
+#include <cstdlib>
+
static void initMainResource() { Q_INIT_RESOURCE(nextpnr); }
NEXTPNR_NAMESPACE_BEGIN
@@ -26,14 +29,8 @@ NEXTPNR_NAMESPACE_BEGIN MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
: BaseMainWindow(std::move(context), args, parent)
{
- initMainResource();
-
- std::string title = "nextpnr-generic - [EMPTY]";
- setWindowTitle(title.c_str());
-
- connect(this, &BaseMainWindow::contextChanged, this, &MainWindow::newContext);
-
- createMenu();
+ QMessageBox::critical(0, "Error - FIXME", "No GUI support for nextpnr-generic");
+ std::exit(1);
}
MainWindow::~MainWindow() {}
diff --git a/gui/pythontab.cc b/gui/pythontab.cc index 827f1907..c83f1ece 100644 --- a/gui/pythontab.cc +++ b/gui/pythontab.cc @@ -96,9 +96,10 @@ void PythonTab::newContext(Context *ctx) console->clear();
pyinterpreter_preinit();
- init_python("nextpnr", !initialized);
+ init_python("nextpnr", true);
pyinterpreter_initialize();
pyinterpreter_aquire();
+ init_python("nextpnr", false);
python_export_global("ctx", ctx);
pyinterpreter_release();
|