From d1d355bceb74ee7e0aec4892bcdb6a589802b069 Mon Sep 17 00:00:00 2001 From: Bon-Yong Lee Date: Wed, 4 Jul 2012 16:39:12 +0900 Subject: [PATCH] [Title] Add bulid script [Type] Enhancement [Module] Sub [Priority] Major [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] #5279 --- build.xml | 24 ++++++++++++++++++ package/build.linux | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ package/build.windows | 51 +++++++++++++++++++++++++++++++++++++ package/pkginfo.manifest | 17 +++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 build.xml create mode 100755 package/build.linux create mode 100755 package/build.windows create mode 100644 package/pkginfo.manifest diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..57dabb7 --- /dev/null +++ b/build.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/package/build.linux b/package/build.linux new file mode 100755 index 0000000..20a79b4 --- /dev/null +++ b/package/build.linux @@ -0,0 +1,66 @@ +#!/bin/sh -xe + +PROJECT_HOME="org.tizen.cli" +BUILD=build +TARGET=data/SDK/dev_tools/lilac + +LIB=$SRCDIR/lib + +# clean +clean() +{ + echo "$SRCDIR" + #rm -rf $SRCDIR/*.jar + #rm -rf $SRCDIR/*.zip + #rm -rf $SRCDIR/*.tar.gz +} + +# build +build() +{ + mkdir -p $LIB + SRC=`find $ROOTDIR -name "org.eclipse.osgi_*"` + cp $SRC $LIB + + SRC=`find $ROOTDIR -name "org.tizen.common_*"` + cp $SRC $LIB + jar -xvf $SRC lib + + SRC=`find $ROOTDIR -name "org.tizen.web.common_*"` + cp $SRC $LIB + + SRC=`find $ROOTDIR -name "org.tizen.web.sign_*"` + cp $SRC $LIB + jar -xvf $SRC lib + + cp $PROJECT_HOME/lib/*.jar lib + + mkdir -p $BUILD + cp -r $PROJECT_HOME/src/* $BUILD + + JARS=`find $DIR_LIB -name "*.jar"` + + JAR="" + for JAR_FILE in $JARS; do + JAR=$JAR:$JAR_FILE + done + + ant + + mkdir -p $TARGET/lib + cp -r $PROJECT_HOME/doc/install/* $TARGET + cp -r $LIB/* $TARGET/lib +} + +# install +install() +{ + + echo "Hello2" +} + +[ "$1" = "clean" ] && clean +[ "$1" = "build" ] && build +[ "$1" = "install" ] && install + +echo "success" diff --git a/package/build.windows b/package/build.windows new file mode 100755 index 0000000..d34e7d9 --- /dev/null +++ b/package/build.windows @@ -0,0 +1,51 @@ +#!/bin/sh -xe +# clean +clean() +{ + echo "$SRCDIR" + rm -rf $SRCDIR/*.jar + rm -rf $SRCDIR/*.zip + rm -rf $SRCDIR/*.tar.gz +} + +prepare() +{ + if [ "$JAVA_HOME" = "" ] + then + echo "Make sure that you have installed JDK" + echo "and then set installed JDK/bin path into JAVA_HOME" + echo "as a system environment variable on your PC!!" + exit 1 + fi + + PATH=$PATH:$ROOTDIR/bin:$ROOTDIR/apache-ant-1.8.3/bin + export PATH +} + +# build +build() +{ + prepare + + cd $SRCDIR + ant -buildfile build.xml windows-jar + gcc $SRCDIR/dist/win32/emulator-manager.c -o $SRCDIR/dist/win32/emulator-manager.exe -mwindows +} + +# install +install() +{ + BIN_DIR=$SRCDIR/package/emulator-manager.package.windows/data/Emulator + mkdir -p $BIN_DIR/bin + mkdir -p $BIN_DIR/icons + + cp $SRCDIR/dist/win32/emulator-manager.jar $BIN_DIR/bin + cp $SRCDIR/dist/win32/emulator-manager.exe $BIN_DIR/bin + cp $SRCDIR/resource/res/em.ico $BIN_DIR/icons +} + +[ "$1" = "clean" ] && clean +[ "$1" = "build" ] && build +[ "$1" = "install" ] && install + +echo "success" diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest new file mode 100644 index 0000000..70b1b49 --- /dev/null +++ b/package/pkginfo.manifest @@ -0,0 +1,17 @@ +Package: web-cli +Version: 1.0.0 +OS: linux +Build-host-os: linux +Maintainer: Bon-Yong Lee +Build-dependency: webapp-eplugin [linux] +Source: emulator-manager +Description: Tizen IDE Command Line Interface + +Package: web-cli +Version: 1.0.0 +OS: windows +Build-host-os: windows +Maintainer: Bon-Yong Lee +Build-dependency: webapp-eplugin [windows] +Source: emulator-manager +Description: Tizen IDE Command Line Interface -- 2.7.4