2023-08-29 22:33:32 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
2023-08-29 22:45:10 +03:00
|
|
|
STEPS=' 4'
|
|
|
|
|
|
|
|
echo "[ 1/$STEPS] Cleaning..."
|
2023-08-29 22:33:32 +03:00
|
|
|
rm dist/* &> /dev/null
|
|
|
|
rm brakeconf &> /dev/null
|
2023-08-29 22:45:10 +03:00
|
|
|
|
|
|
|
echo "[ 2/$STEPS] Build GUI..."
|
2023-08-29 22:33:32 +03:00
|
|
|
python3 ./build_gui.py gui/index.html dist/index.html &> /dev/null
|
2023-08-29 23:57:06 +03:00
|
|
|
xxd -i -n app_html dist/index.html > src/html.h
|
2023-08-29 22:33:32 +03:00
|
|
|
# sed -i 's/unsigned char/const unsigned char/g' src/html.h
|
2023-08-29 22:45:10 +03:00
|
|
|
|
|
|
|
echo "[ 3/$STEPS] Compile..."
|
2023-08-29 23:57:06 +03:00
|
|
|
gcc -I./webui -o brakeconf src/main.c webui/libwebui-2-static.a -lserialport -ljansson
|
2023-08-29 22:33:32 +03:00
|
|
|
|
2023-08-29 22:45:10 +03:00
|
|
|
echo "[ 4/$STEPS] Running..."
|
2023-08-29 22:33:32 +03:00
|
|
|
./brakeconf icanthink
|