Modify dibs build script
authorharry.heo <harry.heo@samsung.com>
Sun, 1 May 2016 02:38:56 +0000 (11:38 +0900)
committerharry.heo <harry.heo@samsung.com>
Sun, 1 May 2016 02:38:56 +0000 (11:38 +0900)
- It was using bash shell script for building dibs package.
- Modified build.linux to use pde-build's ant script so that it will
follow Tizen IDE's standard build.
- Removed redundent bundles in MANIFEST.MF

Change-Id: I72124f7048e3048163dfe52b0614c84e12d35dae
Signed-off-by: harry.heo <harry.heo@samsung.com>
org.tizen.web.simulator/META-INF/MANIFEST.MF
package/build.linux

index ef18015..df37ef5 100644 (file)
@@ -9,7 +9,6 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.core.filesystem;bundle-version="1.3.100",
  org.eclipse.ui.ide;bundle-version="3.7.0",
  org.eclipse.core.resources;bundle-version="3.7.100",
- org.tizen.common,
  org.tizen.web.project,
  org.tizen.web.browser,
  org.tizen.web.common,
@@ -29,5 +28,4 @@ Import-Package: org.eclipse.core.expressions,
  org.eclipse.debug.core,
  org.eclipse.debug.core.model,
  org.eclipse.debug.ui,
