private final static String platform_suffix = File.separator + "platforms";
private final static String em_images_suffix = File.separator + "emulator-images";
private final static String resource_suffix = File.separator + "emulator-resources";
- private final static String old_default_suffix = File.separator + "default";
private final static String common_suffix = File.separator + "common";
private final static String platform_prefix = File.separator + "tizen-";
-// private final static String addons_suffix = File.separator + "add-ons";
-// private final static String x86_extension = ".x86";
-// private final static String arm_extension = ".arm";
private final static String sdkinfo_suffix = File.separator + "sdk.info";
private final static String etc_suffix = File.separator + "etc";
private final static String kernel_suffix = File.separator +"kernel";
private final static String swap_suffix = File.separator + "swap";
private final static String data_suffix = File.separator +"data";
+ private final static String images_suffix = File.separator + "images";
private final static String win_sdb_exec = File.separator + "sdb.exe";
private final static String sdb_exec = File.separator + "sdb";
private final static String skins_suffix = File.separator + "skins";
private final static String template_suffix = File.separator + "template";
private final static String plugins_suffix = File.separator + "plugins";
- private final static String images_suffix = File.separator + "images";
- private final static String sdkdata_old_emulator_suffix = File.separator + "emulator-vms";
private final static String sdkdata_new_emulator_suffix = File.separator + "emulator";
private final static String vms_suffix = File.separator + "vms";
- private final static String qemuImg_suffic = File.separator + "qemu-img";
+ private final static String qemuImg_suffix = File.separator + "qemu-img";
private final static String checkCam_suffix = File.separator + "check-cam"
+ (EmulatorManager.isWin() ? ".exe" : "") ;
+ // Tizen SDK
private static String currentPath;
private static String sdkPath = null;
private static String platformsPath;
- private static String toolsPath;
- private static String emulatorPath;
+ private static String toolEmulatorPath;
private static String sdbPath;
- // Emulator
- private static String binPath;
- private static String etcPath;
- private static String remotePath;
- private static String dataPath;
- private static String defaultSkinPath;
- private static String defaultTemplatePath;
-
- private static String defaultImagePath;
- private static String oldDefaultImagePath;
+ // Common Emulator
+ private static String toolEmulatorBinPath;
+ private static String toolEmulatorEtcPath;
+ private static String toolEmulatorRemotePath;
+ // Platform
private static String platformSkinsPath;
private static String platformTemplatePath;
private static String platformPluginsPath;
private static String platformImagesPath;
-
- private static String kernelPath;
- private static String biosPath;
private static String sdcardPath;
private static String swapPath;
-
private static String sdkDataSdcardPath;
private static String sdkDataSwapPath;
private final static String log_suffix = File.separator +"logs";
private static String tizensdkdataPath;
- private static String tizensdkdataEmulatorPath;
- private static String tizensdkdataOldEmulatorPath;
+ private static String tizensdkdataEmulatorPath;;
private static String sdkDataVmsPath;
- private static String oldSdcardPath;
- private static String oldSwapPath;
- private static String oldSdkDataVmsPath;
-
static {
// emulator-manager.jar file path
{
sdkPath = currentPath;
}
+ String toolsPath = "";
try {
toolsPath = new File(sdkPath + tool_suffix).getCanonicalPath();
} catch (IOException e) {
}
try {
- emulatorPath = new File(toolsPath + emulator_suffix).getCanonicalPath();
+ toolEmulatorPath = new File(toolsPath + emulator_suffix).getCanonicalPath();
} catch (IOException e) {
- emulatorPath = toolsPath + emulator_suffix;
+ toolEmulatorPath = toolsPath + emulator_suffix;
}
platformsPath = sdkPath + platform_suffix;
// default Image path
// -> platforms/profile-version/emulator-images/
- // old Image path
- // -> platforms/profile-version/emulator-images/default
- defaultImagePath = em_images_suffix;
- oldDefaultImagePath = em_images_suffix + old_default_suffix;
+ platformImagesPath = em_images_suffix;
platformSkinsPath = resource_suffix + skins_suffix;
platformTemplatePath = resource_suffix + template_suffix;
platformPluginsPath = resource_suffix + plugins_suffix;
- platformImagesPath = resource_suffix + images_suffix;
// SDB path
{
sdbPath = toolsPath + sdb_suffix;
}
- binPath = emulatorPath + bin_suffix;
-
- etcPath = emulatorPath + etc_suffix;
- remotePath = emulatorPath + remote_suffix;
- dataPath = emulatorPath + data_suffix;
-
- kernelPath = dataPath + kernel_suffix;
- biosPath = dataPath + bios_suffix;
+ toolEmulatorBinPath = toolEmulatorPath + bin_suffix;
- sdkDataSdcardPath = emulatorPath + storages_suffix + sdcard_suffix;
- sdkDataSwapPath = emulatorPath + storages_suffix + swap_suffix;
+ toolEmulatorEtcPath = toolEmulatorPath + etc_suffix;
+ toolEmulatorRemotePath = toolEmulatorPath + remote_suffix;
- defaultSkinPath = emulatorPath + skins_suffix;
-// defaultTemplatePath = emulatorPath + template_suffix;
+ sdkDataSdcardPath = toolEmulatorPath + storages_suffix + sdcard_suffix;
+ sdkDataSwapPath = toolEmulatorPath + storages_suffix + swap_suffix;
tizensdkdataEmulatorPath = tizensdkdataPath + sdkdata_new_emulator_suffix;
sdcardPath = tizensdkdataEmulatorPath + sdcard_suffix;
swapPath = sdkDataSwapPath;
sdkDataVmsPath = tizensdkdataEmulatorPath + vms_suffix;
- tizensdkdataOldEmulatorPath = tizensdkdataPath + sdkdata_old_emulator_suffix;
- oldSdcardPath = tizensdkdataOldEmulatorPath + sdcard_suffix;
- oldSwapPath = tizensdkdataOldEmulatorPath + swap_suffix;
- oldSdkDataVmsPath = tizensdkdataOldEmulatorPath + vms_suffix;
-
EmulatorVMList.makeSDKDataPath(sdkDataVmsPath);
testPrintPath();
}
return sdbPath;
}
- public static String getBinPath(){
- return binPath;
+ // tools/emulator
+ public static String getToolEmulatorPath() {
+ return toolEmulatorPath;
+ }
+
+ public static String getToolEmulatorBinPath(){
+ return toolEmulatorBinPath;
}
- public static String getEmulatorBinPath(String platformVersion) {
- return getEmulatorPath(platformVersion) + bin_suffix;
+ public static String getToolEmulatorEtcPath() {
+ return toolEmulatorEtcPath;
}
- public static String getEmulatorKernelPath(String platformVersion) {
- return getEmulatorDataPath(platformVersion) + kernel_suffix;
+ public static String getToolEmulatorRemotePath() {
+ return toolEmulatorRemotePath;
}
- public static String getEmulatorBiosPath(String platformVersion) {
- return getEmulatorDataPath(platformVersion) + bios_suffix;
+ // emulator common check tool
+ public static String getEmulatorCheckToolPath() {
+ // return getToolEmulatorBinPath();
+ return getPlatformEmulatorBinPath("");
}
public static String getEmulatorQemuImgPath() {
- return getEmulatorToolPath() + qemuImg_suffic;
+ return getEmulatorCheckToolPath() + qemuImg_suffix;
}
public static String getCheckCamPath() {
- return getEmulatorToolPath() + checkCam_suffix;
+ return getEmulatorCheckToolPath() + checkCam_suffix;
+ }
+
+ // emulator platform path
+ public static String getEmulatorBinPath(String emulatorPath) {
+ return emulatorPath + bin_suffix;
+ }
+
+ public static String getEmulatorDataPath(String emulatorPath) {
+ return emulatorPath + data_suffix;
}
- public static String getEmulatorImagePath(String platformVersion) {
- return getEmulatorPath(platformVersion) + images_suffix;
+ public static String getEmulatorKernelPath(String emulatorPath) {
+ return getEmulatorDataPath(emulatorPath) + kernel_suffix;
}
- public static String getEmulatorDataPath(String platformVersion) {
- return getEmulatorPath(platformVersion) + data_suffix;
+ public static String getEmulatorBiosPath(String emulatorPath) {
+ return getEmulatorDataPath(emulatorPath) + bios_suffix;
}
- public static String getEmulatorToolPath() {
- // TODO return /tools/emulator/bin
- return getEmulatorPath(getLatestPlatformVersion()) + bin_suffix;
+ public static String getEmulatorImagesPath(String emulatorPath) {
+ return emulatorPath + images_suffix;
}
- public static String getEmulatorPath(String platformVersion) {
- String emulatorPath = "";
+ // platforms/tizen-{version}/common/emulator
+ public static String getPlatformEmulatorPath(String platformVersion) {
+ String emulatorPath;
if (platformVersion == null || platformVersion.isEmpty()) {
platformVersion = getLatestPlatformVersion();
}
return emulatorPath;
}
+ public static String getPlatformEmulatorBinPath(String platformVersion) {
+ String emulatorPath;
+ emulatorPath = getPlatformEmulatorPath(platformVersion) + bin_suffix;
+ return emulatorPath;
+ }
+
// Return latest platform version in whole profile.
private static String getLatestPlatformVersion() {
String latestVersion = "0";
return latestVersion;
}
-/*
- public String getArchPath(){
- return arcPath;
- }
-
- // ~/tizen_sdk/Emulator/skins/icons/vtm.ico
- public String getIconPath(){
- return iconPath;
- }
-
- public String getSkinPath() {
- return skinPath;
- }
-*/
- public static String getDataPath(){
- return dataPath;
- }
-/*
- public String getConfPath(){
- return confPath;
- }
-*/
public static String getTizenVmsPath() {
return sdkDataVmsPath;
}
return tizensdkdataEmulatorPath;
}
- public static String getOldTizenSdkDataEmulatorPath() {
- return tizensdkdataOldEmulatorPath;
- }
-
- // ~/tizen_sdk/Emulator/x86/data/pc-bios/bios.bin
- public static String getBiosPath() {
- return biosPath;
- }
-
public static String getVirtualTargetPath(String name) {
return getTizenVmsPath() + File.separator + name;
}
- /*
- public String getVirtualTargetImagePath(String name) {
- return getTizenVmsArchPath() + File.separator + name + File.separator + "emulimg-" + name + arch_extension;
- }
- */
-
public static String getVirtualTargetLogPath(String name) {
return getVirtualTargetPath(name) + log_suffix;
}
return platformsPath;
}
- public static String getKernelPath() {
- return kernelPath;
- }
-
- public static String getOldDefaultImagePath() {
- return oldDefaultImagePath;
- }
-
- public static String getDefaultImagePath() {
- return defaultImagePath;
- }
-
public static String getPlatformSkinsPath() {
return platformSkinsPath;
}
return platformImagesPath;
}
- public static String getSkinPath() {
- return defaultSkinPath;
- }
-
- public static String getTemplatePath() {
- return defaultTemplatePath;
- }
-
- public static String getEtcPath() {
- return etcPath;
- }
-
- public static String getRemotePath() {
- return remotePath;
- }
-
public static String getTizenSdkDataPath() {
return tizensdkdataPath;
}
-
- public static String getOldSdcardPath() {
- return oldSdcardPath;
- }
-
- public static String getOldSwapPath() {
- return oldSwapPath;
- }
-
- public static String getOldSdkDataVmsPath() {
- return oldSdkDataVmsPath;
- }
-
- public static String getEmulatorPath() {
- return emulatorPath;
- }
-
- public static String getResourceSuffix() {
- return resource_suffix;
- }
}
private static String BRIDGE_NAME = "bridge1";
public static String getDevconPath(String platformVersion) {
- return FilePathResources.getEmulatorBinPath(platformVersion)
+ return FilePathResources.getPlatformEmulatorBinPath(platformVersion)
+ File.separator + "devcon.exe";
}
public static boolean isWinBridgeExist() {
String proxyCommand = "check-net.exe";
boolean isExist = false;
- List<String> cmd = Arrays.asList(FilePathResources.getEmulatorToolPath()
+ List<String> cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath()
+ File.separator + proxyCommand, "--bridge");
ProcessResult res = HelperClass.runProcess(cmd);
boolean isCommandSuccess = false;
}
EMLogger.getLogger().info("bind interface to bridge");
- cmd = Arrays.asList(FilePathResources.getEmulatorBinPath(platformVersion)
+ cmd = Arrays.asList(FilePathResources.getPlatformEmulatorBinPath(platformVersion)
+ File.separator + "bindbridge.exe",
"ms_bridge", CompatibleIDs, "bind");
res = HelperClass.runProcess(cmd);
// Create new tap
EMLogger.getLogger().info("Create new tap.");
cmd = Arrays.asList(getDevconPath(platformVersion), "install",
- FilePathResources.getEmulatorBinPath(platformVersion) + File.separator
+ FilePathResources.getPlatformEmulatorBinPath(platformVersion) + File.separator
+ "OemWin2k.inf", "Tap0901");
res = HelperClass.runProcess(cmd);
EMLogger.getLogger().info("bind host network to bridge");
String tapPnpInstanceID = getPnpInstanceIDFromName(tapName);
- cmd = Arrays.asList(FilePathResources.getEmulatorBinPath(platformVersion)
+ cmd = Arrays.asList(FilePathResources.getPlatformEmulatorBinPath(platformVersion)
+ File.separator + "bindbridge.exe", "ms_bridge",
tapPnpInstanceID, "bind");
res = HelperClass.runProcess(cmd);
EMLogger.getLogger().info(
"wait while finishing bridged network setting");
String proxyCommand = "check-net.exe";
- cmd = Arrays.asList(FilePathResources.getEmulatorToolPath()
+ cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath()
+ File.separator + proxyCommand, "--bridge");
res = HelperClass.runProcess(cmd);
while (!res.getStdOutMsg().isEmpty()) {