<tstamp>
<format property="build_time" pattern="yyyyMMdd-HHmm" timezone="GMT+9" locale="en" />
</tstamp>
+ <!--
<exec executable="cat" outputproperty="version">
<arg value="VERSION" />
</exec>
+ -->
<exec executable="git" outputproperty="build_git_commit" failifexecutionfails="false">
<arg value="rev-parse" />
<arg value="--short" />
<arg value="HEAD" />
</exec>
<propertyfile file="about.properties" comment="Auto-generated properties - DO NOT EDIT">
+ <!--
<entry key="version" value="${version}" />
+ -->
<entry key="build_time" value="${build_time}" />
<entry key="build_git_commit" value="${build_git_commit}" />
</propertyfile>
+* 1.3.80
+- reading version from file (emulator/etc/version)
+== jihye kim <jihye1128.kim@samsung.com> 2013-02-21
+
+* 1.3.79
+- update version
+== jihye kim <jihye1128.kim@samsung.com> 2013-02-15
+
* 1.3.78
- modify install script
== jihye kim <jihye1128.kim@samsung.com> 2013-02-12
Source: emulator-manager
-Version: 1.3.78
+Version: 1.3.80
Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
Package: emulator-manager
import org.tizen.emulator.manager.tool.CheckVirtualization;
import org.tizen.emulator.manager.tool.FilePath;
import org.tizen.emulator.manager.tool.SelectWorkspace;
+import org.tizen.emulator.manager.tool.StringResource;
import org.tizen.emulator.manager.ui.MainDialog;
import org.tizen.emulator.manager.ui.MessageDialog;
import org.tizen.emulator.manager.vms.EmulatorVMs;
MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
if (isArgsError == true) {
- msg.openWarningDialog("Used workspace option parameter is not proper. Aborting...\n" +
- "\nSee right examples below.\n" +
- "[--workspace {workspace path},save=true]\n" +
- "[-w {workspace path},save=true]\n" +
- "[--workspace {workspace path},save=false]\n" +
- "[-w {workspace path},save=false]\n" +
- "\nThe workspace path must be absolute."
+ msg.openWarningDialog("Used workspace option parameter is not proper. Aborting..."
+ + StringResource.NEW_LINE + StringResource.NEW_LINE
+ + "See right examples below." + StringResource.NEW_LINE
+ + "[--workspace {workspace path},save=true]" + StringResource.NEW_LINE
+ + "[-w {workspace path},save=true]" + StringResource.NEW_LINE
+ + "[--workspace {workspace path},save=false]" + StringResource.NEW_LINE
+ + "[-w {workspace path},save=false]" + StringResource.NEW_LINE + StringResource.NEW_LINE
+ + "The workspace path must be absolute."
);
exitEmulatorManager(-1);
}
try {
FileLock lock = randomAccessFile.getChannel().tryLock();
if (lock == null) {
- EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager.\n" +
- "Another one with the same user name is running now.\n");
+ EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager."
+ + StringResource.NEW_LINE
+ + "Another one with the same user name is running now."
+ + StringResource.NEW_LINE);
exitEmulatorManager(-1);
}
} catch (IOException e) {
- EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager.\n" +e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager."
+ + StringResource.NEW_LINE +e.getMessage() + StringResource.NEW_LINE);
exitEmulatorManager(-1);
}
try {
FileLock lock = randomAccessFile.getChannel().tryLock();
if (lock == null) {
- msg.openInfoDialog("Can not launch Emulator Manager.\n" +
+ msg.openInfoDialog("Can not launch Emulator Manager." + StringResource.NEW_LINE +
"Another one with the same user name is running now.");
exitEmulatorManager(0);
}
} catch (IOException e) {
- msg.openInfoDialog("Can not launch Emulator Manager.\n" +e.getMessage());
+ msg.openInfoDialog("Can not launch Emulator Manager." + StringResource.NEW_LINE + e.getMessage());
exitEmulatorManager(-1);
}
if (isConsoleMode) {
instance.startConsoleProcessor();
} else {
- EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!\n");
+ EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!" + StringResource.NEW_LINE);
instance.preare();
instance.DrawUI();
import org.tizen.emulator.manager.EmulatorManager;
import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.tool.StringResource;
public class CommandLineParser {
private ActionList actionList = null;
System.out.println("Error: " + String.format(errorFormat, args));
}
- System.out.println("\n" + "Usage:\n"+" emulator-manager [global options] "
+ System.out.println(StringResource.NEW_LINE + "Usage:" + StringResource.NEW_LINE +" emulator-manager [global options] "
+ (action == null ? "action" : action.getAction())
+ " [action options]");
actionList.printGlobaloptions();
if (action == null ) {
- System.out.println("\nValid actions: ");
+ System.out.println(StringResource.NEW_LINE + "Valid actions: ");
actionList.printActions();
} else {
actionList.printAction(action);
void setID(int id) {
this.id = Integer.toString(id);
//
- information = getName() + "\n" +
- " ID : " + getID() + "\n" +
- " Platform : " + getPlatformName() + "\n" +
- " Type : " + getType() + "\n" +
- " Version : " + getVersion() + "\n" +
- " Release Version : " + getRelease() + "\n" +
- " Target CPU : " + getCpu().toUpperCase() + "\n" +
- " Product Domain : " + getDomain() + "\n" +
- " Base Disk Image Path : " + getPath() + "\n";
+ information = getName() + StringResource.NEW_LINE +
+ " ID : " + getID() + StringResource.NEW_LINE +
+ " Platform : " + getPlatformName() + StringResource.NEW_LINE +
+ " Type : " + getType() + StringResource.NEW_LINE +
+ " Version : " + getVersion() + StringResource.NEW_LINE +
+ " Release Version : " + getRelease() + StringResource.NEW_LINE +
+ " Target CPU : " + getCpu().toUpperCase() + StringResource.NEW_LINE +
+ " Product Domain : " + getDomain() + StringResource.NEW_LINE +
+ " Base Disk Image Path : " + getPath() + StringResource.NEW_LINE;
//
}
package org.tizen.emulator.manager.tool;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
InputStream in = this.getClass().getClassLoader().getResourceAsStream(StringResource.ABOUT_PROP_FILENAME );
Properties properties = new Properties();
- String ver = "";
+ String ver = null;
if(in != null) {
try {
properties.load(in);
+ //ver = properties.getProperty(StringResource.PROP_KEY_VERSION);
+ time = properties.getProperty(StringResource.PROP_KEY_BUILD_TIME);
+ gitVersion = properties.getProperty(StringResource.PROP_KEY_GIT_VERSION);
} catch (IOException e1) {
- EMLogger.getLogger().log(Level.SEVERE, e1.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.SEVERE, e1.getMessage());
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+ }
}
-
- ver = properties.getProperty(StringResource.PROP_KEY_VERSION);
- time = properties.getProperty(StringResource.PROP_KEY_BUILD_TIME);
- gitVersion = properties.getProperty(StringResource.PROP_KEY_GIT_VERSION);
}
- if(ver == null || ver.isEmpty()) {
+ // getting version
+ BufferedReader about = null;
+ try {
+ about = new BufferedReader(new FileReader(new File(FilePath.getInstance().getEtcPath()
+ + File.separator + "version")));
+ if (about != null) {
+ ver = about.readLine();
+ }
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+ } finally {
+ if (about != null) {
+ try {
+ about.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+ }
+ }
+ }
+
+ if(ver == null) {
//BaseImage image = Platforms.getInstance().getImageList().get(0);
//about_version = image.getRelease();
//version = image.getVersion();
- about_version = "Not identified";
- version = "Standard";
+ about_version = "undefined";
+ version = "standard";
} else {
if (ver.indexOf('(') == -1) {
about_version = version = ver;
}
}
if(time.isEmpty() || time.contains(StringResource.PROP_KEY_BUILD_TIME)) {
- time = "Not identified";
+ time = "undefined";
}
if(gitVersion.isEmpty() || gitVersion.contains(StringResource.PROP_KEY_GIT_VERSION)) {
- gitVersion = "Not identified";
+ gitVersion = "undefined";
}
if(workspace.isEmpty()) {
- workspace = "Not identified";
+ workspace = "undefined";
}
contents = String.format("%-12s : %s\n%-12s : %s\n%-12s : %s\n%-12s : %s",
+ File.separator + StringResource.SWAP_IMAGE);
if (!src.exists()) {
EMLogger.getLogger().log(Level.WARNING,
- "Failed to create swap image.!\nFile does not exist :" + src.getPath()+ "\n");
+ "Failed to create swap image.!" + StringResource.NEW_LINE
+ + "File does not exist :" + src.getPath());
return;
}
dest.createNewFile();
} catch (IOException e1) {
EMLogger.getLogger().log(Level.WARNING,
- "Failed to create swap image!\n" + e1.getMessage() + "\n");
+ "Failed to create swap image!" + StringResource.NEW_LINE + e1.getMessage());
return;
}
long size = fcin.size();
fcin.transferTo(0, size, fcout);
} catch (FileNotFoundException e) {
- EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+ + StringResource.NEW_LINE + e.getMessage());
dest.delete();
} catch (IOException e) {
- EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+ + StringResource.NEW_LINE + e.getMessage());
dest.delete();
}finally {
try {
inputStream.close();
}
} catch (IOException e) {
- EMLogger.getLogger().log(Level.WARNING, e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, e.getMessage());
}
}
}
+ File.separator +s);
if (!src.exists()) {
EMLogger.getLogger().log(Level.WARNING,
- "Failed to create SD card image.!\nFile does not exist :" + src.getPath()+ "\n");
+ "Failed to create SD card image.!" + StringResource.NEW_LINE +"File does not exist :" + src.getPath());
continue;
}
dest.createNewFile();
} catch (IOException e1) {
EMLogger.getLogger().log(Level.WARNING,
- "Failed to create SD card image!\n" + e1.getMessage() + "\n");
+ "Failed to create SD card image!" + StringResource.NEW_LINE + e1.getMessage());
continue;
}
long size = fcin.size();
fcin.transferTo(0, size, fcout);
} catch (FileNotFoundException e) {
- EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+ + StringResource.NEW_LINE + e.getMessage());
dest.delete();
continue;
} catch (IOException e) {
- EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+ + StringResource.NEW_LINE + e.getMessage());
dest.delete();
continue;
}finally {
inputStream.close();
}
} catch (IOException e) {
- EMLogger.getLogger().log(Level.WARNING, e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.WARNING, e.getMessage());
}
}
}
work.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
- EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage());
}
/*
while(work.isAlive()) {
process = pb.start();
process.waitFor();
exitValue = process.exitValue();
- EMLogger.getLogger().log(Level.INFO, "Check-hax.exe's exit value : " + exitValue + "\n");
+ EMLogger.getLogger().log(Level.INFO, "Check-hax.exe's exit value : " + exitValue);
} catch (IOException e) {
- EMLogger.getLogger().log(Level.INFO, "IOException" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.INFO, "IOException" + e.getMessage());
} catch (InterruptedException e) {
- EMLogger.getLogger().log(Level.INFO, "InterruptedException" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.INFO, "InterruptedException" + e.getMessage());
} catch (Exception e) {
- EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+ EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage());
}
if(exitValue == 0) {
private final static String platform_suffix = File.separator + "platforms";
private final static String images_suffix = File.separator + "emulator-images";
private final static String resource_suffix = File.separator + "emulator-resources";
- private final static String template_suffix = File.separator + "model-templates";
+ private final static String model_template_suffix = File.separator + "model-templates";
private final static String skin_suffix = File.separator + "skins";
private final static String default_suffix = File.separator + "default";
private final static String addons_suffix = File.separator + "add-ons";
// private final static String x86_extension = ".x86";
// private final static String arm_extension = ".arm";
+ final static String etc_suffix = File.separator + "etc";
private final static String bios_suffix = File.separator + "bios";
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 sdkpath_suffix = File.separator + "tizensdkpath";
+ private final static String sdkdata_suffix = File.separator + "tizen-sdk-data";
+ private final static String win_sdb_exec = File.separator + "sdb.exe";
+ private final static String sdb_exec = File.separator + "sdb";
+
+ private final static String storages_suffix = File.separator + "storages";
+ private final static String sdcard_suffix = File.separator + "sdcard";
+ private final static String template_suffix = File.separator + "templates";
+
private static String currentPath;
private static String sdkPath = null;
private static String platformsPath;
// Emulator
private static String binPath;
+ private static String etcPath;
private static String dataPath;
private static String skinPath;
private static String templatePath;
}
}
}
+
if (tizenSDKDataPath != null && !tizenSDKDataPath.equals("")) {
- f = new File(tizenSDKDataPath + File.separator + "tizensdkpath");
+ f = new File(tizenSDKDataPath + sdkpath_suffix);
} else {
String home = System.getProperty("user.home");
- f = new File(home + File.separator + "tizen-sdk-data" + File.separator + "tizensdkpath");
+ f = new File(home + sdkdata_suffix + sdkpath_suffix);
}
if (f.exists()) {
addonsSkinPath = resource_suffix + skin_suffix + addons_suffix;
defaultImagePath = images_suffix + default_suffix;
addonsImagePath = images_suffix + addons_suffix;
- defaultTemplatePath = resource_suffix + template_suffix + default_suffix;
+ defaultTemplatePath = resource_suffix + model_template_suffix + default_suffix;
// SDB path
{
String sdb_suffix;
if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
- sdb_suffix = File.separator + "sdb.exe";
+ sdb_suffix = win_sdb_exec;
} else {
- sdb_suffix = File.separator + "sdb";
+ sdb_suffix = sdb_exec;
}
sdbPath = toolsPath + sdb_suffix;
}
binPath = currentPath;
+ etcPath = emulatorPath + etc_suffix;
dataPath = emulatorPath + data_suffix;
kernelPath = dataPath + kernel_suffix;
biosPath = dataPath + bios_suffix;
- sdcardPath = emulatorPath + File.separator + "storages" + File.separator + "sdcard";
- baseSwapPath = emulatorPath + File.separator + "storages" + swap_suffix;
+ sdcardPath = emulatorPath + storages_suffix + sdcard_suffix;
+ baseSwapPath = emulatorPath + storages_suffix + swap_suffix;
skinPath = emulatorPath + skin_suffix;
- templatePath = emulatorPath + File.separator + "templates";
+ templatePath = emulatorPath + template_suffix;
workspacePath = EmulatorVMs.getInstance().getVMsBaseDirectory();
vmsPath = EmulatorVMs.getInstance().getVMsConfigDirectory();
public String getDataSkinPath() {
return dataSkinPath;
}
+
+ public String getEtcPath() {
+ return etcPath;
+ }
}
public static final String SWAP_IMAGE = "swap.img";
public static final String PROPERTY_XML_NAME = "vm_config.xml";
+
+ public static final String NEW_LINE = System.getProperty("line.separator");
}
private static int height = 290; // 180 + 110
static {
About.initAboutContents();
- textContents = "\n" +
+ textContents = StringResource.NEW_LINE +
"Tizen SDK" +
- "\n\n" +
+ StringResource.NEW_LINE + StringResource.NEW_LINE +
"Version : " + About.getInstance().getAboutVersion() +
- "\n" +
+ StringResource.NEW_LINE +
"Build id : " + About.getInstance().getBuildTime();
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.tizen.emulator.manager.image.BaseImage;
public void launchVM() throws VMsWorkerException {
if(isRunningNow()) {
- throw new VMsWorkerException("Can not execute this VM.\n" +
- "The same name is running now.");
+ throw new VMsWorkerException("Can not execute this VM."
+ + StringResource.NEW_LINE
+ + "The same name is running now.");
}
launcher.launch(property);
}
public void modifyVM(VMPropertyValue oldVM, VMPropertyValue newVM) throws VMsWorkerException {
if(EmulatorManager.isConsoleMode() && property.getWorker().isRunningNow()) {
- throw new VMsWorkerException("Not allowed to modify active VMs\n" + "[" + property.getName() + "] is running now...");
+ throw new VMsWorkerException("Not allowed to modify active VMs"
+ + StringResource.NEW_LINE
+ + "[" + property.getName() + "] is running now...");
}
Modifier.modify(property, oldVM, newVM);
}
worker = new WorkerThread(proc);
worker.start();
if (EmulatorManager.isConsoleMode()) {
- System.out.println("Wait....while creating base image.\n"
+ System.out.println("Wait....while creating base image." + StringResource.NEW_LINE
+ "This task can take about 30 ~ 60 seconds");
synchronized(worker) {
try {
e.printStackTrace();
}
if (worker.isError()) {
- throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!\n"
+ throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!"
+ + StringResource.NEW_LINE
+ "You can get more information in log file ("
+ FilePath.getInstance().getTizenVmsPath() + File.separator + "emulator-manager)");
}
e.printStackTrace();
}
if (worker.isError()) {
- throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!\n"
+ throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!"
+ + StringResource.NEW_LINE
+ "You can get more information in log file ("
+ FilePath.getInstance().getTizenVmsPath() + File.separator + "emulator-manager)");
}
String targetPath = property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue();
if (basePath == null || basePath.isEmpty() || targetPath == null || targetPath.isEmpty()) {
- throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName());
+ throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE +
+ "Emulator Name : " + property.getName());
}
try {
Creator.createInitialVMImage(basePath, targetPath);
} catch (VMsCreatorException e) {
- throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName()
- +"\n" + e.getMessage());
+ throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE
+ + "Emulator Name : " + property.getName()
+ + StringResource.NEW_LINE + e.getMessage());
}
if (property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage() != null) {
return;
}
if (swapTargetPath == null || swapTargetPath.isEmpty()) {
- throw new VMsWorkerException("Fail to reset Emulator beacause swap path is empty." +
- "\nEmulator Name : " + property.getName());
+ throw new VMsWorkerException("Fail to reset Emulator beacause swap path is empty." + StringResource.NEW_LINE +
+ "Emulator Name : " + property.getName());
}
try {
Creator.createSwapImage(swapBasePath, swapTargetPath);
} catch (VMsCreatorException e) {
- throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName()
- +"\n" + e.getMessage());
+ throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE
+ + "Emulator Name : " + property.getName()
+ + StringResource.NEW_LINE + e.getMessage());
}
}
}
logger.log(Level.SEVERE, err.getMessage());
if (!EmulatorManager.isConsoleMode()) {
MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
- msg.openWarningDialog("Error occured while checking if the same VM .\n" +
- err.getMessage());
+ msg.openWarningDialog("Error occured while checking if the same VM ."
+ + StringResource.NEW_LINE
+ + err.getMessage());
}
return false;