[Title]
authorshihyun <shihyun@shihyun-Samsung-Desktop-System.(none)>
Wed, 5 Jun 2013 02:36:37 +0000 (11:36 +0900)
committershihyun <shihyun@shihyun-Samsung-Desktop-System.(none)>
Wed, 5 Jun 2013 02:36:37 +0000 (11:36 +0900)
* Add build script for ubuntu
* delete unnecessary file

16 files changed:
InstallManager_java/src/res/installmanager/buildversion
InstallerStub/linux/installmanager.conf.local [deleted file]
InstallerStub/linux/installmanager.conf.net [deleted file]
InstallerStub/linux/readme.txt [deleted file]
package/InstallManager [moved from InstallerStub/linux/InstallManager with 100% similarity]
package/InstallManagerP [moved from InstallerStub/linux/InstallManagerP with 100% similarity]
package/build.linux
package/installer_ori [moved from InstallerStub/linux/installer_ori with 100% similarity]
package/installer_stub [moved from InstallerStub/linux/installer_stub with 100% similarity]
package/installerstub_cp [new file with mode: 0755]
package/makeImageLinux [moved from InstallerStub/linux/makeImageLinux with 100% similarity]
package/makeImageWindows [moved from InstallerStub/linux/makeImageWindows with 100% similarity]
package/makeInstaller [moved from InstallerStub/linux/makeInstaller with 100% similarity]
package/makeLocal [moved from InstallerStub/linux/makeLocal with 100% similarity]
package/makeNetwork [moved from InstallerStub/linux/makeNetwork with 88% similarity]
package/pkginfo.manifest

index 426afb2..3989355 100644 (file)
@@ -1 +1 @@
-This file will be replaced with the build version when being built by ant
\ No newline at end of file
+1.20.0
diff --git a/InstallerStub/linux/installmanager.conf.local b/InstallerStub/linux/installmanager.conf.local
deleted file mode 100644 (file)
index f84caca..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-InstallManager-Version: 1.15.0
-
-
-
-
diff --git a/InstallerStub/linux/installmanager.conf.net b/InstallerStub/linux/installmanager.conf.net
deleted file mode 100644 (file)
index 86f25de..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Repository: http://172.21.17.55/dibs/unstable_release
-InstallManager-Repository: http://172.21.17.55/InstallManager/Linux
-InstallManager-Version: 1.20.0
-
-
-
-
diff --git a/InstallerStub/linux/readme.txt b/InstallerStub/linux/readme.txt
deleted file mode 100755 (executable)
index 47bdec9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-InstallerStub for linux.
-
-
-usage : 
-1. download "SDK-SLP.zip". 
-2. get md5sum value.
-   $md5sum SDK-SLP.zip
-   7915f9a276ec7a84e9cce66a36955380  SDK-SLP.zip
-3. vi installer_ori
-  ...
- ORI_FILE_md5sum="7915f9a276ec7a84e9cce66a36955380"
-  ...
-4. ./makeinstaller SDK-SLP sdk-slp-rc7.bin
index 3e04c7f..f199204 100755 (executable)
@@ -1,36 +1,78 @@
 #!/bin/bash -ex
