Skip to content

Commit

Permalink
fix: prevent DisplayPrint from crashing hobbits-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-adam committed Dec 18, 2020
1 parent 6187e66 commit bd93eee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions src/hobbits-runner/hobbits-runner.pro
Expand Up @@ -45,6 +45,14 @@ defined(HOBBITS_PYPATH, var) {
unix:!mac {
QMAKE_LFLAGS_RPATH=
QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/../lib:\$$ORIGIN/../python/lib:\$$ORIGIN\'"

# this is for situations when LD_LIBRARY_PATH won't work for launching hobbits in Qt Creator due to something like setcap
defined(DEVELOPER_RPATH, var) {
QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUT_PWD/../hobbits-core:$$OUT_PWD/../hobbits-python:$$OUT_PWD/../hobbits-widgets:$$HOBBITS_PYPATH/lib\'"
}
else {
QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/../lib:\$$ORIGIN/../python/lib:\$$ORIGIN\'"
}
}

mac {
Expand Down
8 changes: 4 additions & 4 deletions src/hobbits-runner/main.cpp
@@ -1,5 +1,5 @@
#include <QCommandLineParser>
#include <QCoreApplication>
#include <QGuiApplication>
#include <QTextStream>
#ifdef Q_OS_UNIX
#include <iostream>
Expand All @@ -21,10 +21,10 @@

int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QGuiApplication a(argc, argv);

QCoreApplication::setApplicationName("Hobbits Runner");
QCoreApplication::setApplicationVersion(HobbitsRunnerInfo::getRunnerVersion());
QGuiApplication::setApplicationName("Hobbits Runner");
QGuiApplication::setApplicationVersion(HobbitsRunnerInfo::getRunnerVersion());

QString description = "Command-line interface for bitstream analysis and processing";
#ifdef HAS_EMBEDDED_PYTHON
Expand Down
3 changes: 2 additions & 1 deletion tests/test_hobbits.js
Expand Up @@ -60,7 +60,8 @@ async function runTests() {
let args = [
'run',
'-b', batch,
'-o', testOutputPrefix
'-o', testOutputPrefix,
'-platform', 'offscreen'
]

if (argv.python_home) {
Expand Down

0 comments on commit bd93eee

Please sign in to comment.