build nui with scons (#19561)

* it builds

* cleanup

* remove that
old-commit-hash: 3c00e6792c905bffb5997970fea9b13f43ccf451
This commit is contained in:
Adeeb Shihadeh
2020-12-20 19:39:59 -08:00
committed by GitHub
parent 824106eab4
commit 5eecc6056f
8 changed files with 87 additions and 91 deletions
-2
View File
@@ -1,9 +1,7 @@
Makefile
.*.swp
*.o
_nui
moc_*
.qmake.stash
nui.app/*
routes.json
_nui.app
+11
View File
@@ -0,0 +1,11 @@
Import('qt_env', 'messaging')
qt_env['CPPPATH'] += ["#tools/clib"]
qt_env['CXXFLAGS'] += ["-Wno-deprecated-declarations"]
libs = [messaging, 'avutil', 'avcodec', 'avformat', 'bz2', 'capnp', 'kj',
'pthread', 'swscale', 'zmq']
qt_env.Program("_nui",
['main.cpp', 'Unlogger.cpp', 'FileReader.cpp', '../clib/FrameReader.cpp'],
LIBS=qt_env['LIBS'] + libs)
+3 -5
View File
@@ -1,12 +1,12 @@
#include <string>
#include <vector>
#include <yaml-cpp/yaml.h>
#include <capnp/dynamic.h>
#include <capnp/schema.h>
// include the dynamic struct
#include "cereal/gen/cpp/car.capnp.c++"
#include "cereal/gen/cpp/log.capnp.c++"
#include "cereal/services.h"
#include "Unlogger.hpp"
@@ -27,7 +27,6 @@ static inline uint64_t nanos_since_boot() {
Unlogger::Unlogger(Events *events_, QReadWriteLock* events_lock_, QMap<int, FrameReader*> *frs_, int seek)
: events(events_), events_lock(events_lock_), frs(frs_) {
ctx = Context::create();
YAML::Node service_list = YAML::LoadFile("../../cereal/service_list.yaml");
seek_request = seek*1e9;
@@ -37,9 +36,8 @@ Unlogger::Unlogger(Events *events_, QReadWriteLock* events_lock_, QMap<int, Fram
QStringList allow = QString(getenv("ALLOW")).split(",");
qDebug() << "allowlist" << allow;
for (const auto& it : service_list) {
auto name = it.first.as<std::string>();
for (const auto& it : services) {
std::string name = it.name;
if (allow[0].size() > 0 && !allow.contains(name.c_str())) {
qDebug() << "not allowing" << name.c_str();
continue;
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef UNLOGGER_HPP
#define UNLOGGER_HPP
#pragma once
#include <QThread>
#include <QReadWriteLock>
@@ -32,5 +31,3 @@ Q_OBJECT
bool paused = false;
};
#endif
-1
View File
@@ -161,7 +161,6 @@ void Window::paintEvent(QPaintEvent *event) {
timer.start();
uint64_t t0 = events.begin().key();
uint64_t t1 = (events.end()-1).key();
//p.drawRect(0, 0, 600, 100);
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6da22e2e4503c7db82c6632d552a5e3914e7b5fdefc50118683a1b2e816be317
size 1106