build: clean DIBS build scripts up
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 21 Oct 2015 07:49:22 +0000 (16:49 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 23 Oct 2015 07:21:07 +0000 (16:21 +0900)
Specific operations for MacOS move to macos-64 script.
Routines checking whether TARGET_OS is valid or not is added.

Change-Id: I7aadff447dcd7e7cbe6f55de9f4f6f319c21c2f3
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
package/build.common
package/build.linux
package/build.macos-64
package/build.windows [new file with mode: 0755]
package/build.windows-32 [deleted file]

index 6525b8ab4b58769a8243948bfb1c7dcf252bcc87..2b5100a5b5611424b382e764110f85fb87e1347c 100644 (file)
@@ -40,8 +40,6 @@ build_common()
 # install_common
 install_common()
 {
-       cd $SRCDIR/tizen
-
        # emulator
        EMULATOR_COMMON_DIR=$SRCDIR/package/3.0-emulator-qemu-common.package.${TARGET_OS}/data/platforms/tizen-3.0/common
        mkdir -p $EMULATOR_COMMON_DIR
@@ -52,36 +50,6 @@ install_common()
        mkdir -p $EMULATOR_X86_DIR
        cp -pPR $SRCDIR/tizen/emulator $EMULATOR_X86_DIR/emulator
 
-       EMULATOR_BIN_DIR=$EMULATOR_X86_DIR/emulator/bin
-
-       # change loading path of dynamic shared libraries on MAC OS X
-       if [ "${TARGET_OS}" = "macos-64" ]; then
-               LIB_LIST="libgthread-2.0.0.dylib libglib-2.0.0.dylib libintl.8.dylib libgcc_s.1.dylib libz.1.dylib libcurl.4.dylib libgcc_s.1.dylib libcurl.4.dylib libx264.142.dylib libncurses.5.dylib libpixman-1.0.dylib libpng16.16.dylib QtOpenGL QtWidgets QtGui QtCore"
-               BIN_ARR=( emulator-x86_64 qt5_msgbox )
-               for bin in ${BIN_ARR[@]}; do
-                       LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/lib/ { split($1, lib, "/"); print lib[5]}') )
-                       for lib in ${LIB_ARR[@]}; do
-                       [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
-                       if [ "$IS_LIB" == "true" ] ; then
-                               install_name_tool -change /opt/local/lib/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
-                               echo "$bin: the loading path of $lib is changed."
-                       else
-                               echo "$bin: $lib does not exist in the loading path."
-                       fi
-                       done
-                       LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/Library/ { split($1, lib, "/"); print lib[9]}') )
-                       for lib in ${LIB_ARR[@]}; do
-                               [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
-                               if [ "$IS_LIB" == "true" ] ; then
-                                       install_name_tool -change /opt/local/Library/Frameworks/$lib.framework/Versions/5/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
-                                       echo "$bin: the loading path of $lib is changed."
-                               else
-                                       echo "$bin: $lib does not exist in the loading path."
-                               fi
-                       done
-               done
-       fi
-
        # profile skins
        MOBILE_3_0_SKIN_RESOURCE_DIR=$SRCDIR/package/mobile-3.0-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-3.0/mobile/emulator-resources/skins
        WEARABLE_3_0_SKIN_RESOURCE_DIR=$SRCDIR/package/wearable-3.0-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-3.0/wearable/emulator-resources/skins
index d18eeebebe8e7fcc38e030841d31d204aa3e4b5e..6246c69926c5a8e43fbeaf21716ea1b2270ce745 100755 (executable)
@@ -2,6 +2,12 @@
 # check build environment
 prepare()
 {
+       if [ "${TARGET_OS}" != "windows-32" ] && [ "${TARGET_OS}" != "windows-64" ] \
+               && ["${TARGET_OS}" != "ubuntu-32" ] && ["${TARGET_OS}" != "ubuntu-64" ]
+       then
+               exit 1
+       fi
+
        if [ "${TARGET_OS}" = "windows-32" ] || [ "${TARGET_OS}" = "windows-64" ]
        then
                # for Windows target (cross compiling)
index 3d1f7c85da30a25333baac610e70947924e74e68..a3c38286a99e73a752894855c691d09d0bbc4c70 100755 (executable)
@@ -1,8 +1,11 @@
-#!/bin/bash -xe
+#!/bin/sh -xe
 # check build environment
 prepare()
 {
-       echo "nothing to do"
+       if [ "${TARGET_OS}" != "macos-64" ]
+       then
+               exit 1
+       fi
 }
 
 # clean
@@ -23,4 +26,34 @@ install()
 {
        . $SRCDIR/package/build.common
        install_common
+
+       EMULATOR_BIN_DIR=$EMULATOR_X86_DIR/emulator/bin
+
+       # change loading path of dynamic shared libraries on MAC OS X
+       if [ "${TARGET_OS}" = "macos-64" ]; then
+               LIB_LIST="libgthread-2.0.0.dylib libglib-2.0.0.dylib libintl.8.dylib libgcc_s.1.dylib libz.1.dylib libcurl.4.dylib libgcc_s.1.dylib libcurl.4.dylib libx264.142.dylib libncurses.5.dylib libpixman-1.0.dylib libpng16.16.dylib QtOpenGL QtWidgets QtGui QtCore"
+               BIN_ARR=( emulator-x86_64 qt5_msgbox )
+               for bin in ${BIN_ARR[@]}; do
+                       LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/lib/ { split($1, lib, "/"); print lib[5]}') )
+                       for lib in ${LIB_ARR[@]}; do
+                       [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
+                       if [ "$IS_LIB" == "true" ] ; then
+                               install_name_tool -change /opt/local/lib/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
+                               echo "$bin: the loading path of $lib is changed."
+                       else
+                               echo "$bin: $lib does not exist in the loading path."
+                       fi
+                       done
+                       LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/Library/ { split($1, lib, "/"); print lib[9]}') )
+                       for lib in ${LIB_ARR[@]}; do
+                               [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
+                               if [ "$IS_LIB" == "true" ] ; then
+                                       install_name_tool -change /opt/local/Library/Frameworks/$lib.framework/Versions/5/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
+                                       echo "$bin: the loading path of $lib is changed."
+                               else
+                                       echo "$bin: $lib does not exist in the loading path."
+                               fi
+                       done
+               done
+       fi
 }
diff --git a/package/build.windows b/package/build.windows
new file mode 100755 (executable)
index 0000000..ce258aa
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh -xe
+# check build environment
+prepare()
+{
+       if [ "${TARGET_OS}" != "windows-32" ] && [ "${TARGET_OS}" != "windows-64" ]
+       then
+               exit 1
+       fi
+
+       PYTHON_DIR=`env | grep PATH | grep Python`
+       if [ "$PYTHON_DIR" = "" ]
+       then
+               echo "Make sure that you have installed Python 2.x version"
+               echo "and then set installed Python/bin path into PATH system variable on your PC!"
+               exit 1
+       fi
+
+       ROOTDIR=$MSYS_ROOTDIR
+}
+
+# clean
+clean()
+{
+       echo "nothing to do"
+}
+
+
+# build
+build()
+{
+       . $SRCDIR/package/build.common
+       build_common
+}
+
+# install
+install()
+{
+       . $SRCDIR/package/build.common
+       install_common
+}
diff --git a/package/build.windows-32 b/package/build.windows-32
deleted file mode 100755 (executable)
index 010e5a9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh -xe
-# check build environment
-prepare()
-{
-       PYTHON_DIR=`env | grep PATH | grep Python`
-       if [ "$PYTHON_DIR" = "" ]
-       then
-               echo "Make sure that you have installed Python 2.x version"
-               echo "and then set installed Python/bin path into PATH system variable on your PC!"
-               exit 1
-       fi
-
-       ROOTDIR=$MSYS_ROOTDIR
-}
-
-# clean
-clean()
-{
-       echo "nothing to do"
-}
-
-
-# build
-build()
-{
-       . $SRCDIR/package/build.common
-       build_common
-}
-
-# install
-install()
-{
-       . $SRCDIR/package/build.common
-       install_common
-}