beremiz

SVGHMI: add static file serving feature.

17 months ago, Edouard Tisserant
4ce63b8647d7
file isExecutable
SVGHMI: add static file serving feature.

Added two buttons to add and remove files.
Files are stored in project inside a directory named "static",
itself located in svghmi CTN instance files. Exemple :
exemples/svghmi_csv_json_img_table/svghmi_0@svghmi/static/
Files are transfered as "extra_files", but with a prefix
added to their name to avoid conflics.
#!/bin/bash
set -e
# source directory containing beremiz, matiec, etc..
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../../../.. && pwd )"
echo "SOURCE direcory : $SRCDIR"
# absolute path to test directory. ~/test if not given as only argument
TESTDIR=${1:-~/test}
mkdir -p $TESTDIR
echo "TEST direcory : $TESTDIR"
UNAME=testing
UHOME=/home/$UNAME
# define TESTDEBUG in env to enable dev-mode. This enables :
# - debug pasthrough for Xnest
# - VNC port passthrough
DEBUGARGS="-v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -e DISPLAY=$DISPLAY -p 5900:5900"
echo "Creating docker container"
docker create \
--name beremiz_sikuli_current \
-v $SRCDIR:$UHOME/src \
-v $TESTDIR:$UHOME/test \
`if [ "$TESTDEBUG" == "YES" ]; then echo $DEBUGARGS; fi` \
-w $UHOME/test \
-i -t beremiz_sikuli /bin/bash