--- /dev/null
+= HOW TO CREATE EMULATOR-IMAGE PACKAGE =
+
+1. To create Tizen SDK package, you need to have DIBS system.
+ You can get it by installing Tizen SDK: "#{TizenSDK Installation Path}/dev_tools/dibs/"
+ Or by accessing GIT repository: #{Tizen SDK Repository server}:sdk/tools/sdk-build
+
+2. Before generating the sdk package, you have to check the package version in "package/pkginfo.manifest".
+ You have to increase and changes all version fields with same value.
+
+3. Also you have to check the packaging script of "package/build.linux"
+ You can change the packaging structure by modifying this files
+
+4. Copy the image file to this directory.
+ The image file name should be 'emulimg.x86'.
+
+5. Generate the Tizen SDK package from raw image by executing "pkg-build" command of DIBS
+ To use "pkg-build" command, you have to know the repository of tizen SDK packages.
+ ex) pkg-build -u http://172.21.17.55/private/internal -c -o linux
+ ex) pkg-build -u http://172.21.17.55/private/internal -c -o windows
+
+6. After step 4 success, you can see "zip" package file.
+
+
+= HOW TO UPLOAD EMULATOR-IMAGE PACKAGE =
+
+1. You can upload package files using "build-cli" command of DIBS
+ Before use of this command, you have to know this
+ * build server address => -d option
+ * the password for uploading => -w option
+ * ftp url for uploading => -t option
+ ex) build-cli -P emulator-image_1.2.42_linux.zip -d 172.21.17.55:3335 -w <REPO_PASSWD> -t ftp://ID:PASSWD@172.21.17.55
+
+
+= ETC =
+For more guide for DIBS command, plz refer to the document of DIBS
+ * "#{TizenSDK Installation Path}/dev_tools/dibs/doc/TizenSDK_Development_Guide.html"
+ * "#{TizenSDK Installation Path}/dev_tools/dibs/doc/DIBS_Advanced_Guide.html"
--- /dev/null
+[Meta]
+platform=tizen2.0
+;default, add-ons
+type=default
+name=x86-standard
+
+[Version]
+image=tizen2.0
+release=Tizen 2.0b1
+
+[Product]
+;Phone
+domain=Phone
+
+[Target]
+;ARM, X86
+cpu=X86
--- /dev/null
+#!/bin/sh -ex
+# Emulator Release Package
+
+set_emulator_image_var () {
+ echo ==== Init ====
+ BASE_DIR=`pwd`
+ echo $BASE_DIR
+ SRC_IMG_NAME="emulimg.x86"
+ DES_IMG_NAME="emulimg-2.0.x86"
+ PKG_DIR=$BASE_DIR/EMUL_PKG
+
+# parse meta file
+ META_FILE=$BASE_DIR/info.ini
+ PLATFORM=`awk -F= '$1 == "platform" {name=$2; print name}' $META_FILE`
+ TYPE=`awk -F= '$1 == "type" {name=$2; print name}' $META_FILE`
+ NAME=`awk -F= '$1 == "name" {name=$2; print name}' $META_FILE`
+# end parse
+
+# new var
+ IMAGE_DIR=$PKG_DIR/data/platforms/$PLATFORM/emulator-images/$TYPE/$NAME
+ RESOURCE_DIR=$PKG_DIR/data/platforms/$PLATFORM/emulator-resources
+ SKINS_DIR=$RESOURCE_DIR/skins
+ TEMPLATE_DIR=$RESOURCE_DIR/model-templates
+
+ mkdir -p $IMAGE_DIR
+ mkdir -p $SKINS_DIR/default
+ mkdir -p $SKINS_DIR/add-ons
+ mkdir -p $TEMPLATE_DIR/default
+ mkdir -p $TEMPLATE_DIR/add-ons
+# make tmp.ini for install script
+ echo $NAME > $PKG_DIR/data/platforms/tmp.ini
+}
+
+chk_emulator_image () {
+ echo ==== Start checking emulator image ====
+ if [ -f ${BASE_DIR}/${SRC_IMG_NAME} ]
+ then
+ mv "${BASE_DIR}/${SRC_IMG_NAME}" "${IMAGE_DIR}/${DES_IMG_NAME}"
+ else
+ echo "CAUTION!! There's no ${SRC_IMG_NAME} file."
+ echo "Packaging is failed."
+ exit 1;
+ fi
+ echo ==== Finish checking emulator image ====
+}
+
+get_meta_file() {
+ cp $BASE_DIR/info.ini $IMAGE_DIR
+}
+
+set_emulator_image_var
+
+clean()
+{
+ rm -rf $PKG_DIR
+ rm -rf $SRCDIR/*.zip
+ rm -rf $SRCDIR/*.tar.gz
+ rm -rf $SRCDIR/package/emulator-image-2.0-x86.package.$TARGET_OS
+}
+
+build()
+{
+ chk_emulator_image
+ get_meta_file
+}
+
+install()
+{
+ mkdir -p $SRCDIR/package/emulator-image-2.0-x86.package.$TARGET_OS
+ cp -r $PKG_DIR/* $SRCDIR/package/emulator-image-2.0-x86.package.$TARGET_OS/
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+exit 0
+
--- /dev/null
+#!/bin/sh
+
+#TIZEN_SDK_INSTALL_PATH=`echo $INSTALLED_PATH`
+#if [ -z $TIZEN_SDK_INSTALL_PATH ]
+#then
+# echo "There is no TIZEN_SDK_PATH ENV" >> /tmp/emulator.log
+# exit 2;
+#fi
+
+tizen_vms_path=$HOME/tizen-sdk-data/emulator-vms
+vms_path=$tizen_vms_path/vms
+if test ! -d "$tizen_vms_path"
+then
+ echo "making $tizen_vms_path"
+ mkdir -p "$tizen_vms_path"
+fi
+
+if test ! -d "$vms_path"
+then
+ echo "making $vms_path"
+ mkdir -p "$vms_path"
+fi
+
+#= find recent workspace =======================================================================
+workspace=$vms_path
+resent=`awk -F= '$1 == "RECENT_VMS_PATH" {name=$2; print name}' "$HOME/tizen-sdk-data/.tizen-vms-path"`
+if [ ${resent} != "" ];
+then
+ echo "RECENT_VMS_PATH = "$resent
+ workspace=$resent/vms
+fi
+echo "WORKING_VMS_PATH = "$workspace
+
+#= find base image version ======================================================================
+config_path="${HOME}/tizen-sdk-data/tizensdkpath"
+sdk_path=`awk -F= '$1 == "TIZEN_SDK_INSTALLED_PATH" {name=$2; print name}' "$config_path"`
+
+if [ -e "$sdk_path/platforms/tmp.ini" ];
+then
+ image_name=`cat $sdk_path/platforms/tmp.ini`
+ image_name="base="\"$image_name\"
+ rm -r -f "$sdk_path/platforms/tmp.ini"
+else
+ image_name="type=\"standard\""
+fi
+echo "BASE_IMAGE_VERSION = "$image_name
+#==================================================================================================
+
+for file in `ls $workspace`
+do
+ if [ -e "$workspace/$file/vm_config.xml" ];
+ then
+ grep $image_name "$workspace/$file/vm_config.xml"
+ if [ $? -eq 0 ];
+ then
+ rm -r -f $workspace/$file
+ fi
+ fi
+done
+echo "DONE"
--- /dev/null
+#!/bin/sh
+
+#TIZEN_SDK_INSTALL_PATH=`echo $INSTALLED_PATH`
+#if [ -z $TIZEN_SDK_INSTALL_PATH ]
+#then
+# echo "There is no TIZEN_SDK_PATH ENV" >> /tmp/emulator.log
+# exit 2;
+#fi
+
+tizen_vms_path=$HOME/tizen-sdk-data/emulator-vms
+vms_path=$tizen_vms_path/vms
+if test ! -d "$tizen_vms_path"
+then
+ echo "making $tizen_vms_path"
+ mkdir -p "$tizen_vms_path"
+fi
+
+if test ! -d "$vms_path"
+then
+ echo "making $vms_path"
+ mkdir -p "$vms_path"
+fi
+
+#= find recent workspace =======================================================================
+#workspace=$vms_path
+#resent=`awk -F= '$1 == "RECENT_VMS_PATH" {name=$2; print name}' "$HOME/tizen-sdk-data/.tizen-vms-path"`
+#if [ ${resent} -ne 0 ];
+#then
+# echo "RECENT_VMS_PATH = "$resent
+# workspace=$resent/x86
+#fi
+#echo "WORKING_VMS_PATH = "$workspace
+
+#= find base image version ======================================================================
+#config_path="${HOME}/.TizenSDK/tizensdkpath"
+#sdk_path=`awk -F= '$1 == "TIZEN_SDK_INSTALLED_PATH" {name=$2; print name}' "$config_path"`
+
+#if [ -e "$sdk_path/platforms/tmp.ini" ];
+#then
+# image_ver=`cat $sdk_path/platforms/tmp.ini`
+# image_ver="base="\"$image_ver\"
+# rm -r -f "$sdk_path/platforms/tmp.ini"
+#else
+# image_ver="type=\"standard\""
+#fi
+#echo "BASE_IMAGE_VERSION = "$image_ver
+#==================================================================================================
+
+#for file in `ls $workspace`
+#do
+# if [ -e "$workspace/$file/vm_config.xml" ];
+# then
+# grep $image_ver "$workspace/$file/vm_config.xml"
+# if [ $? -eq 0 ];
+# then
+# rm -r -f $workspace/$file
+# fi
+# fi
+#done
+
--- /dev/null
+@ECHO ON
+:: find base image version :::::::::::::::::::::::::::::::::::::::::::::::::::::::
+FOR /F "skip=2 tokens=2,3,*", %%A IN ('REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData"') DO (
+ set config_path=%%C
+)
+set tizen_vms_path=%config_path%\tizen-sdk-data\emulator-vms
+set vms_path=%tizen_vms_path%\vms
+
+IF NOT EXIST "%tizen_vms_path%" (
+ echo making "%tizen_vms_path%"
+ mkdir "%tizen_vms_path%"
+) ELSE (
+ echo "%tizen_vms_path%" already exists.
+)
+
+IF NOT EXIST "%vms_path%" (
+ echo making "%vms_path%"
+ mkdir "%vms_path%"
+) ELSE (
+ echo "%vms_path%" already exists.
+)
+
+:: find recent workspace :::::::::::::::::::::::::::::::::::::::::::::::::::::::
+set workspace=%vms_path%
+FOR /F "tokens=1,2 delims==" %%A IN (%config_path%\tizen-sdk-data\.tizen-vms-path) DO (
+ IF "%%A" == "RECENT_VMS_PATH" (
+ set resent=%%B
+ )
+)
+
+IF NOT "%resent%" == "" (
+ echo "RECENT_VMS_PATH = %resent%"
+ set workspace=%resent%\vms
+)
+echo "WORKING_VMS_PATH = %workspace%"
+
+FOR /F "tokens=1,2 delims==" %%A IN (%config_path%\tizen-sdk-data\tizensdkpath) DO (
+ IF "%%A" == "TIZEN_SDK_INSTALLED_PATH" (
+ set sdk_path=%%B
+ )
+)
+
+set image_ver=""
+IF EXIST "%sdk_path%\platforms\tmp.ini" (
+ FOR /F %%A IN (%sdk_path%\platforms\tmp.ini) DO (
+ set image_ver=%%A
+ )
+ del "%sdk_path%\platforms\tmp.ini"
+)
+
+IF %image_ver% == "" (
+set image_name="type=\"standard\""
+) ELSE (
+set image_name="base=\"%image_ver%\""
+)
+echo "BASE_IMAGE_VERSION = %image_name%"
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+FOR /D %%I IN (%workspace%\*) DO (
+ IF EXIST "%%I\vm_config.xml" (
+ FINDSTR /I %image_name% %%I\vm_config.xml
+ IF NOT ERRORLEVEL 1 (
+ RD /S /Q %%I
+ )
+ )
+)
+echo "DONE"
--- /dev/null
+Source: emulator-img
+Version: 1.3.20
+Maintainer: Yeong-Kyoon Lee <yeongkyoon.lee@samsung.com>
+
+Package: emulator-image-2.0-x86
+OS:ubuntu-32, ubuntu-64
+Build-host-os:ubuntu-32
+Description: Tizen Emulator Image
+
+Package: emulator-image-2.0-x86
+OS:windows-32, windows-64
+Build-host-os:ubuntu-32
+Description: Tizen Emulator Image
+
+
+Package: emulator-image-2.0-x86
+OS:macos-64
+Build-host-os:ubuntu-32
+Description: Tizen Emulator Image
--- /dev/null
+Include: pkginfo.manifest
+
+Package: emulator-image-2.0-x86
+OS:ubuntu-32, ubuntu-64
+Build-host-os : opensuse-32, ubuntu-64, opensuse-64
+Description: Tizen Emulator Image
+
+Package: emulator-image-2.0-x86
+OS:windows-32, windows-64
+Build-host-os : opensuse-32, ubuntu-64, opensuse-64
+Description: Tizen Emulator Image
+
+
+Package: emulator-image-2.0-x86
+OS:macos-64
+Build-host-os : opensuse-32, ubuntu-64, opensuse-64
+Description: Tizen Emulator Image