+packageDirPath="${SRCDIR}/package"
+targetBinary="tizen-sdk-${TARGET_OS}"
+
+##make config file
+buildConfigFile() {
+       configFile="${packageDirPath}/installmanager.conf"
+       packageServer="http://download.tizen.org/sdk/packages/"
+       distribution="official"
+       releaseNoteUrl="https://developer.tizen.org/downloads/sdk/2.0-release-notes"
+
+       echo "Repository: "${packageServer} >> ${configFile}
+       echo "Version: "${version} >> ${configFile}
+       echo "Distribution: "${distribution} >> ${configFile}
+       echo "Release-Note: "${releaseNoteUrl} >> ${configFile}
+}
+
+##build installmanager.jar
+buildInstallManager() {
+       version="`cat $SRCDIR/package/pkginfo.manifest | grep "Version:" | head -n 1 | cut -d ':' -f2- | tr -d ' '`"    
+       $SRCDIR/build.sh $version
+}
+
+##build installmanager.bin
+buildBinary() {
+       cd ${packageDirPath}
+
+       case ${TARGET_OS} in
+        ubuntu-32)
+               cp -r $SRCDIR/InstallManager_java/dist/linux32/InstallManager.jar ${packageDirPath}
+               ;;
+        windows-32)
+               cp -r $SRCDIR/InstallManager_java/dist/windows32/InstallManager.jar ${packageDirPath}
+               ;;
+        ubuntu-64)
+               ;;
+        windows-64)
+               ;;
+        macos-64)
+               ;;
+        *)
+               echo "${platform} is not support yet."
+               ;;
+       esac
+
+       ./makeNetwork ${targetBinary}
+       
+}
 
 clean()
 {
        rm -rf $SRCDIR/*.zip
        rm -rf $SRCDIR/*.tar.gz
        rm -rf $SRCDIR/InstallManager_java/dist
+       rm -rf $packageDirPath/*.bin
+       rm -rf $packageDirPath/*.conf
+       rm -rf $packageDirPath/*.jar
 }
 
 build()
 {
-       version="`cat $SRCDIR/package/pkginfo.manifest | grep "Version:" | head -n 1 | cut -d ':' -f2- | tr -d ' '`"
-       $SRCDIR/build.sh $version
+       buildConfigFile
+       buildInstallManager
+       buildBinary
 }
 
 install()
 {
-       BINDIR=$SRCDIR/package/install-manager.package.$BUILD_TARGET_OS/data
+       BINDIR="$SRCDIR/package/install-manager.package.$BUILD_TARGET_OS/data/install-manager"
+
        mkdir -p $BINDIR 
-       if [ "$BUILD_TARGET_OS" = "linux" ]
-       then 
-               cp -r $SRCDIR/InstallManager_java/dist/linux/InstallManager.jar $BINDIR
-               cp -r $SRCDIR/InstallManager_java/src/res/desktop_directory/tizen-sdk-installmanager.png $BINDIR
-               cp -r $SRCDIR/InstallManager_java/src/res/desktop_directory/tizen-sdk-menu.png $BINDIR
-               cp -r $SRCDIR/InstallManager_java/InstallManager $BINDIR
-               cp -r $SRCDIR/InstallManager_java/installmanager.conf.net.linux $BINDIR/installmanager.conf
-       else
-               cp -r $SRCDIR/InstallManager_java/dist/windows/InstallManager.jar $BINDIR
-               cp -r $SRCDIR/InstallManager_java/src/res/desktop_directory/tizen-sdk-installmanager.ico $BINDIR
-               cp -r $SRCDIR/InstallManager_java/src/res/desktop_directory/tizen-sdk-menu.ico $BINDIR
-               cp -r $SRCDIR/InstallManager_java/installmanager.conf.net.win $BINDIR/installmanager.conf
-       fi
+
+       cp -r ${packageDirPath}/${targetBinary}.bin ${BINDIR}
 }
 
+
 $1
 echo "$1 success"
diff --git a/package/installerstub_cp b/package/installerstub_cp
new file mode 100755 (executable)
index 0000000..44657fa
--- /dev/null
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+ORI_FILE_md5sum=$$$$__CHKSUM_REPLACE__$$$$
+ORI_FILE_LEN=$$$$__FILE_LENGTH_REPLACE__$$$$
+
+TPUT="`which tput`"
+if test -t 0 -a -t 1 -a -n "$TPUT"; then
+        CI="`$TPUT setf 6 || true`"; CE="`$TPUT setf 4 || true`"
+        CX="`$TPUT setf 2 || true`"; CN="`$TPUT sgr0 || true`"
+else    CI=''; CE=''; CX=''; CN=''
+fi
+
+###### Get system information ######
+AVAIL_SPACE=`df -k . | tail -n -1 |  awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
+DISPLAY_MODE=$DISPLAY
+
+OS_BLOCKSIZE=`df -k . |head -n 1 | awk '{if ( $4 ~ /%/) { print $1 } else { print $2 } }'`
+OS_BIT=`getconf LONG_BIT`
+OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F= '{print $2}'`
+
+JAVA_VERSION=`java -version 2>&1 | sed -n "/^java version/p"`
+JAVA_BIT_FLAG=`java -version 2>&1 | egrep -e 64-Bit`
+if [ -z "${JAVA_BIT_FLAG}" ]; then
+       JAVA_BIT=32
+else
+       JAVA_BIT=64
+fi
+####################################
+
+#### Init Environment Variables ####
+CUR_DIR=`pwd`
+#OUT_PATH="/tmp/tizensdk"
+OUT_PATH="${HOME}/tizen-sdk-data/install-manager"
+
+# list for pre installation check. Write including 'space'
+INSTALLATION_CHECK="procps gettext libdbus-1-3 libcurl3 expect gtk2-engines-pixbuf grep zip make libgnome2-0"
+pkg_list=""
+
+# ubuntu version 10.x and 11.x and 12.x and 32bit
+if [ "10.04" = ${OS_VERSION} ] || [ "10.10" = ${OS_VERSION} ]; then
+       INSTALLATION_CHECK="$INSTALLATION_CHECK qemu-arm-static"
+elif [ "11.04" = ${OS_VERSION} ] || [ "11.10" = ${OS_VERSION} ]; then
+       INSTALLATION_CHECK="$INSTALLATION_CHECK qemu-user-static"
+elif [ "12.04" = ${OS_VERSION} ] || [ "12.10" = ${OS_VERSION} ]; then
+       INSTALLATION_CHECK="$INSTALLATION_CHECK qemu-user-static libwebkitgtk-1.0-0"
+fi
+
+NVIDIA_CHECK=`lspci | grep nVidia`
+MESA_CHECK=`dpkg -l | egrep -e libgl1-mesa-glx' '`
+####################################
+
+## check the available space ##
+if [ $AVAIL_SPACE -lt 5452596 ]; then
+       echo "${CE} Available blocks: $AVAIL_SPACE($OS_BLOCKSIZE)    Needed blocks: about 5.2GB "
+       echo " Please free up the required Disk Space and try again. $CN"
+       exit 1
+fi
+
+## check the root user ##
+if [ `whoami` = "root" ] ; then
+       echo "${CE} Do not install as 'root' user or 'su' commands. ${CN}"
+       exit 1
+fi
+
+## check the default java as OpenJDK ##
+CHECK_OPENJDK=`java -version 2>&1 | egrep -e OpenJDK`
+if [ -n "${CHECK_OPENJDK}" ] ; then
+       echo "${CE} OpenJDK is not supported. Try again with Oracle JDK. ${CN}"
+       exit 1
+fi
+
+## check the java installation ##
+if [ -z "${JAVA_VERSION}" ] ; then
+       echo "${CE} SDK runs on Eclipse, which requires JRE, JRE 6 or newer package is required. ${CN}"
+       exit 1
+fi
+
+## check the pre installation packages ##
+for INPUT_PKG_NAME in ${INSTALLATION_CHECK}
+do
+        CHECK_FLAG=`dpkg -l ${INPUT_PKG_NAME} 2>/dev/null | grep -e "^ii"`
+        if [ -z "${CHECK_FLAG}" ] ; then
+                pkg_list="${pkg_list}\"${INPUT_PKG_NAME}\" "
+        fi
+done
+if [ -n "$pkg_list" ] ; then
+       echo "${CN} If you want to install TIZEN-SDK, you must install${CE} ${pkg_list} ${CN}package(s)."
+       exit 1
+fi
+
+# platform bit and jdk bit equality is checked.
+if [ ${OS_BIT} != ${JAVA_BIT} ]; then
+       echo "The bit of java is different from the bit of your OS."
+       exit 1
+fi
+
+## check the mesa driver for emulator ##
+if [ "10.10" = ${OS_VERSION} ] && [ -n "${NVIDIA_CHECK}" ] && [ -z "${MESA_CHECK}" ] ; then
+       echo "We recommend that you use the Mesa OpenGL implementation in Ubuntu 10.10 and nVidia enviroment."
+       echo "Please install${CE} libgl1-mesa-glx ${CN}package."
+       exit 1
+fi
+
+## check the GUI Enviroment ##
+if [ -z "${DISPLAY_MODE}" ]; then
+        echo "$CE If you want to install TIZEN-SDK, you must execute installer in GUI Environment. $CN"
+        exit 1
+fi
+
+mkdir -p ${OUT_PATH}
+cd ${CUR_DIR}
+tail -n +"${ORI_FILE_LEN}" "$0" | tee >(md5sum>${OUT_PATH}/checksum) | tar xmz -C ${OUT_PATH}/
+
+OUT_FILE_md5sum=`cat "$OUT_PATH/checksum" | awk '{ print $1 }'`
+if [ "${OUT_FILE_md5sum}" != "${ORI_FILE_md5sum}" ]; then
+       echo "$CE The download file appears to be corrupted. "
+       echo " Please do not attempt to install this archive file. $CN"
+       rm -rf ${OUT_PATH}
+       exit 1
+fi
+
+##Excute InstallManager
+cd $OUT_PATH
+./InstallManager $*
+
+##source bashrc
+source ${HOME}/.bashrc
+
+exit 0
similarity index 88%
rename from InstallerStub/linux/makeNetwork
rename to package/makeNetwork
index 9b75f94..d964a9b 100755 (executable)
@@ -19,8 +19,8 @@ tarGzFile=InstallManager-Network.tar.gz
 tar cvfz ${tarGzFile} InstallManager InstallManagerP InstallManager.jar installmanager.conf
 
 ## make binary
-currentDate=`date '+%Y%m%d%H%M'`
-binFile=$1_${currentDate}.bin
+#currentDate=`date '+%Y%m%d%H%M'`
+binFile=$1.bin
 
 ./makeInstaller InstallManager-Network.tar.gz ${binFile}
 
index 20ebfaf..26aba24 100644 (file)
@@ -1,15 +1,15 @@
 Package: install-manager
 Version: 1.20.0
-OS: linux
-Build-host-os: linux
+OS: ubuntu-32
+Build-host-os: ubuntu-32
 Maintainer: Shihyun Kim<shihyun.kim@samsung.com>, Yongsung Kim<yongsung1.kim@samsung.com>
 Source: install-manager
 Description: InstallManager
 
 Package: install-manager
 Version: 1.20.0
-OS: windows
-Build-host-os: linux
+OS: windows-32
+Build-host-os: ubuntu-32
 Maintainer: Shihyun Kim<shihyun.kim@samsung.com>, Yongsung Kim<yongsung1.kim@samsung.com>
 Source: install-manager
 Description: InstallManager