From 480a45ff6cddc58ef4f8654daeee138fc88e7c35 Mon Sep 17 00:00:00 2001 From: jihye kim Date: Tue, 3 Jul 2012 15:40:26 +0900 Subject: [PATCH] [Title] add option(hardware gl acceleration) and add bolierplate [Type] Enhancement [Module] emulator manager [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- .../manager/vms/xml/BaseInformationType.java | 4 +- .../tizen/emulator/manager/vms/xml/DeviceType.java | 4 +- .../manager/vms/xml/DiskImageFormatType.java | 4 +- .../emulator/manager/vms/xml/DisplayType.java | 4 +- .../manager/vms/xml/EmulatorConfiguration.java | 4 +- .../emulator/manager/vms/xml/ObjectFactory.java | 92 +++++++++++----------- .../tizen/emulator/manager/vms/xml/RamType.java | 4 +- .../tizen/emulator/manager/vms/xml/SkinType.java | 4 +- .../tizen/emulator/manager/vms/xml/TouchType.java | 4 +- .../emulator/manager/vms/xml/UsabilityType.java | 23 +++++- .../emulator/manager/vms/xml/package-info.java | 4 +- package/pkginfo.manifest | 4 +- src/org/tizen/emulator/manager/console/Action.java | 30 +++++++ .../tizen/emulator/manager/console/ActionList.java | 47 +++++++++-- .../manager/console/CommandLineProcessor.java | 29 +++++++ .../emulator/manager/console/ConsoleCreateVM.java | 44 +++++++++++ .../emulator/manager/console/ConsoleException.java | 29 +++++++ .../emulator/manager/console/ConsoleModifyVM.java | 30 +++++++ .../emulator/manager/console/ConsoleProcessor.java | 34 +++++++- .../tizen/emulator/manager/image/BaseImage.java | 29 +++++++ .../emulator/manager/image/EmulatorImages.java | 29 +++++++ src/org/tizen/emulator/manager/tool/About.java | 29 +++++++ .../tizen/emulator/manager/tool/CheckSDCard.java | 29 +++++++ .../emulator/manager/tool/CheckVirtualization.java | 29 +++++++ .../emulator/manager/ui/detail/VMPropertyView.java | 81 +++++++++++++------ src/org/tizen/emulator/manager/vms/Creator.java | 15 ++-- src/org/tizen/emulator/manager/vms/Launcher.java | 18 +++-- src/org/tizen/emulator/manager/vms/Modifier.java | 9 ++- src/org/tizen/emulator/manager/vms/RAM_SIZE.java | 29 +++++++ src/org/tizen/emulator/manager/vms/RESOLUTION.java | 29 +++++++ .../emulator/manager/vms/VMPropertyValue.java | 11 +++ xsd/em.xsd | 2 + 32 files changed, 622 insertions(+), 115 deletions(-) diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java index 6bc60ae..c6f1e8e 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java index aea64d7..5a267c0 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java index f41a6d6..479f789 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java index fccba72..3d34280 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java index bc812b2..653a47d 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java index 600fed9..0e3b42d 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // @@ -37,11 +37,11 @@ public class ObjectFactory { } /** - * Create an instance of {@link UsabilityType } + * Create an instance of {@link EmulatorConfiguration } * */ - public UsabilityType createUsabilityType() { - return new UsabilityType(); + public EmulatorConfiguration createEmulatorConfiguration() { + return new EmulatorConfiguration(); } /** @@ -53,67 +53,75 @@ public class ObjectFactory { } /** - * Create an instance of {@link DiskImageFormatType } + * Create an instance of {@link TouchType } * */ - public DiskImageFormatType createDiskImageFormatType() { - return new DiskImageFormatType(); + public TouchType createTouchType() { + return new TouchType(); } /** - * Create an instance of {@link BaseInformationType.DiskImage } + * Create an instance of {@link SkinType } * */ - public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() { - return new BaseInformationType.DiskImage(); + public SkinType createSkinType() { + return new SkinType(); } /** - * Create an instance of {@link UsabilityType.Logging } + * Create an instance of {@link DeviceType } * */ - public UsabilityType.Logging createUsabilityTypeLogging() { - return new UsabilityType.Logging(); + public DeviceType createDeviceType() { + return new DeviceType(); } /** - * Create an instance of {@link RamType.Size } + * Create an instance of {@link BaseInformationType.DiskImage } * */ - public RamType.Size createRamTypeSize() { - return new RamType.Size(); + public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() { + return new BaseInformationType.DiskImage(); } /** - * Create an instance of {@link EmulatorConfiguration } + * Create an instance of {@link DisplayType.Density } * */ - public EmulatorConfiguration createEmulatorConfiguration() { - return new EmulatorConfiguration(); + public DisplayType.Density createDisplayTypeDensity() { + return new DisplayType.Density(); } /** - * Create an instance of {@link UsabilityType.FileSharing } + * Create an instance of {@link UsabilityType.Logging } * */ - public UsabilityType.FileSharing createUsabilityTypeFileSharing() { - return new UsabilityType.FileSharing(); + public UsabilityType.Logging createUsabilityTypeLogging() { + return new UsabilityType.Logging(); } /** - * Create an instance of {@link DisplayType.Density } + * Create an instance of {@link UsabilityType } * */ - public DisplayType.Density createDisplayTypeDensity() { - return new DisplayType.Density(); + public UsabilityType createUsabilityType() { + return new UsabilityType(); } /** - * Create an instance of {@link SkinType } + * Create an instance of {@link DisplayType.Resolution } * */ - public SkinType createSkinType() { - return new SkinType(); + public DisplayType.Resolution createDisplayTypeResolution() { + return new DisplayType.Resolution(); + } + + /** + * Create an instance of {@link RamType.Size } + * + */ + public RamType.Size createRamTypeSize() { + return new RamType.Size(); } /** @@ -125,27 +133,27 @@ public class ObjectFactory { } /** - * Create an instance of {@link DeviceType } + * Create an instance of {@link DisplayType } * */ - public DeviceType createDeviceType() { - return new DeviceType(); + public DisplayType createDisplayType() { + return new DisplayType(); } /** - * Create an instance of {@link TouchType } + * Create an instance of {@link DiskImageFormatType } * */ - public TouchType createTouchType() { - return new TouchType(); + public DiskImageFormatType createDiskImageFormatType() { + return new DiskImageFormatType(); } /** - * Create an instance of {@link DisplayType.Resolution } + * Create an instance of {@link UsabilityType.FileSharing } * */ - public DisplayType.Resolution createDisplayTypeResolution() { - return new DisplayType.Resolution(); + public UsabilityType.FileSharing createUsabilityTypeFileSharing() { + return new UsabilityType.FileSharing(); } /** @@ -156,12 +164,4 @@ public class ObjectFactory { return new DisplayType.SkinPath(); } - /** - * Create an instance of {@link DisplayType } - * - */ - public DisplayType createDisplayType() { - return new DisplayType(); - } - } diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java index 230efc9..b5086ed 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java index cb25e71..fd0e5a0 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/TouchType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/TouchType.java index 28593d6..3c84d29 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/TouchType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/TouchType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java index efc43bc..ec359ec 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // @@ -60,6 +60,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; * </complexType> * </element> * <element name="hwVirtualization" type="{http://www.w3.org/2001/XMLSchema}boolean"/> + * <element name="hwGLAcceleration" type="{http://www.w3.org/2001/XMLSchema}boolean"/> * <element name="advancedOptions" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * </restriction> @@ -74,6 +75,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; "logging", "fileSharing", "hwVirtualization", + "hwGLAcceleration", "advancedOptions" }) public class UsabilityType { @@ -83,6 +85,7 @@ public class UsabilityType { @XmlElement(required = true) protected UsabilityType.FileSharing fileSharing; protected boolean hwVirtualization; + protected boolean hwGLAcceleration; protected String advancedOptions; /** @@ -150,6 +153,22 @@ public class UsabilityType { } /** + * Gets the value of the hwGLAcceleration property. + * + */ + public boolean isHwGLAcceleration() { + return hwGLAcceleration; + } + + /** + * Sets the value of the hwGLAcceleration property. + * + */ + public void setHwGLAcceleration(boolean value) { + this.hwGLAcceleration = value; + } + + /** * Gets the value of the advancedOptions property. * * @return diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java index 2c8828a..ec7b080 100644 --- a/jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java +++ b/jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.20 at 10:49:37 오전 KST +// Generated on: 2012.07.03 at 02:07:17 PM KST // @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tizen.org/em", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 4ee23b4..ce85ea7 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Package: emulator-manager -Version: 1.0.61 +Version: 1.0.62 OS: linux Build-host-os: linux Maintainer: Yeong-Kyoon Lee @@ -7,7 +7,7 @@ Source: emulator-manager Description: Tizen Emulator Manager Package: emulator-manager -Version: 1.0.61 +Version: 1.0.62 OS: windows Build-host-os: windows Maintainer: Yeong-Kyoon Lee diff --git a/src/org/tizen/emulator/manager/console/Action.java b/src/org/tizen/emulator/manager/console/Action.java index de07e7c..3b57866 100644 --- a/src/org/tizen/emulator/manager/console/Action.java +++ b/src/org/tizen/emulator/manager/console/Action.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.util.ArrayList; @@ -203,6 +232,7 @@ class Actions { public final static String OP_VIRTUALIZATION = "hw-virtualization"; public final static String OP_MAXTOUCH = "max-touch-point"; public final static String OP_ADDOPTION = "add-options"; + public final static String OP_GLACCELERATION = "hw-gl-acceleration"; } diff --git a/src/org/tizen/emulator/manager/console/ActionList.java b/src/org/tizen/emulator/manager/console/ActionList.java index f74016b..588b3a1 100644 --- a/src/org/tizen/emulator/manager/console/ActionList.java +++ b/src/org/tizen/emulator/manager/console/ActionList.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.io.File; @@ -325,6 +354,9 @@ class Create extends Action { commandList.add(new Command("v", Actions.OP_VIRTUALIZATION, "Select enable or disable hardware virtualization.(yes | no)", property.isHWVirtualization ? "yes" : "no", false, true)); + commandList.add(new Command("g", Actions.OP_GLACCELERATION, + "Select enable or disable hardware GL acceleration.(yes | no)", + property.isGLAcceleration ? "yes" : "no", false, true)); commandList.add(new Command("t", Actions.OP_MAXTOUCH, "Set count of multi touch point.(1 or 2)", Integer.toString(property.maxTouchCount), false, true)); commandList.add(new Command("a", Actions.OP_ADDOPTION, @@ -379,6 +411,9 @@ class Modify extends Action { commandList.add(new Command("v", Actions.OP_VIRTUALIZATION, "Select enable or disable hardware virtualization.(yes | no)", property.isHWVirtualization ? "yes" : "no", false, true)); + commandList.add(new Command("g", Actions.OP_GLACCELERATION, + "Select enable or disable hardware GL acceleration.(yes | no)", + property.isGLAcceleration ? "yes" : "no", false, true)); commandList.add(new Command("t", Actions.OP_MAXTOUCH, "Set count of multi touch point.(1 or 2)", Integer.toString(property.maxTouchCount), false, true)); commandList.add(new Command("a", Actions.OP_ADDOPTION, @@ -462,12 +497,6 @@ class Launch extends Action { } } - if(prop.getWorker().isRunningNow()) { - System.out.println("Error: Can not execute this VM.\n" + - "The same name is running now."); - return false; - } - Launcher launcher = new Launcher(); List cmd = launcher.getLaunchCommand(prop, path); @@ -482,6 +511,12 @@ class Launch extends Action { } if (!isTest) { + if(prop.getWorker().isRunningNow()) { + System.out.println("Error: Can not execute this VM.\n" + + "The same name is running now."); + return false; + } + if (launcher.launch(cmd)) { System.out.println("Success to start emulator."); } else { diff --git a/src/org/tizen/emulator/manager/console/CommandLineProcessor.java b/src/org/tizen/emulator/manager/console/CommandLineProcessor.java index 29be70a..174353e 100644 --- a/src/org/tizen/emulator/manager/console/CommandLineProcessor.java +++ b/src/org/tizen/emulator/manager/console/CommandLineProcessor.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.util.logging.Level; diff --git a/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java b/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java index a619ae9..a00a7b2 100644 --- a/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java +++ b/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.io.File; @@ -170,6 +199,9 @@ public class ConsoleCreateVM { else if (c.getLongName() == Actions.OP_VIRTUALIZATION) { prop.isHWVirtualization = checkHWVirtualization(c.getCurrentValue()); } + else if (c.getLongName() == Actions.OP_GLACCELERATION) { + prop.isGLAcceleration = checkGLAcceleration(c.getCurrentValue()); + } else if (c.getLongName() == Actions.OP_MAXTOUCH) { int i = Integer.valueOf(c.getCurrentValue()); if (i != 1 && i != 2) { @@ -183,6 +215,18 @@ public class ConsoleCreateVM { } } + private boolean checkGLAcceleration(String currentValue) throws ConsoleException{ + String value = currentValue.toLowerCase(); + if (value.equals("true")) { + return true; + } else if (value.equals("false")) { + return false; + } else { + throw new ConsoleException("Please, check your input (" + currentValue + ") " + + "Avaliable value is true or false."); + } + } + private boolean checkHWVirtualization(String currentValue) throws ConsoleException { String value = currentValue.toLowerCase(); if (value.equals("true")) { diff --git a/src/org/tizen/emulator/manager/console/ConsoleException.java b/src/org/tizen/emulator/manager/console/ConsoleException.java index d4a426b..0dd4df3 100644 --- a/src/org/tizen/emulator/manager/console/ConsoleException.java +++ b/src/org/tizen/emulator/manager/console/ConsoleException.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; public class ConsoleException extends Exception { diff --git a/src/org/tizen/emulator/manager/console/ConsoleModifyVM.java b/src/org/tizen/emulator/manager/console/ConsoleModifyVM.java index 8ba8999..34c15bf 100644 --- a/src/org/tizen/emulator/manager/console/ConsoleModifyVM.java +++ b/src/org/tizen/emulator/manager/console/ConsoleModifyVM.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.util.ArrayList; @@ -42,6 +71,7 @@ public class ConsoleModifyVM { // check resolution because can not change dpi if (c.getLongName().equals(Actions.OP_RESOLUTION)) { + System.out.println("Can not change dpi..."); newVM.dpi = oldVM.dpi; } } diff --git a/src/org/tizen/emulator/manager/console/ConsoleProcessor.java b/src/org/tizen/emulator/manager/console/ConsoleProcessor.java index af6cac9..779b67b 100644 --- a/src/org/tizen/emulator/manager/console/ConsoleProcessor.java +++ b/src/org/tizen/emulator/manager/console/ConsoleProcessor.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.console; import java.util.ArrayList; @@ -52,7 +81,10 @@ public class ConsoleProcessor { str+= String.format("\t%-17s : %s\n", "HW Virtualization", (prop.getConfiguration().getUsability().isHwVirtualization() ? "TRUE" : "FALSE")); - + + str+= String.format("\t%-17s : %s\n", "HW GL Acceleration", + (prop.getConfiguration().getUsability().isHwGLAcceleration() ? "TRUE" : "FALSE")); + if (prop.getConfiguration().getUsability().getAdvancedOptions() != null) { str+= String.format("\t%-17s : %s\n", "Advanced Options: ", prop.getConfiguration().getUsability().getAdvancedOptions()); } diff --git a/src/org/tizen/emulator/manager/image/BaseImage.java b/src/org/tizen/emulator/manager/image/BaseImage.java index d2b9246..9906f63 100644 --- a/src/org/tizen/emulator/manager/image/BaseImage.java +++ b/src/org/tizen/emulator/manager/image/BaseImage.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.image; public class BaseImage { diff --git a/src/org/tizen/emulator/manager/image/EmulatorImages.java b/src/org/tizen/emulator/manager/image/EmulatorImages.java index 2b3baeb..a2ddb37 100644 --- a/src/org/tizen/emulator/manager/image/EmulatorImages.java +++ b/src/org/tizen/emulator/manager/image/EmulatorImages.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.image; import java.io.File; diff --git a/src/org/tizen/emulator/manager/tool/About.java b/src/org/tizen/emulator/manager/tool/About.java index 88c0e6e..a9cf4cf 100644 --- a/src/org/tizen/emulator/manager/tool/About.java +++ b/src/org/tizen/emulator/manager/tool/About.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.tool; import java.io.IOException; diff --git a/src/org/tizen/emulator/manager/tool/CheckSDCard.java b/src/org/tizen/emulator/manager/tool/CheckSDCard.java index c35305f..093218c 100644 --- a/src/org/tizen/emulator/manager/tool/CheckSDCard.java +++ b/src/org/tizen/emulator/manager/tool/CheckSDCard.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.tool; import java.io.File; diff --git a/src/org/tizen/emulator/manager/tool/CheckVirtualization.java b/src/org/tizen/emulator/manager/tool/CheckVirtualization.java index 20f8e1b..b0def22 100644 --- a/src/org/tizen/emulator/manager/tool/CheckVirtualization.java +++ b/src/org/tizen/emulator/manager/tool/CheckVirtualization.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.tool; import java.io.File; diff --git a/src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java b/src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java index 87d8792..0c0861c 100644 --- a/src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java +++ b/src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java @@ -50,8 +50,6 @@ import org.eclipse.swt.widgets.Spinner; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; -import org.tizen.emulator.manager.EmulatorManager; -import org.tizen.emulator.manager.EmulatorManager.ManagerModeType; import org.tizen.emulator.manager.tool.CheckVirtualization; import org.tizen.emulator.manager.tool.StringResource; import org.tizen.emulator.manager.ui.MessageDialog; @@ -68,7 +66,8 @@ enum CItem{ ImageName("Name"), ImageNameInfo(""), BaseImage("BaseImage"), Resolution("Display Resolution "), Density("Display Density"), /*SkinType("Front Key Type"),*/ RAMSize("RAM Size"), - ShareType("File Sharing"), SharePath("File Sharing Path"), HWVirtual("HW Virtualization"), + ShareType("File Sharing"), SharePath("File Sharing Path"), + HWVirtual("HW Virtualization"), GLAccele("HW GL Acceleration "), TouchType("Max Touch Point"); private String value; @@ -84,7 +83,8 @@ enum DItem{ ImageName("Name"), BaseImage("BaseImage"), Resolution("Display Resolution "), Density("Display Density"), /*SkinType("Front Key Type"),*/ RAMSize("RAM Size"), - ShareType("File Sharing"), SharePath("File Sharing Path"), HWVirtual("HW Virtualization"), + ShareType("File Sharing"), SharePath("File Sharing Path"), + HWVirtual("HW Virtualization"), GLAccele("HW GL Acceleration "), TouchType("Max Touch Point"), Dummy(""); private String value; @@ -107,7 +107,7 @@ public class VMPropertyView { private VMPropertyValue newValue = null; private boolean isCreateMode = true; - private ManagerModeType managerMode; + //private ManagerModeType managerMode; public VMPropertyView(Table table) { this.helper = new VMCreateHelper(); @@ -116,7 +116,7 @@ public class VMPropertyView { this.image = ResourceRegistry.getImage(ImageName.FOLDER); makeItemList(); - this.managerMode = EmulatorManager.getInstance().getManagerMode(); + //this.managerMode = EmulatorManager.getInstance().getManagerMode(); } private void makeItemList() { @@ -135,9 +135,11 @@ public class VMPropertyView { widget.itemList.get(citem.ordinal()).setText(0, citem.toString()); } + /* if (managerMode.equals(ManagerModeType.INHOUSE_MODE) == false) { widget.itemList.get(CItem.TouchType.ordinal()).setText(0, ""); } + */ } private void settingDetailColumn() { @@ -147,9 +149,11 @@ public class VMPropertyView { widget.itemList.get(ditem.ordinal()).setText(0, ditem.toString()); } + /* if (managerMode.equals(ManagerModeType.INHOUSE_MODE) == false) { widget.itemList.get(DItem.TouchType.ordinal()).setText(0, ""); } + */ } public void detailView(VMsProperty property) { @@ -181,9 +185,9 @@ public class VMPropertyView { widget.itemList.get(DItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && CheckVirtualization.getInstance().isSupportVirtualization() ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED); - if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) { - widget.itemList.get(DItem.TouchType.ordinal()).setText(1, String.valueOf(oldValue.maxTouchCount)); - } + widget.itemList.get(DItem.GLAccele.ordinal()).setText(1, oldValue.isGLAcceleration ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED); + + widget.itemList.get(DItem.TouchType.ordinal()).setText(1, String.valueOf(oldValue.maxTouchCount)); } public void createDetailView(boolean isDefaultImage) { @@ -210,9 +214,9 @@ public class VMPropertyView { widget.itemList.get(CItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && CheckVirtualization.getInstance().isSupportVirtualization() ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED); - if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) { - widget.itemList.get(CItem.TouchType.ordinal()).setText(1, String.valueOf(oldValue.maxTouchCount)); - } + widget.itemList.get(CItem.GLAccele.ordinal()).setText(1, oldValue.isGLAcceleration ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED); + + widget.itemList.get(CItem.TouchType.ordinal()).setText(1, String.valueOf(oldValue.maxTouchCount)); } public void modifyView(Button confirm) { @@ -225,6 +229,7 @@ public class VMPropertyView { createRAMSizeArea(table); createFileShareArea(table); createHWVirtualArea(table); + createGLAcceleArea(table); createTouchArea(table); settingModifyTableEditor(); @@ -240,6 +245,7 @@ public class VMPropertyView { createRAMSizeArea(table); createFileShareArea(table); createHWVirtualArea(table); + createGLAcceleArea(table); createTouchArea(table); settingCreateTableEditor(); @@ -290,11 +296,13 @@ public class VMPropertyView { editor.grabHorizontal = true; editor.setEditor(widget.HWVirtualCombo, widget.itemList.get(DItem.HWVirtual.ordinal()), 1); - if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) { - editor = new TableEditor(table); - editor.grabHorizontal = true; - editor.setEditor(widget.TouchSpinner, widget.itemList.get(DItem.TouchType.ordinal()), 1); - } + editor = new TableEditor(table); + editor.grabHorizontal = true; + editor.setEditor(widget.GLAcceleCombo, widget.itemList.get(DItem.GLAccele.ordinal()), 1); + + editor = new TableEditor(table); + editor.grabHorizontal = true; + editor.setEditor(widget.TouchSpinner, widget.itemList.get(DItem.TouchType.ordinal()), 1); } private void settingCreateTableEditor() { @@ -340,11 +348,13 @@ public class VMPropertyView { editor.grabHorizontal = true; editor.setEditor(widget.HWVirtualCombo, widget.itemList.get(CItem.HWVirtual.ordinal()), 1); - if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) { - editor = new TableEditor(table); - editor.grabHorizontal = true; - editor.setEditor(widget.TouchSpinner, widget.itemList.get(CItem.TouchType.ordinal()), 1); - } + editor = new TableEditor(table); + editor.grabHorizontal = true; + editor.setEditor(widget.GLAcceleCombo, widget.itemList.get(CItem.GLAccele.ordinal()), 1); + + editor = new TableEditor(table); + editor.grabHorizontal = true; + editor.setEditor(widget.TouchSpinner, widget.itemList.get(CItem.TouchType.ordinal()), 1); } public static final int MAX_NAME_LEN = 20; @@ -659,6 +669,31 @@ public class VMPropertyView { }); } + private void createGLAcceleArea(final Table table) { + widget.GLAcceleCombo = helper.makeCombo(table); + helper.addComboItem(widget.GLAcceleCombo, SupportType.getInstance().getList()); + widget.GLAcceleCombo.select(oldValue.isGLAcceleration ? 0 : 1); + + createGLAccelListener(); + } + + private void createGLAccelListener() { + widget.GLAcceleCombo.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + int i = widget.GLAcceleCombo.getSelectionIndex(); + newValue.isGLAcceleration = i == 0 ? true : false; + + if (!isCreateMode) { + checkModifyState(); + } + } + @Override + public void widgetDefaultSelected(SelectionEvent e) { + } + }); + } + private void createTouchArea(Table table) { widget.TouchSpinner = new Spinner(table, SWT.BORDER); widget.TouchSpinner.setValues(oldValue.maxTouchCount, 1, 2, 0, 1, 1); @@ -734,6 +769,7 @@ class VMViewWidget { public DirectoryDialog shareFileDD; public Combo HWVirtualCombo; + public Combo GLAcceleCombo; public Spinner TouchSpinner; public Button cancelButton; @@ -752,6 +788,7 @@ class VMViewWidget { shareTypeCombo.dispose(); selectShareFolderButton.dispose(); HWVirtualCombo.dispose(); + GLAcceleCombo.dispose(); TouchSpinner.dispose(); } } diff --git a/src/org/tizen/emulator/manager/vms/Creator.java b/src/org/tizen/emulator/manager/vms/Creator.java index 9a133b7..2fb9be5 100644 --- a/src/org/tizen/emulator/manager/vms/Creator.java +++ b/src/org/tizen/emulator/manager/vms/Creator.java @@ -38,8 +38,6 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; -import org.tizen.emulator.manager.EmulatorManager; -import org.tizen.emulator.manager.EmulatorManager.ManagerModeType; import org.tizen.emulator.manager.logging.EMLogger; import org.tizen.emulator.manager.tool.About; import org.tizen.emulator.manager.tool.FileIO; @@ -75,7 +73,7 @@ public class Creator { createFileShare(); createDisplay(); createRam(); - createHWVirtualization(); + createUsability(); } catch(VMsCreatorException e) { deleteFolder(folder); @@ -299,7 +297,7 @@ public class Creator { private void createRam() {} - private void createHWVirtualization() {} + private void createUsability() {} private void settingProperty() { ObjectFactory factory = EmulatorVMs.getInstance().getObjectFactory(); @@ -339,6 +337,7 @@ public class Creator { ec.getUsability().setLogging(factory.createUsabilityTypeLogging()); ec.getUsability().getLogging().setLevel("NONE"); ec.getUsability().setHwVirtualization(newVM.isHWVirtualization); + ec.getUsability().setHwGLAcceleration(newVM.isGLAcceleration); ec.getUsability().setFileSharing(factory.createUsabilityTypeFileSharing()); if (!newVM.fileSharePath.isEmpty()) { @@ -362,10 +361,10 @@ public class Creator { ec.getDevice().getRAM().getSize().setUnit("MiB"); ec.getDevice().getRAM().getSize().setValue(newVM.ramSize); - if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { - ec.getDevice().setTouch(factory.createTouchType()); - ec.getDevice().getTouch().setMaxTouchPoint(newVM.maxTouchCount); - } + //if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { + ec.getDevice().setTouch(factory.createTouchType()); + ec.getDevice().getTouch().setMaxTouchPoint(newVM.maxTouchCount); + //} if (newVM.addOptions != null) { ec.getUsability().setAdvancedOptions(newVM.addOptions); diff --git a/src/org/tizen/emulator/manager/vms/Launcher.java b/src/org/tizen/emulator/manager/vms/Launcher.java index c012f64..b368ad4 100644 --- a/src/org/tizen/emulator/manager/vms/Launcher.java +++ b/src/org/tizen/emulator/manager/vms/Launcher.java @@ -42,7 +42,6 @@ import java.util.logging.Logger; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.tizen.emulator.manager.EmulatorManager; -import org.tizen.emulator.manager.EmulatorManager.ManagerModeType; import org.tizen.emulator.manager.logging.EMLogger; import org.tizen.emulator.manager.tool.CheckVirtualization; import org.tizen.emulator.manager.tool.FileIO; @@ -262,13 +261,18 @@ public class Launcher { cmd.add(hwVirtualization); } - if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { - TouchType touchType = property.getConfiguration().getDevice().getTouch(); - if (touchType != null) { - cmd.add("-max-touch-point"); - cmd.add("" + touchType.getMaxTouchPoint()); - } + // add hw gl acceleration + if (property.getConfiguration().getUsability().isHwGLAcceleration()) { + cmd.add("-enable-gl"); + } + + //if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { + TouchType touchType = property.getConfiguration().getDevice().getTouch(); + if (touchType != null) { + cmd.add("-max-touch-point"); + cmd.add("" + touchType.getMaxTouchPoint()); } + //} /* append user added options if exists */ String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions(); diff --git a/src/org/tizen/emulator/manager/vms/Modifier.java b/src/org/tizen/emulator/manager/vms/Modifier.java index dfcc194..9f96ee0 100644 --- a/src/org/tizen/emulator/manager/vms/Modifier.java +++ b/src/org/tizen/emulator/manager/vms/Modifier.java @@ -32,8 +32,6 @@ package org.tizen.emulator.manager.vms; import java.io.File; -import org.tizen.emulator.manager.EmulatorManager; -import org.tizen.emulator.manager.EmulatorManager.ManagerModeType; import org.tizen.emulator.manager.tool.FileIO; import org.tizen.emulator.manager.vms.xml.EmulatorConfiguration; import org.tizen.emulator.manager.vms.xml.TouchType; @@ -93,11 +91,16 @@ public class Modifier { property.getConfiguration().getUsability().setHwVirtualization(newVM.isHWVirtualization); } + if (newVM.isGLAcceleration != oldVM.isGLAcceleration) { + property.getConfiguration().getUsability().setHwGLAcceleration(newVM.isGLAcceleration); + } + TouchType touchType = property.getConfiguration().getDevice().getTouch(); if (newVM.maxTouchCount != oldVM.maxTouchCount) { if (touchType != null) { touchType.setMaxTouchPoint(newVM.maxTouchCount); - } else if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { + } else { + //else if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) { //touchType == null EmulatorConfiguration ec = property.getConfiguration(); ec.getDevice().setTouch(EmulatorVMs.getInstance().getObjectFactory().createTouchType()); diff --git a/src/org/tizen/emulator/manager/vms/RAM_SIZE.java b/src/org/tizen/emulator/manager/vms/RAM_SIZE.java index 0617a2a..482dee7 100644 --- a/src/org/tizen/emulator/manager/vms/RAM_SIZE.java +++ b/src/org/tizen/emulator/manager/vms/RAM_SIZE.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.vms; public enum RAM_SIZE { diff --git a/src/org/tizen/emulator/manager/vms/RESOLUTION.java b/src/org/tizen/emulator/manager/vms/RESOLUTION.java index 4e39298..0a3b1d9 100644 --- a/src/org/tizen/emulator/manager/vms/RESOLUTION.java +++ b/src/org/tizen/emulator/manager/vms/RESOLUTION.java @@ -1,3 +1,32 @@ +/* + * Emulator Manager + * + * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * SeokYeon Hwang + * JiHye Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + package org.tizen.emulator.manager.vms; public enum RESOLUTION { diff --git a/src/org/tizen/emulator/manager/vms/VMPropertyValue.java b/src/org/tizen/emulator/manager/vms/VMPropertyValue.java index 046a5e5..0876472 100644 --- a/src/org/tizen/emulator/manager/vms/VMPropertyValue.java +++ b/src/org/tizen/emulator/manager/vms/VMPropertyValue.java @@ -61,6 +61,7 @@ public class VMPropertyValue implements Cloneable { public String fileSharePathName; public boolean isHWVirtualization; + public boolean isGLAcceleration; public int maxTouchCount; public String addOptions; @@ -110,6 +111,7 @@ public class VMPropertyValue implements Cloneable { } ramSize = property.getConfiguration().getDevice().getRAM().getSize().getValue(); isHWVirtualization = property.getConfiguration().getUsability().isHwVirtualization(); + isGLAcceleration = property.getConfiguration().getUsability().isHwGLAcceleration(); TouchType touchType = property.getConfiguration().getDevice().getTouch(); if (touchType != null) { @@ -144,6 +146,8 @@ public class VMPropertyValue implements Cloneable { dest.fileSharePath = this.fileSharePath; dest.fileSharePathName = this.fileSharePathName; dest.isHWVirtualization = this.isHWVirtualization; + dest.isGLAcceleration = this.isGLAcceleration; + dest.maxTouchCount = this.maxTouchCount; dest.addOptions = this.addOptions; @@ -177,6 +181,11 @@ public class VMPropertyValue implements Cloneable { if (this.isHWVirtualization != dest.isHWVirtualization) { return false; } + + if (this.isGLAcceleration != dest.isGLAcceleration) { + return false; + } + if (this.maxTouchCount != dest.maxTouchCount) { return false; } @@ -216,6 +225,8 @@ public class VMPropertyValue implements Cloneable { value.fileSharePathName = "( None )"; value.isHWVirtualization = true; + value.isGLAcceleration = false; + value.maxTouchCount = 2; value.addOptions = null; diff --git a/xsd/em.xsd b/xsd/em.xsd index ab10e86..731077a 100644 --- a/xsd/em.xsd +++ b/xsd/em.xsd @@ -95,6 +95,8 @@ + -- 2.7.4