[Title] Support dibs for emulator-manager package.
authorKitae Kim <kt920.kim@samsung.com>
Thu, 15 Mar 2012 05:49:41 +0000 (14:49 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Thu, 15 Mar 2012 05:49:41 +0000 (14:49 +0900)
[Type]
[Module] emulator-manager / dibs
[Priority] Major
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

package/build.linux [new file with mode: 0755]
package/emulator.install.linux [new file with mode: 0755]
package/emulator.install.windows [new file with mode: 0755]
package/emulator.remove.linux [new file with mode: 0755]
package/emulator.remove.windows [new file with mode: 0755]
package/pkginfo.manifest [new file with mode: 0644]

diff --git a/package/build.linux b/package/build.linux
new file mode 100755 (executable)
index 0000000..e15fce6
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh -xe
+# clean
+clean()
+{
+       echo "$SRCDIR"
+#      ant -buildfile build.xml clean
+       rm -rf $SRCDIR/*.zip
+       rm -rf $SRCDIR/*.tar.gz
+}
+
+# build
+build() 
+{
+       ant -buildfile build.xml
+}
+
+# install
+install() 
+{
+    if [ "$BUILD_TARGET_OS" = "linux" ]
+    then
+               BIN_DIR=$SRCDIR/package/emulator-manager.package.linux/data/Emulator
+    else
+               BIN_DIR=$SRCDIR/package/emulator-manager.package.windows/data/Emulator
+    fi
+       mkdir -p $BIN_DIR/bin
+
+       cp emulator-manager.jar $BIN_DIR/bin
+       cp -r lib $BIN_DIR/bin/
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+
+echo "success"
diff --git a/package/emulator.install.linux b/package/emulator.install.linux
new file mode 100755 (executable)
index 0000000..ecd3c1e
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+## User Define for desktop menu
+currentPath=`pwd`
+desktoppath=~/.local/share/applications
+
+## Do not modify the followings (Make desktop menu)
+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
+
+iconpath=~/.local/share/icons
+
+## vtm shortcut
+vtm_desktopfile=$desktoppath/tizen-sdk-vtm.desktop
+vtm_iconfile=vtm.ico
+vtm_iconpath=Emulator/skins/icons
+vtm_exefile=Emulator/bin/emulator-manager
+vtm_exepath=$TIZEN_SDK_INSTALL_PATH/$vtm_exefile
+vtm_comment="Emulator manager is a tool which can make a cloned emulator image"
+vtm_name="Emulator Manager"
+mkdir -p $iconpath
+
+if test -e $TIZEN_SDK_INSTALL_PATH/$vtm_iconpath/$vtm_iconfile 
+then 
+       cp -f $TIZEN_SDK_INSTALL_PATH/$vtm_iconpath/$vtm_iconfile $iconpath/$vtm_iconfile
+else
+       echo "$vtm_iconfile does not exist!!"
+       exit 1
+fi
+
+${MAKESHORTCUT_PATH} \
+               -f "$vtm_desktopfile" \
+               -e "$vtm_exepath" \
+               -i "$iconpath/$vtm_iconfile" \
+               -n "$vtm_name" \
+               -c "$vtm_comment"
diff --git a/package/emulator.install.windows b/package/emulator.install.windows
new file mode 100755 (executable)
index 0000000..37693ca
--- /dev/null
@@ -0,0 +1,17 @@
+@ECHO OFF\r
+set vtm_shortcut_name=Emulator Manager\r
+set execute_path=Emulator\bin\r
+set vtm_execute_file=emulator-manager.exe\r
+set icon_path=Emulator\skins\icons\r
+set vtm_icon_file=vtm.ico\r
+\r
+set program_path=%INSTALLED_PATH%\%execute_path%\r
+set desktop_menu_icon_path=%INSTALLED_PATH%\%icon_path%\r
+\r
+echo Program path : %program_path%\r
+echo Desktop menu icon path : %desktop_menu_icon_path%\r
+echo Setting shortcut...\r
+wscript.exe %MAKESHORTCUT_PATH% /shortcut:"%vtm_shortcut_name%" /target:"%program_path%\%vtm_execute_file%" /icon:"%desktop_menu_icon_path%\%vtm_icon_file%"\r
+echo Setting registry\r
+reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"  /f /v %program_path%\%vtm_execute_file% /t REG_SZ /d RUNASADMIN\r
+echo COMPLETE\r
diff --git a/package/emulator.remove.linux b/package/emulator.remove.linux
new file mode 100755 (executable)
index 0000000..95533e7
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+desktoppath=~/.local/share/applications
+## Register .desktop file
+${REMOVE_SHORTCUT}  $desktoppath/tizen-sdk-vtm.desktop
+### END Register Menu ###
+
+## Remove icon file ##
+rm -f ~/.local/share/icons/vtm.ico
+## End remove icon file ##
diff --git a/package/emulator.remove.windows b/package/emulator.remove.windows
new file mode 100755 (executable)
index 0000000..1a75966
--- /dev/null
@@ -0,0 +1,9 @@
+set vtm_shortcut_name=Emulator Manager\r
+set execute_path=Emulator\bin\r
+set vtm_execute_file=emulator-manager.exe\r
+set program_path=%INSTALLED_PATH%\%execute_path%\r
+ECHO Start menu path=%start_menu_programs_path%\r
+echo delete from registry\r
+reg delete "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"  /f /v %program_path%\%vtm_execute_file%\r
+wscript.exe %REMOVE_SHORTCUT% /shortcut:%vtm_shortcut_name%\r
+\r
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
new file mode 100644 (file)
index 0000000..80f0bdc
--- /dev/null
@@ -0,0 +1,15 @@
+Package: emulator-manager
+Version: 1.0.1
+OS: linux
+Build-host-os: linux
+Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
+Source: emulator-manager
+Description: Tizen Emulator Manager
+
+Package: emulator-manager
+Version: 1.0.1
+OS: windows
+Build-host-os: linux
+Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
+Source: emulator-manager
+Description: Tizen Emulator Manager