Add icon and scripts for Tizen deployment. wip
authorSalvatore Iovene <salvatore@iovene.com>
Thu, 19 Sep 2013 07:19:49 +0000 (10:19 +0300)
committerSalvatore Iovene <salvatore@iovene.com>
Thu, 19 Sep 2013 07:19:49 +0000 (10:19 +0300)
docs/cowhide-icon.png [new file with mode: 0644]
docs/tizen/config.xml [new file with mode: 0644]
docs/tizen/deploy-emulator.sh [new file with mode: 0755]
docs/tizen/deploy-ssh.sh [new file with mode: 0755]
docs/tizen/make-widget.sh [new file with mode: 0755]

diff --git a/docs/cowhide-icon.png b/docs/cowhide-icon.png
new file mode 100644 (file)
index 0000000..d0ac229
Binary files /dev/null and b/docs/cowhide-icon.png differ
diff --git a/docs/tizen/config.xml b/docs/tizen/config.xml
new file mode 100644 (file)
index 0000000..9928806
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns       = "http://www.w3.org/ns/widgets"
+        xmlns:tizen = "http://tizen.org/ns/widgets"
+        id          = "http://otc.intel.com/cowhide-docs"
+        version     = "2.2"
+        viewmodes   = "fullscreen">
+
+    <name short="Cowhide docs">
+        Cowhide documentation
+    </name>
+
+    <description>
+        The documentation for the Cowhide UI framework.
+    </description>
+
+    <author email="salvatore.iovene@intel.com">
+        Salvatore Iovene
+    </author>
+
+    <icon src="cowhide-icon.png" />
+    <content src="index.html" />
+
+    <access origin="*" subdomains="true" />
+
+    <tizen:application id="1234567890.CowhideDocs" package="1234567890" required_version="2.1"/>
+    <tizen:privilege name="http://tizen.org/privilege/application" />
+    <tizen:privilege name="http://tizen.org/privilege/tizen" />
+</widget>
diff --git a/docs/tizen/deploy-emulator.sh b/docs/tizen/deploy-emulator.sh
new file mode 100755 (executable)
index 0000000..29f31a4
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+LOCAL_PORT=11224
+SOCKET='unix:/tmp/qemu.sock'
+SDB=~/tizen-sdk/tools/sdb
+
+echo "Deleting the old widget file..."
+$SDB shell 'rm /home/developer/cowhide-docs.wgt'
+
+echo "Building..."
+./make-widget.sh >/dev/null
+
+echo "Pushing the widget file..."
+$SDB push cowhide-docs.wgt /home/developer
+
+echo "Installing the widget file..."
+REMOTE_PORT=`$SDB shell 'wrt-launcher -k 1234567890; sleep 2; wrt-installer -un 1234567890; wrt-installer -i /home/developer/cowhide-docs.wgt; wrt-launcher -d -s 1234567890' | awk '/port:/ { print $2 }'`
+
+
+echo "Enabling forwarding to port $PORT..."
+echo "hostfwd_remove ::$LOCAL_PORT" | socat $SOCKET -
+echo "hostfwd_add ::$LOCAL_PORT-:$REMOTE_PORT" | socat $SOCKET -
+
+echo "Starting debugging..."
+google-chrome http://localhost:$LOCAL_PORT
+echo "Done."
diff --git a/docs/tizen/deploy-ssh.sh b/docs/tizen/deploy-ssh.sh
new file mode 100755 (executable)
index 0000000..0f2941b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+LOCAL_PORT=11224
+IP=$1
+
+echo "Deleting the old widget file..."
+ssh root@$IP -t 'rm /home/app/cowhide-docs.wgt'
+
+echo "Building..."
+./make-widget.sh >/dev/null
+
+echo "Pushing the widget file..."
+scp cowhide-docs.wgt root@$IP:/home/app
+
+echo "Installing the widget file..."
+REMOTE_PORT=`scp root@$IP -t 'wrt-launcher -k 1234567890; sleep 2; wrt-installer -un 1234567890; wrt-installer -i /home/app/cowhide-docs.wgt; wrt-launcher -d -s 1234567890' | awk '/port:/ { print $2 }'`
+
+echo "Starting debugging..."
+google-chrome http://$IP:$REMOTE_PORT
+echo "Done."
diff --git a/docs/tizen/make-widget.sh b/docs/tizen/make-widget.sh
new file mode 100755 (executable)
index 0000000..dbcc2be
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This script generates a widget package cowhide-docs.wgt inside
+# the root directory of this project.
+
+CONFIG_FILE=config.xml
+PROJECT_NAME=cowhide-docs
+
+if [[ -f $PROJECT_NAME.wgt ]] ; then
+  rm $PROJECT_NAME.wgt
+fi
+
+cd ../../dist/docs
+zip -r ../../docs/tizen/$PROJECT_NAME.wgt *
+
+cd ../../docs/tizen
+zip -j $PROJECT_NAME.wgt $CONFIG_FILE
+
+cd ..
+zip -j tizen/$PROJECT_NAME.wgt cowhide-icon.png