CLI : Modify build script , build.xml 43/13043/2
authorhyeongseok.heo <hyeongseok.heo@samsung.com>
Wed, 27 Nov 2013 06:48:40 +0000 (15:48 +0900)
committerhyeongseok.heo <hyeongseok.heo@samsung.com>
Wed, 27 Nov 2013 08:57:45 +0000 (17:57 +0900)
Seperate lib folder between legacy cli and new cli for more clarifying
dependency.

Change-Id: I0b95d3fd4732eac8719aa3d51a5b291e119f0025
Signed-off-by: hyeongseok.heo <hyeongseok.heo@samsung.com>
build.xml
org.tizen.ncli.ide/tizen.sh
package/build.linux
package/new-cli.install.linux

index 93c19d5..44d591a 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -8,14 +8,24 @@
 
        <!--Start: new cli properties-->
        <property name="newcli-project" value="org.tizen.ncli.ide" />
-       <property name="newcli-lib" value="new-lib" />
+       <property name="newcli-lib" value="lib-ncli" />
        <property name="newcli-jar" value="tizen-new-cli.jar" />
        <property name="newcli-autocomplete" value="TizenAutoComplete" />
        <property name="newcli-autocomplete-path" value="org/tizen/ncli/ide/autocomplete" />
        <property name="newcli-autocomplete-jar" value="tizen-autocomplete.jar" />
        <!--End: new cli properties-->
-       
+
        <target name="dist">
+               <echo>============= Tizen CLI build Start ==================</echo>
+               <antcall target="legacy-cli"/>
+               <antcall target="new-cli"/>
+               <echo>============= Tizen CLI build End ==================</echo>
+       </target>
+
+       <!-- - - - - - - - - - - - - - - - - - 
+          target: legacy-cli   Build legacy CLI module                   
+         - - - - - - - - - - - - - - - - - -->
+       <target name="legacy-cli">
                <delete dir="${build}" quiet="true" />
                <mkdir dir="${build}" />
                <copy todir="${build}">
@@ -23,7 +33,7 @@
                </copy>
                <javac srcdir="${build}" encoding="utf-8" debug="true" verbose="false">
                        <classpath>
-                <dirset dir="${lib}" />
+                               <dirset dir="${lib}" />
                                <fileset dir="${lib}" />
                                <fileset dir="${nativelib}" />
                        </classpath>
                <jar basedir="${build}" destfile="${dist}/tizen-cli.jar">
                </jar>
                <delete dir="${build}" quiet="true" />
+       </target>
 
-               <!-- Start: new cli-->
+       <!-- - - - - - - - - - - - - - - - - - 
+          target: new-cli Build New CLI module                     
+         - - - - - - - - - - - - - - - - - -->
+       <target name="new-cli">
                <mkdir dir="${build}" />
                <copy todir="${build}" >
                        <fileset dir="${newcli-project}/src" />
                </copy>
                <javac srcdir="${build}" encoding="utf-8" debug="true" verbose="false">
                        <classpath>
-               <dirset dir="${lib}" />
+                               <dirset dir="${lib}" />
                                <fileset dir="${lib}" />
                                <fileset dir="${newcli-lib}"/>
                        </classpath>
@@ -56,4 +70,6 @@
                <delete dir="${build}" quiet="true"/>
                <!-- End: new cli-->
        </target>
+
+
 </project>
index d0a2be1..dad8570 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 CURRENT_WORKSPACE_PATH=`pwd`
 HOME_PATH=`test -h $0 && dirname $(readlink $0) || dirname $0`
-cd $HOME_PATH/../lib
+cd $HOME_PATH/../lib-ncli
 
 CONFIG_PATH=$HOME_PATH/../conf
 
index 6572399..75df558 100755 (executable)
@@ -11,7 +11,7 @@ NATIVE_LIB=${SRCDIR}/native-lib
 NCLI_PROJECT_HOME="org.tizen.ncli.ide"
 NCLI_PACKAGE_DIR=package/new-cli.package.$PLATFORM
 NCLI_TARGET=${NCLI_PACKAGE_DIR}/data/tools/ide
