From 122a2fcbc1c56ad137a951450403d1cf9ab179f5 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Fri, 7 Aug 2015 14:32:05 +0900 Subject: [PATCH] Base Image: add profile extension attribute to base image Change-Id: Ibd1ea361e8c2cc5868e566ad555d2cd57df9b168 Signed-off-by: jihye424.kim --- src/org/tizen/emulator/manager/platform/BaseImage.java | 10 ++++++++++ .../tizen/emulator/manager/plugin/PluginStringResources.java | 1 + src/org/tizen/emulator/manager/resources/StringResources.java | 2 +- src/org/tizen/emulator/manager/vms/option/CommonOption.java | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/org/tizen/emulator/manager/platform/BaseImage.java b/src/org/tizen/emulator/manager/platform/BaseImage.java index 28234b7..6db6c0b 100644 --- a/src/org/tizen/emulator/manager/platform/BaseImage.java +++ b/src/org/tizen/emulator/manager/platform/BaseImage.java @@ -37,6 +37,7 @@ import java.util.Properties; import java.util.logging.Level; import org.tizen.emulator.manager.logging.EMLogger; +import org.tizen.emulator.manager.plugin.PluginStringResources; import org.tizen.emulator.manager.resources.FilePathResources; import org.tizen.emulator.manager.resources.StringResources; import org.tizen.emulator.manager.template.ITemplate; @@ -55,6 +56,7 @@ public class BaseImage { protected String imageName; protected String version; protected String profile; + protected String extension; protected String type; protected Architecture cpu; protected SKIN_SHAPE skinShape; @@ -166,6 +168,10 @@ public class BaseImage { return binaryVersion; } + public String getProfileExtension() { + return extension; + } + public List getOptionList() { if (optionList == null) { optionList = itemTemplate.makeOptionList(platform.getPlugin()); @@ -225,6 +231,7 @@ public class BaseImage { imageName = prop.getProperty(StringResources.IMAGE_NAME, ""); //$NON-NLS-1$ version = prop.getProperty(StringResources.IMAGE_VERSION, "2.4"); //$NON-NLS-1$ profile = prop.getProperty(StringResources.PRODUCT_PROFILE, PlatformStringResources.MOBILE_PROFILE).toLowerCase(); + extension = prop.getProperty(StringResources.PROFILE_EXTENSION, ""); type = prop.getProperty(StringResources.IMAGE_TYPE, "default"); //$NON-NLS-1$ String cpuValue = prop.getProperty(StringResources.TARGET_CPU, "i386"); //$NON-NLS-1$ cpu = Architecture.getType(cpuValue); @@ -257,6 +264,9 @@ public class BaseImage { cpu = findCpuTypeFromPath(); //$NON-NLS-1$ skinShape = SKIN_SHAPE.NONE; // TODO binaryVersion = ""; //$NON-NLS-1$ + extension = platform.isChildPlatform() + ? platform.getPlugin().getAttribute(PluginStringResources.Extension) + : ""; } private Architecture findCpuTypeFromPath() { diff --git a/src/org/tizen/emulator/manager/plugin/PluginStringResources.java b/src/org/tizen/emulator/manager/plugin/PluginStringResources.java index 35b5cb0..6ee24c5 100644 --- a/src/org/tizen/emulator/manager/plugin/PluginStringResources.java +++ b/src/org/tizen/emulator/manager/plugin/PluginStringResources.java @@ -51,6 +51,7 @@ public class PluginStringResources { // base platform name public final static String BasePlatform = "Base-Platform"; //$NON-NLS-1$ public final static String EmulatorDir = "Emulator-Dir"; //$NON-NLS-1$ + public final static String Extension = "Extension"; private static ArrayList pointList = new ArrayList(); static { diff --git a/src/org/tizen/emulator/manager/resources/StringResources.java b/src/org/tizen/emulator/manager/resources/StringResources.java index 3e2d947..77adac4 100644 --- a/src/org/tizen/emulator/manager/resources/StringResources.java +++ b/src/org/tizen/emulator/manager/resources/StringResources.java @@ -90,7 +90,7 @@ public class StringResources { public static final String PRODUCT_PROFILE = "profile"; //$NON-NLS-1$ public static final String BINARY_VERSION="binary_version"; //$NON-NLS-1$ public static final String TIZEN_SDK_VERSION="TIZEN_SDK_VERSION"; //$NON-NLS-1$ - + public static final String PROFILE_EXTENSION = "profile.ext"; // SKIN Info public static final String SKIN_INFO_FILENAME = "info.ini"; //$NON-NLS-1$ diff --git a/src/org/tizen/emulator/manager/vms/option/CommonOption.java b/src/org/tizen/emulator/manager/vms/option/CommonOption.java index a619a0b..31547a2 100644 --- a/src/org/tizen/emulator/manager/vms/option/CommonOption.java +++ b/src/org/tizen/emulator/manager/vms/option/CommonOption.java @@ -43,7 +43,10 @@ public class CommonOption extends Option { // Add variables config.addVariableWithSpace(OPTION_KEY.VAR_VMS_PATH, FilePathResources.getTizenVmsPath()); - config.addVariable(OPTION_KEY.VAR_PROFILE, property.getPropertyValue().baseImage.getProfile()); + config.addVariable(OPTION_KEY.VAR_PROFILE, + property.getPropertyValue().baseImage.getProfile() + + (property.getPropertyValue().baseImage.getProfileExtension().isEmpty() + ? "" : "-"+ property.getPropertyValue().baseImage.getProfileExtension())); // kernel log config.addKernelOption("console", "ttyS0"); //$NON-NLS-1$ //$NON-NLS-2$ -- 2.7.4