From ee7476145f3a700e9330bebb07342429dd9e53ba Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 1 Mar 2016 14:50:47 +0000 Subject: [PATCH] Dali-demo install script and README for Emscripten examples Change-Id: I15c5a25925ed9c8fdd60f8b0fa322fbeaf02c94a --- README | 14 ++++++++++++++ build/tizen/CMakeLists.txt | 11 ----------- emscripten-examples/install.sh | 9 +++++++++ 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100755 emscripten-examples/install.sh diff --git a/README b/README index 77a178a..1103da8 100644 --- a/README +++ b/README @@ -8,6 +8,7 @@ T.O.C. 2.1. Minimum Requirements 2.2. Building the Repository 3. Creating an example + 4. Installing Emscripten examples 1. GBS Builds @@ -57,3 +58,16 @@ Then run the following commands: - Modify "com.samsung.dali-demo.xml" to include your example so that it can be launched on target. - No changes are required to the make system as long as the above is followed, your example will be automatically built & installed. + +4. Installing Emscripten Examples +================================= + +Some Emscripten Javascript examples are included in dali-demo. + +They do not require building, to install them run the provided install script. +Note: Your dali-env must be setup as it will install to your dali-env/opt/share/emscripten directory. + +# cd ./emscripten-examples +# ./install.sh + +Run the examples by either opening them in a browser, or, running the browser from the command line with an example as a parameter. diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index c21bf09..f9234d4 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -14,10 +14,6 @@ IF(DEFINED DALI_APP_DIR) ELSE() SET(APP_DATA_DIR ${PREFIX}/share/com.samsung.dali-demo) SET(BINDIR ${PREFIX}/bin) - - # Directory for compiled Emscripten artifacts along with Emscripten examples and demos. - SET(EMSCRIPTEN_ENV_DIR ${APP_DATA_DIR}/../emscripten/) - SET(EMSCRIPTEN_EXAMPLE_DIR ${ROOT_SRC_DIR}/emscripten-examples/) ENDIF() @@ -98,10 +94,3 @@ INCLUDE_DIRECTORIES(${DEMO_SRC_DIR}) ADD_SUBDIRECTORY(demo) ADD_SUBDIRECTORY(examples) ADD_SUBDIRECTORY(builder) - -IF(NOT DEFINED DALI_APP_DIR) - FILE( MAKE_DIRECTORY ${EMSCRIPTEN_ENV_DIR} ) - CONFIGURE_FILE( ${EMSCRIPTEN_EXAMPLE_DIR}/dali-toy.js ${EMSCRIPTEN_ENV_DIR}/ ) - CONFIGURE_FILE( ${EMSCRIPTEN_EXAMPLE_DIR}/dali-toy.html ${EMSCRIPTEN_ENV_DIR}/ ) - CONFIGURE_FILE( ${EMSCRIPTEN_EXAMPLE_DIR}/dali-doc-demo.html ${EMSCRIPTEN_ENV_DIR}/ ) -ENDIF() diff --git a/emscripten-examples/install.sh b/emscripten-examples/install.sh new file mode 100755 index 0000000..41d9ed1 --- /dev/null +++ b/emscripten-examples/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +INSTALL_PATH=$DESKTOP_PREFIX/share/emscripten/ + +echo "Installing Emscripten examples to: $INSTALL_PATH" + +mkdir -p $INSTALL_PATH +cp -v *.{js,html} $INSTALL_PATH/ + -- 2.7.4