From 3527d396e468fe96aa14ed6ce8b08c1ae4ca55eb Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Wed, 17 Jun 2015 17:52:28 +0900 Subject: [PATCH] Platform: add making emulator directory routine Change-Id: I2172822727f364474b342b697f48b8345319f3dd Signed-off-by: jihye424.kim --- .../tizen/emulator/manager/platform/Platform.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/org/tizen/emulator/manager/platform/Platform.java b/src/org/tizen/emulator/manager/platform/Platform.java index bb275bf..fc88af1 100644 --- a/src/org/tizen/emulator/manager/platform/Platform.java +++ b/src/org/tizen/emulator/manager/platform/Platform.java @@ -119,20 +119,30 @@ public class Platform { private void initializePlatform(Profile profile, EMPlugin plugin) { this.profileClass = profile; this.profile = profile.getName(); + this.plugin = plugin; this.version = plugin.getAttribute(PluginStringResources.PlatformVersion); this.platformName = plugin.getPlatformName(); this.platformPath = plugin.getPlatformPath(); - this.emulatorPath = plugin.getAttribute(PluginStringResources.EmulatorDir); - if (this.emulatorPath == null) { - this.emulatorPath = FilePathResources.getPlatformEmulatorPath(version); - } - this.plugin = plugin; + this.emulatorPath = makingEmulatorDir(); loadSkins(); loadPlugin(); loadTemplate(); } + private String makingEmulatorDir() { + String path = plugin.getAttribute(PluginStringResources.EmulatorDir); + if (path != null) { + File file = new File(path); + if (!file.isAbsolute()) { + path = FilePathResources.getSdkRoot() + File.separator + path; + } + } else { + path = FilePathResources.getPlatformEmulatorPath(version); + } + return path; + } + public String getName() { return platformName; } -- 2.7.4