diff --git a/files/run.sh b/files/run.sh new file mode 100755 index 0000000..f696225 --- /dev/null +++ b/files/run.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +BASE_DIR=/prime +FILES="superdaemon superdaemon.ini app-prime-modbus app-prime-gui" + +for FILE in ${FILES} +do + FILE_PATH="${BASE_DIR}/${FILE}" + HASH_PATH="${FILE_PATH}.md5" + if [ ! -f ${FILE_PATH} -o ! -f ${HASH_PATH} ] + then + rm -rf ${BASE_DIR}/* + cp -rf /falinux/* ${BASE_DIR} + break + fi + + FILE_HASH=`md5sum ${FILE_PATH} | awk '{print $1}'` + HASH=`cat ${HASH_PATH}` + + if [ "${FILE_HASH}" != "${HASH}" ] + then + rm -rf ${BASE_DIR}/* + cp -rf /falinux/* ${BASE_DIR} + break + fi +done + +export QT_QPA_FB_TSLIB=1 +export TSLIB_TSDEVICE=/dev/input/event0 +export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:rotation=270 +export QT_QPA_EVDEV_KEYBOARD_PARAMETERS=/dev/input/event1 + +cd ${BASE_DIR} +./superdaemon & diff --git a/scripts/mk-app.sh b/scripts/mk-app.sh new file mode 100755 index 0000000..9b9469d --- /dev/null +++ b/scripts/mk-app.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +FILES="superdaemon superdaemon.ini app-prime-modbus app-prime-gui" +for FILE IN ${FILES} +do + md5sum ${FILE} | awk '{print $1}' > ${FILE}.md5 +done