Commit 726247a7 authored by Alain Takoudjou's avatar Alain Takoudjou

beremiz: configure fluxbox

parent f0d760c6
......@@ -15,12 +15,16 @@
[instance]
filename = instance.cfg.in
md5sum = 07ac5fa089767ae400729ef874454e0c
md5sum = e19b88034ecdbbdef1c5fcfe2f050c0f
[template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in
md5sum = e7f03e0fc1ef57d87feff7d649f14be8
md5sum = 1cf22f28641ef8e7fb5b580a0c9f4b3e
[template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in
md5sum = 1613dade3a4e5210bb5cb557284c90db
md5sum = 31ef07a20686b03f0ed52f930379f67a
[template-fluxbox-menu.in]
filename = fluxbox-menu.in
md5sum = db041bc7e2b93d55f5b08c52f4771d64
[begin] (Fluxbox)
[encoding] {UTF-8}
[exec] (Beremiz IDE) { {{ beremiz_bin }} }
[submenu] (Fluxbox menu)
[config] (Configure)
[submenu] (System Styles) {Choose a style...}
[stylesdir] ({{ fluxbox_location }}/share/fluxbox/styles)
[end]
[submenu] (User Styles) {Choose a style...}
[stylesdir] (~/.fluxbox/styles)
[end]
[workspaces] (Workspace List)
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart)
[exec] (About) {(fluxbox -v; fluxbox -info | sed 1d) | xmessage -file - -center}
[separator]
[exit] (Exit)
[end]
[endencoding]
[end]
[directory]
tests = ${:srv}/tests
[beremiz-x11]
rendered = ${directory:bin}/beremiz-x11
[xserver]
display-num = 42
......
......@@ -18,6 +18,7 @@ ssl = ${:etc}/ssl
auth = ${:tmp}/auth
workdir = ${:srv}/workdir
framebuffer = ${:srv}/framebuffer
fluxbox = ${buildout:directory}/.fluxbox
[gen-certificate]
recipe = plone.recipe.command
......@@ -80,6 +81,7 @@ config-port = ${x11vnc:port}
[random-password]
recipe = slapos.cookbook:generate.password
storage-path = ${directory:etc}/.passwd
bytes = 8
[x11vnc-passwd]
recipe = slapos.recipe.template:jinja2
......@@ -136,11 +138,25 @@ recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:promise}/xserver-is-up
command-line = bash -c "[ -S ${xserver:lock-dir}/.X11-unix/X${xserver:display-num} ]"
[fluxbox]
[fluxbox-menu]
recipe = slapos.recipe.template:jinja2
template = {{ fluxbox_menu }}
rendered = ${directory:fluxbox}/menu
context =
key beremiz_bin beremiz-x11:rendered
raw fluxbox_location {{ fluxbox_location }}
[fluxbox-toolbar]
recipe = plone.recipe.command
command =
if [ ! -s "${directory:fluxbox}/init" ]; then
echo "session.screen0.toolbar.placement: TopCenter" > ${directory:fluxbox}/init;
fi
[fluxbox-bin]
recipe = slapos.cookbook:wrapper
command-line = {{ fluxbox_location }}/bin/fluxbox -display ${xserver:display}
-log ${directory:log}/fluxbox.log
wrapper-path = ${directory:services}/fluxbox
wrapper-path = ${directory:bin}/fluxbox
environment =
HOME=${buildout:directory}
XORG_LOCK_DIR=${xserver:lock-dir}
......@@ -148,6 +164,14 @@ environment =
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
depends =
${fluxbox-menu:recipe}
${fluxbox-toolbar:recipe}
[fluxbox]
recipe = slapos.cookbook:wrapper
command-line = ${fluxbox-bin:wrapper-path} -log ${directory:log}/fluxbox.log
wrapper-path = ${directory:services}/fluxbox
[beremiz-env.sh]
recipe = slapos.recipe.template:jinja2
......@@ -160,9 +184,6 @@ template =
export GSETTINGS_SCHEMA_DIR={{ gtk3_location }}/share/glib-2.0/schemas
export FONTCONFIG_FILE=${font-config:rendered}
export DISPLAY=${xserver:display}
# Export pythonpath here as beremiz will use sys.executable to start internal
# processes then they won't have eggs in sys.path.
export PYTHONPATH=$(python -c "import sys; print ':'.join(sys.path)")
export XORG_LOCK_DIR=${xserver:lock-dir}
export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
......@@ -186,7 +207,7 @@ template =
<= beremiz-wrapper-base
command-line =
{{ python_bin }} {{ beremiz_location }}/Beremiz.py
rendered = ${directory:scripts}/beremiz-x11
rendered = ${directory:bin}/beremiz-x11
[beremiz-runtime]
<= beremiz-wrapper-base
......@@ -198,7 +219,7 @@ twisted = 1
webservice-port = 8009
command-line =
{{ python_bin }} {{ beremiz_location }}/Beremiz_service.py
-p ${:port} -i ${:ip} -x ${:wx-taskbar} -a ${:auto-plc} ${directory:workdir}
-p ${:port} -i ${:ip} -x ${:wx-taskbar} -a ${:auto-plc} -w ${:webservice-port} ${directory:workdir}
rendered = ${directory:bin}/beremiz-runtime
[request-vnc-frontend]
......
......@@ -53,6 +53,7 @@ extra-context =
raw bison_location {{ bison_location }}
raw flex_location {{ flex_location }}
raw fluxbox_location {{ fluxbox_location }}
raw fluxbox_menu {{ template_fluxbox_menu }}
raw font_config_loc {{ fontconfig_location }}
raw font_config_tmplt {{ template_fonts_conf_target }}
raw font_dejavu {{ font_dejavu }}
......
......@@ -20,26 +20,24 @@ extends =
../../component/open62541/buildout.cfg
../../component/sikuli/buildout.cfg
../../component/fluxbox/buildout.cfg
../../component/pygolang/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/nxdtest.cfg
./buildout.hash.cfg
parts +=
slapos-cookbook
eggs
beremiz-eggs
open62541
Modbus
instance
allow-picked-versions = true
[gcc]
# Always build GCC for Fortran (see openblas).
max_version = 0
[python]
part = python2.7
shared = false
[open62541]
# Beremiz need it to be in folder parts/open62541
......@@ -48,9 +46,8 @@ post-install =
mkdir -p @@LOCATION@@/build/bin
ln -sf @@LOCATION@@/lib/libopen62541.a @@LOCATION@@/build/bin/libopen62541.a
[eggs]
[beremiz-eggs]
recipe = zc.recipe.egg
interpreter = python
eggs =
${wxPython:egg}
${python-cryptography:egg}
......@@ -70,6 +67,21 @@ eggs =
opcua
msgpack
[python-interpreter]
recipe = zc.recipe.egg:scripts
interpreter = python
eggs =
${beremiz-eggs:eggs}
${pygolang:egg}
# Beremiz will use sys.executable to start some internal processes
# then they won't have installed eggs in sys.path.
# -> use pymain from gpython to workaround that and generate
# python where sys.executable point to interpreter
initialization =
from gpython import pymain
pymain(sys.argv)
sys.exit(0)
[beremiz]
recipe = slapos.recipe.build:download-unpacked
# download beremiz at revision bc72db1aa49fb5deabc950ed587772d027733a26
......@@ -89,7 +101,7 @@ url = ${:_profile_base_location_}/${:filename}
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename}
python-bin = ${buildout:bin-directory}/${eggs:interpreter}
python-bin = ${buildout:bin-directory}/${python-interpreter:interpreter}
type = beremiz
context =
key autoconf_location autoconf:location
......@@ -100,6 +112,7 @@ context =
key buildout_egg_directory buildout:eggs-directory
key buildout_develop_directory buildout:develop-eggs-directory
key buildout_directory buildout:directory
key template_fluxbox_menu template-fluxbox-menu.in:target
key template_fonts_conf_target template-fonts-conf:output
key template_monitor_cfg monitor2-template:rendered
key template_instance_beremiz template-instance-beremiz:target
......@@ -134,6 +147,10 @@ output = ${buildout:directory}/instance-beremiz.cfg.jinja2
<= download-template
output = ${buildout:directory}/instance-beremiz-test.cfg.jinja2
[template-fluxbox-menu.in]
<= download-template
output = ${buildout:directory}/fluxbox-menu.in
[versions]
Pillow = 6.2.2
matplotlib = 2.2.5
......@@ -161,21 +178,9 @@ fonttools = 3.44.0
idna = 2.10
PyHamcrest = 2.0.2
txaio = 18.8.1
# Required by:
# Automat==0.3.0
characteristic = 14.3.0
# Required by:
# hyperlink==21.0.0
typing = 3.10.0.0
# Required by:
# zeroconf-py2compat==0.19.10
ifcfg = 0.22
opcua = 0.98.13
# Required by:
# opcua==0.98.13
# trollius==2.2.1
futures = 3.3.0
# Required by:
# opcua==0.98.13
trollius = 2.2.1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment