#!/bin/bash -x
-build_path=${SRCDIR}/build_result
+build_path=${SRCDIR}/org.tizen.dynamicanalyzer.workbench.product/target/products/org.tizen.dynamicanalyzer.workbench.product
build_time=`date +%Y%m%d-%H%M`
__set_parameter()
build_id=${package_name}
build_type=N
build_result_directory=${build_type}.${build_id}
- build_result_path="$build_path/$build_result_directory"
ide_root_path_name=tools/dynamic-analyzer
ide_lib_path_name=library/dynamic-analyzer
;;
esac
+ build_result_path="$build_path/$archive_platform_name/$windowing/$architecture/da"
result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip
}
{
manifest_version=`grep Version: ${SRCDIR}/package/pkginfo.manifest | cut -f2 -d":" | head -n 1`
product_version=${manifest_version}
- branding_path="org.tizen.dynamicanalyzer.workbench"
+ branding_path="org.tizen.dynamicanalyzer.workbench.product"
branding_file="dynamicanalyzer.product"
case ${platform} in
__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/da.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/da.XXXXX`"
- cp -r $SRCDIR/* $temp_dir
- cp -r $temp_dir/* $build_path/plugins
- rm -rf $temp_dir
-}
-
-__copy_dependency_plugins()
-{
- case ${platform} in
- ubuntu-32|ubuntu-64|windows-32|windows-64)
- dependency_plugin_path=${ROOTDIR}/ide
- ;;
- macos-64)
- dependency_plugin_path=${ROOTDIR}/IDE.app/Contents/Eclipse
- ;;
- *)
- echo "${platform} is not support yet."
- ;;
- esac
-
- if [ -d ${dependency_plugin_path} ]
+ if [ -d ${build_path} ]
then
- cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/
- cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/
+ rm -rf ${build_path}
fi
}
__set_product_version() {
echo "Set product's version (${product_version})"
- product_path="${build_path}/plugins/${branding_path}/${branding_file}"
+ product_path="${SRCDIR}/${branding_path}/${branding_file}"
+ cp ${product_path} ${product_path}.bkp
+
sed -e "s;\(<property name=\"eclipse.buildId\" value=\).*\( />\);\1\"${product_version}\"\2;g" \
< ${product_path} > ${product_path}.mod
mv ${product_path}.mod ${product_path}
- about_mapping_path="${build_path}/plugins/${branding_path}/about.mappings"
+ about_mapping_path="${SRCDIR}/${branding_path}/about.mappings"
+ cp ${about_mapping_path} ${about_mapping_path}.bkp
+
about_version_parameter="1"
about_build_time_parameter="2"
sed -e "s;\(^${about_version_parameter}=\).*;\1${product_version};g" \
}
__set_product_about_info() {
- about_mapping_path="${build_path}/plugins/${branding_path}/about.mappings"
- about_version_parameter="0"
- about_build_time_parameter="1"
- sed -e "s;\(^${about_version_parameter}=\).*;\1${product_version};g" \
- -e "s;\(^${about_build_time_parameter}=\).*;\1${build_time};g" \
- < ${about_mapping_path} > ${about_mapping_path}.mod
- mv ${about_mapping_path}.mod ${about_mapping_path}
+ about_mapping_path="${SRCDIR}/${branding_path}/about.mappings"
+ about_version_parameter="0"
+ about_build_time_parameter="1"
+ sed -e "s;\(^${about_version_parameter}=\).*;\1${product_version};g" \
+ -e "s;\(^${about_build_time_parameter}=\).*;\1${build_time};g" \
+ < ${about_mapping_path} > ${about_mapping_path}.mod
+ mv ${about_mapping_path}.mod ${about_mapping_path}
}
-__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;\(^product=\).*;\1/${branding_path}/${branding_file};g" \
- -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
+__restore_product_info() {
+ mv ${product_path}.bkp ${product_path}
+ mv ${about_mapping_path}.bkp ${about_mapping_path}
}
__execute_pde_build()
{
echo "Execute Product Ant Builder..."
- equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
- pde_build=`echo org.eclipse.pde.build_*`
-
- java -server -XX:+UseParNewGC -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
+ cd ${SRCDIR}
+ mvn -DenvOs=${archive_platform_name} -DenvWs=${windowing} -DenvArch=${architecture} clean package
if [ $? != 0 ];
then
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
__set_parameter
__set_build_parameter
__clean_build_environment
- __copy_build_sources
- __copy_dependency_plugins
__set_product_version
__set_product_about_info
- __make_ant_build_properties_file
__execute_pde_build
- __unzip_plugin_pack
+ __restore_product_info
echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"."
}
fi
}
-__copy_necessary_binaries()
-{
- echo "add necessary files."
-}
-
packaging_plugins() {
__set_parameter
__set_install_parameter
__clean_packaging_environment
- __copy_necessary_binaries
install_ide_path=${INSTALL_DIR}/${ide_root_path_name}
mkdir -p ${install_ide_path}
fi
- cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/
+ cp -rf ${build_result_path}/* ${install_ide_path}/
echo ${manifest_version} > ${install_ide_path}/version
}
##install_lib_path=${INSTALL_DIR}/${ide_lib_path_name} blib_dir=org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/library
tool_dir=tool
- cp -rf ${SRCDIR}/${bfile_dir}/config ${install_ide_path}/
mkdir -p ${install_ide_path}/${tool_dir}
case ${platform} in
ubuntu-32|ubuntu-64)