[Title] Add version update function in build script
authorTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 20 Feb 2012 06:00:24 +0000 (15:00 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 20 Feb 2012 06:00:24 +0000 (15:00 +0900)
Modify product, feature, plugin name
[Type] Feature
[Module] Sub
[Priority] Minor

.gitignore
org.tizen.base.feature/feature.xml
org.tizen.base.feature/rootfiles_for_linux/startup.sh
org.tizen.base.platform/TizenIDE_base_linux.product
org.tizen.base.platform/TizenIDE_base_windows.product
org.tizen.base.platform/plugin.xml
package/build.linux

index d68b5e4..3b911e9 100644 (file)
@@ -3,3 +3,5 @@ build_result
 bin
 base-ide-product.package.linux
 base-ide-product.package.windows
+product_*.tar.gz
+base-ide-product_*_*.zip
index 4d8e0b8..0452239 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.tizen.base.feature"
-      label="Tizen Base IDE"
+      label="Tizen Base Plugins"
       version="1.17.0.qualifier"
       provider-name="Samsung"
       plugin="org.tizen.base.platform">
index bbedfc1..0e1a9ea 100644 (file)
@@ -4,8 +4,11 @@ __cwd=`dirname $0`
 cd "$__cwd"
 __cwd=`pwd`
 
-slppath=`grep TIZEN_SDK_INSTALLED_PATH ${HOME}/.TizenSDK/tizensdkpath`
-TIZEN_SDK_INSTALL_PATH=`echo $slppath | cut -f2- -d"="`
+#slppath=`grep TIZEN_SDK_INSTALLED_PATH ${HOME}/.TizenSDK/tizensdkpath`
+#TIZEN_SDK_INSTALL_PATH=`echo $slppath | cut -f2- -d"="`
+
+TIZEN_SDK_INSTALL_PATH=$(dirname $(readlink -f $0))/../
+slppath=`echo "TIZEN_SDK_INSTALLED_PATH=${TIZEN_SDK_INSTALL_PATH}" > ${HOME}/.TizenSDK/tizensdkpath`
 
 export PATH=${PATH}:$TIZEN_SDK_INSTALL_PATH/SDK/build-system/bin
 export no_proxy=$no_proxy,"127.0.0.1"
index b2453cd..89d9fa0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Tizen IDE" uid="org.tizen.base.product" id="org.tizen.base.platform.product" application="org.eclipse.ui.ide.workbench" version="0.18" useFeatures="true" includeLaunchers="false">
+<product name="Tizen Base Plugins" uid="org.tizen.base.product" id="org.tizen.base.platform.product" application="org.eclipse.ui.ide.workbench" version="0.18" useFeatures="true" includeLaunchers="false">
 
    <aboutInfo>
       <image path="/org.tizen.base.platform/icons/branding/about_tizen_sdk.png"/>
index b2453cd..89d9fa0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Tizen IDE" uid="org.tizen.base.product" id="org.tizen.base.platform.product" application="org.eclipse.ui.ide.workbench" version="0.18" useFeatures="true" includeLaunchers="false">
+<product name="Tizen Base Plugins" uid="org.tizen.base.product" id="org.tizen.base.platform.product" application="org.eclipse.ui.ide.workbench" version="0.18" useFeatures="true" includeLaunchers="false">
 
    <aboutInfo>
       <image path="/org.tizen.base.platform/icons/branding/about_tizen_sdk.png"/>
index 0a8c149..b3d04b8 100644 (file)
@@ -34,7 +34,7 @@
       <product
             application="org.eclipse.ui.ide.workbench"
             description="%product.description"
-            name="Tizen IDE">
+            name="Tizen Base Plugins">
          <property
                name="windowImages"
                value="icons/branding/16_TIZEN_SDK_icon.png,icons/branding/32_TIZEN_SDK_icon.png,icons/branding/48_TIZEN_SDK_icon.png,icons/branding/64_TIZEN_SDK_icon.png,icons/branding/128_TIZEN_SDK_icon.png">
@@ -53,7 +53,7 @@
          </property>
          <property
                name="appName"
-               value="Tizen IDE">
+               value="Tizen Base Plugins">
          </property>
          <property
                name="introTitle"
index a7dcd51..68cdb99 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash -x
 
 build_path=${SRCDIR}/build_result
+build_time=`date +%Y%m%d-%H%M`
 
 __set_parameter()
 {
@@ -30,6 +31,14 @@ __set_parameter()
 
 __set_build_parameter()
 {
+       manifest_version=`grep Version: ${SRCDIR}/package/pkginfo.manifest | cut -f2 -d":" | head -n 1`
+       product_version=${manifest_version}
+       build_major_version=`echo ${manifest_version} | cut -f1 -d"."`
+       build_minor_version=`echo ${manifest_version} | cut -f2 -d"."`
+       build_bugfix_version=`echo ${manifest_version} | cut -f3 -d"."`
+       branding_path="org.tizen.base.platform"
+       branding_file="TizenIDE_base_${platform}.product"
+       
        case ${platform} in
                linux)
                        reference_ide_path=${ROOTDIR}/indigo-pde/eclipse
@@ -123,6 +132,27 @@ __copy_dependency_plugins()
        fi
 }
 
+__set_product_version() {
+       echo "Set product's version (${product_version})"
+       
+       product_path="${build_path}/plugins/${branding_path}/${branding_file}"
+       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_major_version_parameter="0"
+       about_ir_version_parameter="1"
+       about_build_version_parameter="2"
+       about_build_time_parameter="3"
+       sed -e "s;\(^${about_major_version_parameter}=\).*;\1${build_major_version};g" \
+               -e "s;\(^${about_ir_version_parameter}=\).*;\1${build_minor_version};g" \
+               -e "s;\(^${about_build_version_parameter}=\).*;\1${build_bugfix_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"
@@ -138,7 +168,7 @@ __make_ant_build_properties_file()
 
        if [ -d $reference_ide_path ] 
        then
-               sed -e "s;\(^product=\).*;\1/org.tizen.base.platform/TizenIDE_base_${platform}.product;g" \
+               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" \
@@ -195,6 +225,7 @@ build_plugins()
        __clean_build_environment
        __copy_build_sources
        __copy_dependency_plugins
+       __set_product_version
        __make_ant_build_properties_file
        __execute_pde_build
        __unzip_plugin_pack