[Tizen] Add script to set environment variables 77/158777/3
authorYoungsoo Choi <kenshin.choi@samsung.com>
Fri, 3 Nov 2017 04:19:05 +0000 (13:19 +0900)
committerSungsik Han <ss440.han@samsung.com>
Mon, 6 Nov 2017 03:04:34 +0000 (03:04 +0000)
Change-Id: I03df4c02bd7c78d57f8a4915790e3d759c9ec71d
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
packaging/org.tizen.electron-efl.xml.in
wrt/build/script/run_was_tizen.sh [new file with mode: 0755]

index 39ac480..4758d2f 100644 (file)
@@ -4,7 +4,7 @@
   <icon>org.tizen.electron-efl.png</icon>
   <author href="www.samsung.com" email="kenshin.choi@samsung.com">SWC</author>
   <description>Web Runtime Engine based on electron-efl</description>
-  <ui-application appid="org.tizen.electron-efl" exec="@TZ_SYS_RO_APP@/org.tizen.electron-efl/bin/electron" nodisplay="false" multiple="false" type="capp" taskmanage="true">
+  <ui-application appid="org.tizen.electron-efl" exec="@TZ_SYS_RO_APP@/org.tizen.electron-efl/bin/run_was_tizen.sh" nodisplay="false" multiple="false" type="capp" taskmanage="true">
     <label>electron-efl</label>
     <icon>org.tizen.electron-efl.png</icon>
     <label xml:lang="en-us">electron-efl</label>
diff --git a/wrt/build/script/run_was_tizen.sh b/wrt/build/script/run_was_tizen.sh
new file mode 100755 (executable)
index 0000000..a4406c7
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+##value
+export SCRIPTDIR=$(readlink -e $(dirname $0))
+export WAS_HOME=$SCRIPTDIR/resources/wrt_support
+
+# we use this npm module for debugging
+# https://github.com/visionmedia/debug
+
+#MAIN,RUNTIME,WEBAPPLICATION,WEBVIEW
+export TARGET=TIZEN
+export DEBUG=*
+export WAS_EXTENSIONS_REPO=$WAS_HOME/extensions_repo
+export WAS_EXTENSIONS_PATH=$WAS_HOME/extensions
+export WAS_INSTALLER_PATH=$WAS_HOME/installer
+export WAS_INSTALLER_EXT_PATH=$WAS_HOME/installer/js/extension
+export WAS_APPS_REPO=$WAS_HOME/apps_repo
+export WAS_SAMPLE_PATH=$WAS_HOME/sample
+
+if [  -n "$1" ]
+then
+  echo "PACKAGE_NAME : " $1
+  $SCRIPTDIR/electron --harmony --use_strict -p $1
+else
+  echo "Start launcher"
+  $SCRIPTDIR/electron --harmony --use_strict
+fi