Running Addons on PC

framework

git clone https://git.digitalstrom.org/dss-add-ons/dss-addon-framework
cd /home/login/dSS/sysroot/share/dss-web/webroot
ln -s ~/dSS/dss-addon-framework framework

repositories

Clone the add-on repositories into folders according to the actual name used on the target. E.g.:

git clone https://git.digitalstrom.org/dss-add-ons/timed-events.git system-addon-timed-events
git clone https://git.digitalstrom.org/dss-add-ons/hle-edit.git system-addon-user-defined-actions

subscriptions

cd ~/dSS/sysroot/share/dss/data/subscriptions.d
ln -s ~/dSS/hle-edit/config/system-addon-user-defined-actions.xml
ln -s ~/dSS/timed-events/config/system-addon-timed-events.xml .

The subscription files contain absolute paths. In order to get the add-ons workin properly those path have to be changed. Use one for the following two options:

A. use git to fix paths:

This will automatically and transparently rewrite the subscription files to use the locally valid paths.

  1. (once) add the following to ~/.gitconfig and replace <PATH_TO_YOUR_DSS> with the real path:
    [filter "appxml"]
        smudge = perl -pe "s:/usr/share/dss/add-ons/system-addon-scene-responder/:$(pwd)/../system-addon-scene-responder/scripts/:" | perl -pe "s:/usr/share/dss/add-ons/.*?/:$(pwd)/scripts/:" | perl -pe "s:/usr/share/dss/data/scripts/:<PATH_TO_YOUR_DSS>/data/scripts/:" 
        clean = perl -pe "s:$(pwd)/../system-addon-scene-responder/scripts/:/usr/share/dss/add-ons/system-addon-scene-responder/:" | perl -pe "s:$(pwd)/scripts/:/usr/share/dss/add-ons/$(basename $(pwd))/:" | perl -pe "s:<PATH_TO_YOUR_DSS>/data/scripts/:/usr/share/dss/data/scripts/:" 
    
  2. in the root of each add-on git checkout create the file .gitattributes with the following content:
    *.xml filter=appxml
    

B. fix absolute paths:

sed -i s@/usr/share/dss/add-ons/system-addon-user-defined-actions@/home/login/dSS/hle-edit/scripts@ system-addon-user-defined-actions.xml
sed -i s@/usr/share/dss/add-ons/system-addon-timed-events@/home/login/dSS/timed-events/scripts@ system-addon-timed-events.xml
function convert
{
    sed -i s@/usr/share/dss/add-ons/$1@/home/login/dSS/addons/$1/scripts@ $2 
}

convert huecontrol huecontrol.xml
convert metering metering.xml
convert upnp-controller upnp-controller.xml 
convert system-addon-presence-simulator system-addon-presence-simulator.xml

install-ui

cd /home/login/dSS/sysroot/share/dss-web/webroot
mkdir addons
cd addons
ln -s ~/dSS/hle-edit/ui uda
ln -s ~/dSS/timed-events/ui te
ls ~/dSS/addons/ | while read a; do
    if [ ! -d ~/dSS/addons/$a ] ; then
        echo not dir $a
        continue
    fi
    echo ln -s ~/dSS/addons/$a/ui $a
done