# install_common
install_common()
{
- # emulator
- EMULATOR_COMMON_DIR=$SRCDIR/package/2.4-emulator-qemu-common.package.${TARGET_OS}/data/platforms/tizen-2.4/common
- mkdir -p $EMULATOR_COMMON_DIR
- # we have nothing for common now
- TIZEN_VERSIONS="4.0 3.0 2.4 2.3.2"
++ TIZEN_VERSIONS="2.4"
- EMULATOR_X86_DIR=$SRCDIR/package/2.4-emulator-qemu-x86.package.${TARGET_OS}/data/platforms/tizen-2.4/common
+ for VER in ${TIZEN_VERSIONS} ; do
+ # emulator
+ EMULATOR_COMMON_DIR=$SRCDIR/package/$VER-emulator-qemu-common.package.${TARGET_OS}/data/platforms/tizen-$VER/common
+ mkdir -p $EMULATOR_COMMON_DIR
+ # we have nothing for common now
-
+ EMULATOR_X86_DIR=$SRCDIR/package/$VER-emulator-qemu-x86.package.${TARGET_OS}/data/platforms/tizen-$VER/common
- mkdir -p $EMULATOR_X86_DIR
- cp -pPR $SRCDIR/tizen/emulator $EMULATOR_X86_DIR/emulator
+ mkdir -p $EMULATOR_X86_DIR
+ cp -pPR $SRCDIR/tizen/emulator $EMULATOR_X86_DIR/emulator
- # profile skins
- MOBILE_2_4_SKIN_RESOURCE_DIR=$SRCDIR/package/mobile-2.4-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-2.4/mobile/emulator-resources/skins
- WEARABLE_2_4_SKIN_RESOURCE_DIR=$SRCDIR/package/wearable-2.4-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-2.4/wearable/emulator-resources/skins
- TV_2_4_SKIN_RESOURCE_DIR=$SRCDIR/package/tv-2.4-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-2.4/tv/emulator-resources/skins
+ # profile skins
+ MOBILE_SKIN_RESOURCE_DIR=$SRCDIR/package/mobile-$VER-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-$VER/mobile/emulator-resources/skins
+ WEARABLE_SKIN_RESOURCE_DIR=$SRCDIR/package/wearable-$VER-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-$VER/wearable/emulator-resources/skins
+ # Tizen 2.3.2 does not have the tv profile
+ if [ "$VER" != "2.3.2" ] ; then
+ TV_SKIN_RESOURCE_DIR=$SRCDIR/package/tv-$VER-emulator-qemu-skins.package.${TARGET_OS}/data/platforms/tizen-$VER/tv/emulator-resources/skins
+ fi
- mkdir -p $MOBILE_2_4_SKIN_RESOURCE_DIR
- mkdir -p $WEARABLE_2_4_SKIN_RESOURCE_DIR
- mkdir -p $TV_2_4_SKIN_RESOURCE_DIR
+ mkdir -p $MOBILE_SKIN_RESOURCE_DIR
+ mkdir -p $WEARABLE_SKIN_RESOURCE_DIR
+ if [ "$VER" != "2.3.2" ] ; then
+ mkdir -p $TV_SKIN_RESOURCE_DIR
+ fi
- cp -pPR $SRCDIR/tizen/src/ui/resource/skins/mobile/* $MOBILE_2_4_SKIN_RESOURCE_DIR
- cp -pPR $SRCDIR/tizen/src/ui/resource/skins/wearable/* $WEARABLE_2_4_SKIN_RESOURCE_DIR
- cp -pPR $SRCDIR/tizen/src/ui/resource/skins/tv/* $TV_2_4_SKIN_RESOURCE_DIR
+ cp -pPR $SRCDIR/tizen/src/ui/resource/skins/mobile/* $MOBILE_SKIN_RESOURCE_DIR
+ cp -pPR $SRCDIR/tizen/src/ui/resource/skins/wearable/* $WEARABLE_SKIN_RESOURCE_DIR
+ if [ "$VER" != "2.3.2" ] ; then
+ cp -pPR $SRCDIR/tizen/src/ui/resource/skins/tv/* $TV_SKIN_RESOURCE_DIR
+ fi
+ # make install/remove script, depending on the version
+ ORIGIN_INSTALL_FILE=$SRCDIR/package/emulator-qemu-x86.install.$TARGET_OS_CATEGORY
+ ORIGIN_REMOVE_FILE=$SRCDIR/package/emulator-qemu-x86.remove.$TARGET_OS_CATEGORY
+ TARTGET_INSTALL_FILE=$SRCDIR/package/$VER-emulator-qemu-x86.install.$TARGET_OS_CATEGORY
+ TARTGET_REMOVE_FILE=$SRCDIR/package/$VER-emulator-qemu-x86.remove.$TARGET_OS_CATEGORY
+ if [ -e "$ORIGIN_INSTALL_FILE" ] ; then
+ cp -p "$ORIGIN_INSTALL_FILE" "$TARTGET_INSTALL_FILE"
+ # Replace existing version to inputted version.
+ # To apply some variables to 'sed' command,
+ # you must enclose expressions in double quotes("").
+ # -i'' option means that does not make backup file, it must have an extension in macOS.
+ sed -i'' -e "s/tizen-x.x/tizen-$VER/g" "$TARTGET_INSTALL_FILE"
+ fi
+ if [ -e "$ORIGIN_REMOVE_FILE" ] ; then
+ cp -p "$ORIGIN_REMOVE_FILE" "$TARTGET_REMOVE_FILE"
+ # Replace existing version to inputted version.
+ # Now it is not necessary. Uncomment the line below if necessary.
+ #sed -i'' -e "s/tizen-x.x/tizen-$VER/g" "$TARTGET_INSTALL_FILE"
+ fi
+ done
}