-NCLI_LIB=${SRCDIR}/new-lib
+NCLI_LIB=${SRCDIR}/lib-ncli
 # clean
 clean()
 {
@@ -76,6 +76,10 @@ newcli_build() {
     org.eclipse.core.resources_*
     org.eclipse.core.jobs_*
     org.eclipse.cdt.managedbuilder.core_*
+    org.tizen.common.sdblib_*
+    org.tizen.web.sign_*
+    org.tizen.nativecommon_*
+    org.tizen.nativecpp.misc_*    
     "
 
     for SRC in ${SRC_LIST}
@@ -86,11 +90,16 @@ newcli_build() {
 
     INCLUDING_LIB_SRC_LIST="
         org.tizen.common_*
-        org.tizen.common.sign_*
-        org.tizen.nativecommon_*
-        org.tizen.nativecpp.misc_*
-       org.tizen.common.sdblib_*
-       org.tizen.web.project_*
+    org.tizen.common.builder_*
+    org.tizen.common.sign_*
+    org.tizen.common.verrari_*
+    org.tizen.common.verrari.realm_*    
+    org.tizen.web.builder_*
+    org.tizen.web.common_*
+    org.tizen.web.compressor.minifier.core_*
+    org.tizen.web.zimlaunch_*
+    org.tizen.web.project.wizard_*
+    org.tizen.web.project_*
     "
     for SRC in ${INCLUDING_LIB_SRC_LIST}
     do
@@ -98,7 +107,10 @@ newcli_build() {
         case "${TARGET}" in
             *.jar)
                 cp ${TARGET} ${NCLI_LIB}
+                cd ${NCLI_LIB}
                 jar -xvf ${TARGET} lib
+                mv lib/* ./
+                cd -                
                 ;;
             *)
                 cp -rf ${TARGET} ${NCLI_LIB}
@@ -107,14 +119,14 @@ newcli_build() {
         esac
     done
        
-       cp $NCLI_PROJECT_HOME/lib/*.jar $LIB
+       cp $NCLI_PROJECT_HOME/lib/*.jar $NCLI_LIB
        mkdir -p $BUILD
        cp -r $NCLI_PROJECT_HOME/src/* $BUILD
 }
 build() 
 {
        echo $LIB
-       mkdir -p $LIB
+       mkdir -p $LIB   
 
     SRC_LIST="
     org.eclipse.osgi_*
@@ -208,9 +220,9 @@ slf4j-log4j*.jar
 
 #ncli install
 newcli_install() {
-    mkdir -p $NCLI_TARGET/lib
-    cp -r $NCLI_LIB/* $NCLI_TARGET/lib || true
-    cp ${SRCDIR}/dist/tizen-new-cli.jar $NCLI_TARGET/lib || true
+    mkdir -p $NCLI_TARGET/lib-ncli
+    cp -r $NCLI_LIB/* $NCLI_TARGET/lib-ncli || true
+    cp ${SRCDIR}/dist/tizen-new-cli.jar $NCLI_TARGET/lib-ncli || true
     
 
     case ${TARGET_OS} in
@@ -230,7 +242,6 @@ newcli_install() {
     esac
 
 dependency_jars="
-commons-cli-*.jar
 log4j-*.jar
 slf4j-api-*.jar
 slf4j-log4j*.jar
@@ -238,7 +249,7 @@ args4j-*.jar
 "
         for i in ${dependency_jars}
         do
-                cp -rf ${LIB}/${i} ${NCLI_TARGET}/lib
+                cp -rf ${NCLI_LIB}/${i} ${NCLI_TARGET}/lib-ncli
         done
 }
 
index b164569..a7be48c 100644 (file)
@@ -7,7 +7,7 @@ TIZEN_COMPLETION_SCRIPT=${CLI_PATH}/tizen-autocomplete
 TIZEN_COMPLETION_LINK_PATH=/usr/bin/tizen
 TIZEN_NEWCLI_SH=${CLI_PATH}/tizen.sh
 
-CLI_LIB_PATH=${TOOLS_PATH}/ide/lib
+CLI_LIB_PATH=${TOOLS_PATH}/ide/ncli-lib
 LOG_CONFIG_PATH=${TOOLS_PATH}/ide/conf
 SPAWN_LIB_PATH=${CLI_LIB_PATH}/os/linux/x86_64