- org.tizen.common.gom.launch,
- org.tizen.common.gom.smartlaunch
+ org.tizen.common.gom.launch
index add4f95..43b9d61 100755 (executable)
-#!/bin/bash -x
-
-build_path=${SRCDIR}/build_result
+#!/bin/bash -xe
 
 __set_parameter()
 {
-       build_id=${package_name}
-       build_type=N
-       build_result_directory=${build_type}.${build_id}
-       build_result_path="$build_path/$build_result_directory"
-       architecture=x86
-       ide_root_path_name=ide
-
-       case ${TARGET_OS} in
-               ubuntu-32|ubuntu-64)
-                       archive_platform_name=linux
-                       windowing=gtk
-                       ;;
-               windows-32|windows-64)
-                       archive_platform_name=win32
-                       windowing=win32
-                       ;;
-        macos-64)
-            archive_platform_name=macosx
-            windowing=cocoa
-            ;;
-               *)
-                       echo "${TARGET_OS} is not support yet."
-                       ;;
-       esac
-
-       result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip
-}
-
-__set_build_parameter()
-{
-       case ${TARGET_OS} in
-               ubuntu-32|ubuntu-64)
-                       reference_ide_path=${ROOTDIR}/eclipse-pde/eclipse
-                       ;;
-               windows-32|windows-64)
-                       reference_ide_path=${ROOTDIR}/eclipse-pde/eclipse
-                       ;;
-        macos-64)
-            reference_ide_path=${ROOTDIR}/eclipse-pde/eclipse
-            ;;
-               *)
-                       echo "${TARGET_OS} is not support yet."
-                       ;;
-       esac
-}
-
-__set_install_parameter()
-{
-       INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}/data
-}
-
-__clean_build_environment()
-{
-       if [ -d $build_path ]
-       then
-               echo "Build result directory : [$build_path]"
-       else
-               echo "Make build result directory [$build_path]"
-               mkdir -p $build_path
-       fi
-
-       echo "Remove legacy build files..."
-       if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ]
-       then
-               rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}
-       fi
-       if [ -e ${build_result_path}/${result_archive_file} ]
-       then
-               rm -rf ${build_result_path}/${result_archive_file}
-       fi
-       if [ -d ${build_path}/tmp ]
-       then
-               rm -rf ${build_path}/tmp
-       fi
-
-       if [ -d ${build_path}/buildRepo ]
-       then
-               rm -rf ${build_path}/buildRepo
-       fi
-
-       rm -rf ${build_path}/*.xml
-       rm -rf ${build_path}/*.properties
-       rm -rf ${build_path}/*.clean
-
-
-       if [ -d $build_path/plugins ]
-       then
-               echo "plugins directory recreate..."
-               rm -rf $build_path/plugins
-               mkdir $build_path/plugins
-       else
-               echo "Make plugins directory..."
-               mkdir $build_path/plugins
-       fi
-       if [ -d $build_path/features/ ]
-       then
-               echo "features directory recreate..."
-               rm -rf $build_path/features
-               mkdir $build_path/features
-       else
-               echo "Make features directory..."
-               mkdir $build_path/features
-       fi
-
-}
-
-__copy_build_sources()
-{
-       echo "Copy features from $SRCDIR to $build_path/features"
-       temp_dir="`mktemp -d /tmp/ide.XXXXX`"
-       cp -r $SRCDIR/* $temp_dir
-       cp -r $temp_dir/* $build_path/features
-       rm -rf $temp_dir
-
-       echo "Copy plugins from $SRCDIR to $build_path/plugins"
-       temp_dir="`mktemp -d /tmp/ide.XXXXX`"
-       cp -r $SRCDIR/* $temp_dir
-       cp -r $temp_dir/* $build_path/plugins
-       rm -rf $temp_dir
-}
-
-__copy_dependency_plugins()
-{
-       dependency_plugin_path=${ROOTDIR}/${ide_root_path_name}
-       if [ -d ${dependency_plugin_path} ]
-       then
-               cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/
-               cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/
-    else
-        echo "ERROR : ${dependency_plugin_path} is not exist."
-       fi
-}
-
-__make_ant_build_properties_file()
-{
-       builder_path="${SRCDIR}/builder"
-       parent_path_of_based_eclipse=${reference_ide_path}/..
-
-       echo "Make build.properties file..."
-       if [ ! -e $builder_path/build.properties.clean ] ; then
-               echo "ERROR : \"build.properties.clean\" file does not exist..."
-               exit 1
-       fi
-       cp $builder_path/build.properties.clean $build_path
-       cp $builder_path/customTargets.xml $build_path
-
-       if [ -d $reference_ide_path ] 
-       then
-               sed -e "s;\(^buildDirectory=\).*;\1${build_path};g" \
-               -e "s;\(^base=\).*;\1${parent_path_of_based_eclipse};g" \
-               -e "s;\(^baseLocation=\).*;\1${reference_ide_path};g" \
-               -e "s;\(^configs=\).*;\1${archive_platform_name},${windowing},${architecture};g" \
-               -e "s;\(^buildType=\).*;\1${build_type};g" \
-               -e "s;\(^buildId=\).*;\1${build_id};g" \
-               -e "s;\(^archivePrefix=\).*;\1${build_id};g" \
-               < $build_path/build.properties.clean > $build_path/build.properties
-
-       else
-               echo "ERROR : target eclipse is not exist."
-               exit 1
-       fi
-}
-
-__execute_pde_build()
-{
-       echo "Execute Product Ant Builder..."
-       equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
-       pde_build=`echo org.eclipse.pde.build_*`
-
-       java -Xmx256m -jar ${reference_ide_path}/plugins/$equinox_launcher -application org.eclipse.ant.core.antRunner -buildfile ${reference_ide_path}/plugins/$pde_build/scripts/productBuild/productBuild.xml -Dbuilder=$build_path -Dosgi.locking=none 2>&1
-
-       if [ $? != 0 ];
-       then
-               echo "Build failed..."
-               exit 1
-       fi
-}
-
-__unzip_plugin_pack()
-{
-       echo "unzip to $build_result_path"
-       unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture}
-}
-
-build_plugins()
-{
-       case ${platform} in
-               ubuntu-32|ubuntu-64)
-                       echo "build plugin for ${platform}"
-                       ;;
-               windows-32|windows-64)
-                       echo "build plugin for ${platform}"
-                       ;;
-        macos-64)
-            echo "build plugin for ${platform}"
-            ;;
-               *)
-                       echo "${platform} is not support yet."
-                       exit 1
-                       ;;
-       esac
-
-       __set_parameter
-       __set_build_parameter
-       __clean_build_environment
-       __copy_build_sources
-       __copy_dependency_plugins
-       __make_ant_build_properties_file
-       __execute_pde_build
-       __unzip_plugin_pack
-
-       echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"."
-}
-
-__clean_packaging_environment()
-{
-
-       if [ -d ${INSTALL_DIR} ]
-       then
-               rm -rf ${INSTALL_DIR}
-       else
-               mkdir -p ${INSTALL_DIR}
-       fi
-}
-
-__copy_necessary_binaries()
-{
-       echo "add necessary files."
-       ## ex) cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
-}
-
-packaging_plugins()
-{
-       __set_parameter
-       __set_install_parameter
-
-       __clean_packaging_environment
-       __copy_necessary_binaries
-
-       install_ide_path=${INSTALL_DIR}/${ide_root_path_name}
-       
-       if [ ! -d ${install_ide_path} ]
-       then
-               mkdir -p ${install_ide_path}
-       fi
-
-       cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/
+    echo "TARGET_OS : ${TARGET_OS}"
+    build_script_path=${ROOTDIR}/pde-build
 }
 
 # clean
 clean()
 {
-       echo "=========================================CLEAN============================================"
-       rm -rf ${SRCDIR}/*.zip
-       rm -rf ${SRCDIR}/*.tar.gz
-       rm -rf ${build_path}
+    echo "=========================================CLEAN============================================"
+    __set_parameter
+    ${build_script_path}/clean.sh ${package_name}
 }
 
 # build
 build() 
 {
-       echo "=========================================BUILD============================================"
-       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
-       for pkgname_and_platform in ${pkgname_and_platform_list}
-       do
-               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
-               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
-               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
-       
-               if [ "x${TARGET_OS}" = "x${platform}" ]
-               then
-                       build_plugins
-               else
-                       echo ""
-               fi
-       done
+    echo "=========================================BUILD============================================"
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+    
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+             __set_parameter
+            ${build_script_path}/build.sh ${package_name}
+        else
+            echo ""
+        fi
+    done
 }
 
 # install
 install() 
 {
-       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
-       for pkgname_and_platform in ${pkgname_and_platform_list}
-       do
-               echo "=========================================INSTALL============================================"
-               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
-               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
-               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        echo "=========================================INSTALL============================================"
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            __set_parameter
+            INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data
+            mkdir -p ${INSTALL_DIR} 
+            ${build_script_path}/install.sh ${package_name}
 
-               if [ "x${TARGET_OS}" = "x${platform}" ]
-               then
-                       packaging_plugins
-               else
-                       echo ""
-               fi
-       done    
+        else
+            echo ""
+        fi
+    done    
 }
 
 [ "$1" = "clean" ] && clean
 [ "$1" = "build" ] && build
 [ "$1" = "install" ] && install
-exit 0