#!/bin/bash -e
cd "$(dirname "$0")/dist"
# set -m
# ulimit -Sv 4000000
export QT_DEBUG_PLUGINS=0
export QML_IMPORT_TRACE=0
export QT_MESSAGE_PATTERN="[%{type}] %{appname} %{pid}.%{threadid}.%{qthreadptr} (%{file}:%{line} in %{function}) - %{backtrace [depth=9999] [separator='|']} - %{message}"
export QMAKE_LFLAGS+=-rdynamic
export QT_FATAL_WARNINGS=0
export QT_NO_DEBUG_OUTPUT=1
export QT_NO_INFO_OUTPUT=1
export QT_NO_WARNING_OUTPUT=0
"./stb-gui" \
--sim-centralina \
--sim-checker \
--sim-ginkgo \
--sim-ginkgo-channel-0 \
--sim-ginkgo-channel-1 \
--sim-inverter \
--sim-pcan \
--sim-psu \
--sim-torsiometro \
--sim-uds \
--style windows \
$* 2> >(sed $'s/.*/\e[31m&\e[m/' >&2) # &
# sudo renice -n -10 $!
# fg
