From 45083c1f0e67cb87e37a9a2063a378b9fc3edf6a Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Mon, 2 Nov 2015 21:43:20 +0900 Subject: build: add "Item-Factory-v2" to manifest in jar. - (For new UI) preparation for ItemListFactoryV2. Change-Id: Ie64fb6002046d817dbc1060ccc76cc4b97a98e06 Signed-off-by: minkee.lee --- plugins/mobile/build.xml | 2 ++ plugins/tv/build.xml | 2 ++ plugins/wearable/build.xml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/plugins/mobile/build.xml b/plugins/mobile/build.xml index 569a490..caed0c0 100644 --- a/plugins/mobile/build.xml +++ b/plugins/mobile/build.xml @@ -8,6 +8,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/plugins/tv/build.xml b/plugins/tv/build.xml index 4dfc933..112c1b5 100644 --- a/plugins/tv/build.xml +++ b/plugins/tv/build.xml @@ -8,6 +8,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/plugins/wearable/build.xml b/plugins/wearable/build.xml index 9fd8dd3..7fa283d 100644 --- a/plugins/wearable/build.xml +++ b/plugins/wearable/build.xml @@ -8,6 +8,7 @@ + @@ -45,6 +46,7 @@ + -- cgit v1.2.3 From 28fd235b955328ba22f3ad8e6fb06696ea3c536e Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Wed, 4 Nov 2015 20:49:37 +0900 Subject: build: add "Option-Factory-v2" to manifest in jar. - (For new UI) preparation for OptionFactoryV2. Change-Id: I37e9139970a517b5627c065c2010ea12db8e5782 Signed-off-by: minkee.lee --- plugins/mobile/build.xml | 2 ++ plugins/tv/build.xml | 2 ++ plugins/wearable/build.xml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/plugins/mobile/build.xml b/plugins/mobile/build.xml index caed0c0..436c376 100644 --- a/plugins/mobile/build.xml +++ b/plugins/mobile/build.xml @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + diff --git a/plugins/tv/build.xml b/plugins/tv/build.xml index 112c1b5..34804638 100644 --- a/plugins/tv/build.xml +++ b/plugins/tv/build.xml @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + diff --git a/plugins/wearable/build.xml b/plugins/wearable/build.xml index 7fa283d..a95e83b 100644 --- a/plugins/wearable/build.xml +++ b/plugins/wearable/build.xml @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + -- cgit v1.2.3 From 7cbf4714dec8f5b804d17fb6fbaabfe6bad97771 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Mon, 9 Nov 2015 23:19:54 +0900 Subject: template: add new template xml Add new template file for UI and options. ItemListFactoryV2 makes property UI and OptionFactoryV2 makes vm-launch argument. Change-Id: I2954289d3eeacb622f5268911485730df0fdfb72 Signed-off-by: minkee.lee --- .../mobile/ui/detail/ItemListFactoryV2.java | 46 ++++++++ .../manager/mobile/vms/option/OptionFactoryV2.java | 68 ++++++++++++ .../mobile/template/x86-standard-template-v2.xml | 119 +++++++++++++++++++++ .../manager/tv/ui/detail/ItemListFactoryV2.java | 46 ++++++++ .../manager/tv/vms/option/OptionFactoryV2.java | 68 ++++++++++++ plugins/tv/template/x86-standard-template-v2.xml | 81 ++++++++++++++ .../wearable/ui/detail/ItemListFactoryV2.java | 47 ++++++++ .../wearable/vms/option/OptionFactoryV2.java | 68 ++++++++++++ .../wearable/template/x86-standard-template-v2.xml | 107 ++++++++++++++++++ 9 files changed, 650 insertions(+) create mode 100644 plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java create mode 100644 plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java create mode 100644 plugins/mobile/template/x86-standard-template-v2.xml create mode 100644 plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java create mode 100644 plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java create mode 100644 plugins/tv/template/x86-standard-template-v2.xml create mode 100644 plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java create mode 100644 plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java create mode 100644 plugins/wearable/template/x86-standard-template-v2.xml diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java new file mode 100644 index 0000000..538f1ae --- /dev/null +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java @@ -0,0 +1,46 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.mobile.ui.detail; + +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; +import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; + +public class ItemListFactoryV2 extends CommonItemListFactory { + + @Override + public void addItem(VmItem item, List itemList) { + super.addItem(item, itemList); + } +} diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java new file mode 100644 index 0000000..4adde38 --- /dev/null +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java @@ -0,0 +1,68 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.mobile.vms.option; + +import java.util.ArrayList; +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; +import org.tizen.emulator.manager.vms.option.CommonOption; +import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.IOption; +import org.tizen.emulator.manager.vms.option.Option; +import org.tizen.emulator.manager.vms.option.RemoteOption; + +public class OptionFactoryV2 extends CommonOptionFactory { + + @Override + public List makeOptionList(List itemList) { + List optionList = new ArrayList(); + + makeCommonOptionList(optionList, itemList); + + // Add other options + optionList.add(Option.getInstance(CommonOption.class)); + optionList.add(Option.getInstance(MTouchPointOption.class)); + optionList.add(Option.getInstance(RemoteOption.class)); + optionList.add(Option.getInstance(MDefaultOption.class)); + optionList.add(Option.getInstance(DisplayModeOption.class)); + + return optionList; + } + + + @Override + public void addOption(List optionList, VmItem item) { + super.addOption(optionList, item); + } + +} diff --git a/plugins/mobile/template/x86-standard-template-v2.xml b/plugins/mobile/template/x86-standard-template-v2.xml new file mode 100644 index 0000000..9f3f8c6 --- /dev/null +++ b/plugins/mobile/template/x86-standard-template-v2.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java new file mode 100644 index 0000000..7016b8d --- /dev/null +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java @@ -0,0 +1,46 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.tv.ui.detail; + +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; +import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; + +public class ItemListFactoryV2 extends CommonItemListFactory { + + @Override + public void addItem(VmItem item, List itemList) { + super.addItem(item, itemList); + } +} + diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java new file mode 100644 index 0000000..7a52869 --- /dev/null +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java @@ -0,0 +1,68 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.tv.vms.option; + +import java.util.ArrayList; +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; +import org.tizen.emulator.manager.vms.option.CommonOption; +import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.IOption; +import org.tizen.emulator.manager.vms.option.Option; +import org.tizen.emulator.manager.vms.option.RemoteOption; + +public class OptionFactoryV2 extends CommonOptionFactory { + + @Override + public List makeOptionList(List itemList) { + List optionList = new ArrayList(); + + makeCommonOptionList(optionList, itemList); + + // Add other options + optionList.add(Option.getInstance(CommonOption.class)); + optionList.add(Option.getInstance(TTouchPointOption.class)); + optionList.add(Option.getInstance(RemoteOption.class)); + optionList.add(Option.getInstance(TDefaultOption.class)); + optionList.add(Option.getInstance(DisplayModeOption.class)); + + return optionList; + } + + + @Override + public void addOption(List optionList, VmItem item) { + super.addOption(optionList, item); + } + +} \ No newline at end of file diff --git a/plugins/tv/template/x86-standard-template-v2.xml b/plugins/tv/template/x86-standard-template-v2.xml new file mode 100644 index 0000000..4752a5a --- /dev/null +++ b/plugins/tv/template/x86-standard-template-v2.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java new file mode 100644 index 0000000..2a88173 --- /dev/null +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java @@ -0,0 +1,47 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.wearable.ui.detail; + +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; +import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; + +public class ItemListFactoryV2 extends CommonItemListFactory { + + @Override + public void addItem(VmItem item, List itemList) { + super.addItem(item, itemList); + } +} + diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java new file mode 100644 index 0000000..eee5625 --- /dev/null +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java @@ -0,0 +1,68 @@ +/* + * Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * JiHye Kim + * SeokYeon Hwang + * Sangho Park + * + * 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.wearable.vms.option; + +import java.util.ArrayList; +import java.util.List; + +import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; +import org.tizen.emulator.manager.vms.option.CommonOption; +import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.IOption; +import org.tizen.emulator.manager.vms.option.Option; +import org.tizen.emulator.manager.vms.option.RemoteOption; + +public class OptionFactoryV2 extends CommonOptionFactory { + + @Override + public List makeOptionList(List itemList) { + List optionList = new ArrayList(); + + makeCommonOptionList(optionList, itemList); + + // Add other options + optionList.add(Option.getInstance(CommonOption.class)); + optionList.add(Option.getInstance(WTouchPointOption.class)); + optionList.add(Option.getInstance(RemoteOption.class)); + optionList.add(Option.getInstance(WDefaultOption.class)); + optionList.add(Option.getInstance(DisplayModeOption.class)); + + return optionList; + } + + + @Override + public void addOption(List optionList, VmItem item) { + super.addOption(optionList, item); + } + +} \ No newline at end of file diff --git a/plugins/wearable/template/x86-standard-template-v2.xml b/plugins/wearable/template/x86-standard-template-v2.xml new file mode 100644 index 0000000..9dbc8a6 --- /dev/null +++ b/plugins/wearable/template/x86-standard-template-v2.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 5ff4eba2b72a3162b108a0edec5a367d73bfa952 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Tue, 10 Nov 2015 23:00:12 +0900 Subject: package: version up (2.4.126) Change-Id: I5f12e0828c2632ce21a315871f3ffe85805d4cda Signed-off-by: minkee.lee --- package/changelog | 4 ++++ package/pkginfo.manifest | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/changelog b/package/changelog index 4eedaf5..e229baa 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,7 @@ +* 2.4.126 +- add template for new UI. +== minkee Lee 2015-11-10 + * 2.4.125 - remove net "vhost=on" option. == minkee Lee 2015-10-30 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 575ea81..90e15d4 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager-resources -Version: 2.4.125 +Version: 2.4.126 Maintainer: MinKee Lee , Jihye Kim Package: mobile-3.0-emulator-manager-resources -- cgit v1.2.3 From 625aa9177f3bf54d30fefd489ab5c2b1c2fbab31 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Fri, 20 Nov 2015 16:10:47 +0900 Subject: class: change class name according to common VmItem is changed to VMItem in common (emulator-manager). Change-Id: I8781f8f488d8286bcbca169caa3d70b49ebc3a36 Signed-off-by: minkee.lee --- .../tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java | 4 ++-- .../tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java | 6 +++--- .../org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java | 4 ++-- .../org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java | 6 +++--- .../emulator/manager/wearable/ui/detail/ItemListFactoryV2.java | 4 ++-- .../tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java index 538f1ae..a177c8e 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactoryV2.java @@ -33,14 +33,14 @@ package org.tizen.emulator.manager.mobile.ui.detail; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; public class ItemListFactoryV2 extends CommonItemListFactory { @Override - public void addItem(VmItem item, List itemList) { + public void addItem(VMItem item, List itemList) { super.addItem(item, itemList); } } diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java index 4adde38..07b3b0e 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java @@ -33,7 +33,7 @@ package org.tizen.emulator.manager.mobile.vms.option; import java.util.ArrayList; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; @@ -44,7 +44,7 @@ import org.tizen.emulator.manager.vms.option.RemoteOption; public class OptionFactoryV2 extends CommonOptionFactory { @Override - public List makeOptionList(List itemList) { + public List makeOptionList(List itemList) { List optionList = new ArrayList(); makeCommonOptionList(optionList, itemList); @@ -61,7 +61,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { @Override - public void addOption(List optionList, VmItem item) { + public void addOption(List optionList, VMItem item) { super.addOption(optionList, item); } diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java index 7016b8d..5c1a70a 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/detail/ItemListFactoryV2.java @@ -32,14 +32,14 @@ package org.tizen.emulator.manager.tv.ui.detail; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; public class ItemListFactoryV2 extends CommonItemListFactory { @Override - public void addItem(VmItem item, List itemList) { + public void addItem(VMItem item, List itemList) { super.addItem(item, itemList); } } diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java index 7a52869..7013d9f 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java @@ -33,7 +33,7 @@ package org.tizen.emulator.manager.tv.vms.option; import java.util.ArrayList; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; @@ -44,7 +44,7 @@ import org.tizen.emulator.manager.vms.option.RemoteOption; public class OptionFactoryV2 extends CommonOptionFactory { @Override - public List makeOptionList(List itemList) { + public List makeOptionList(List itemList) { List optionList = new ArrayList(); makeCommonOptionList(optionList, itemList); @@ -61,7 +61,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { @Override - public void addOption(List optionList, VmItem item) { + public void addOption(List optionList, VMItem item) { super.addOption(optionList, item); } diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java index 2a88173..55e4162 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/detail/ItemListFactoryV2.java @@ -33,14 +33,14 @@ package org.tizen.emulator.manager.wearable.ui.detail; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory; import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem; public class ItemListFactoryV2 extends CommonItemListFactory { @Override - public void addItem(VmItem item, List itemList) { + public void addItem(VMItem item, List itemList) { super.addItem(item, itemList); } } diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java index eee5625..8e0deab 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java @@ -33,7 +33,7 @@ package org.tizen.emulator.manager.wearable.vms.option; import java.util.ArrayList; import java.util.List; -import org.tizen.emulator.manager.template.renewal.VmItem; +import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; @@ -44,7 +44,7 @@ import org.tizen.emulator.manager.vms.option.RemoteOption; public class OptionFactoryV2 extends CommonOptionFactory { @Override - public List makeOptionList(List itemList) { + public List makeOptionList(List itemList) { List optionList = new ArrayList(); makeCommonOptionList(optionList, itemList); @@ -61,7 +61,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { @Override - public void addOption(List optionList, VmItem item) { + public void addOption(List optionList, VMItem item) { super.addOption(optionList, item); } -- cgit v1.2.3 From 24e6a475633a90a8f6b86e85d2b0ba4c7098fe0b Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Fri, 27 Nov 2015 11:51:47 +0900 Subject: template: add some items for dialog Change-Id: I1be039bbd605cbd4a31bba5ae795bba2b5fa687f Signed-off-by: minkee.lee --- .../mobile/template/x86-standard-template-v2.xml | 40 ++++++++++------------ plugins/tv/template/x86-standard-template-v2.xml | 25 ++++++-------- .../wearable/template/x86-standard-template-v2.xml | 38 +++++++++----------- 3 files changed, 45 insertions(+), 58 deletions(-) diff --git a/plugins/mobile/template/x86-standard-template-v2.xml b/plugins/mobile/template/x86-standard-template-v2.xml index 9f3f8c6..c930e33 100644 --- a/plugins/mobile/template/x86-standard-template-v2.xml +++ b/plugins/mobile/template/x86-standard-template-v2.xml @@ -8,7 +8,7 @@ - + @@ -49,12 +49,7 @@ - - - - - - + @@ -63,10 +58,25 @@ - + + + + + + + + + + + + + + + + @@ -94,25 +104,11 @@ - - - - - - - - - - - - - - diff --git a/plugins/tv/template/x86-standard-template-v2.xml b/plugins/tv/template/x86-standard-template-v2.xml index 4752a5a..4d4a2e5 100644 --- a/plugins/tv/template/x86-standard-template-v2.xml +++ b/plugins/tv/template/x86-standard-template-v2.xml @@ -8,7 +8,7 @@ - + @@ -34,6 +34,15 @@ + + + + + + + + + @@ -61,20 +70,6 @@ - - - - - - - - - - - - - - diff --git a/plugins/wearable/template/x86-standard-template-v2.xml b/plugins/wearable/template/x86-standard-template-v2.xml index 9dbc8a6..0560d06 100644 --- a/plugins/wearable/template/x86-standard-template-v2.xml +++ b/plugins/wearable/template/x86-standard-template-v2.xml @@ -8,7 +8,7 @@ - + @@ -42,12 +42,7 @@ - - - - - - + @@ -60,6 +55,21 @@ + + + + + + + + + + + + + + + @@ -87,20 +97,6 @@ - - - - - - - - - - - - - - -- cgit v1.2.3 From 93ad62bce7956b6aa5184a66fb58b93dd3f51c0a Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Fri, 27 Nov 2015 16:25:11 +0900 Subject: package: update version (2.4.127) Change-Id: Icfd31c8a3c97a4d93f561879a6469c340bf71c32 Signed-off-by: minkee.lee --- package/changelog | 4 ++++ package/pkginfo.manifest | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/changelog b/package/changelog index e229baa..c1c0160 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,7 @@ +* 2.4.127 +- add and re-arrange some template item for new UI. +== minkee Lee 2015-11-27 + * 2.4.126 - add template for new UI. == minkee Lee 2015-11-10 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 90e15d4..b6689df 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager-resources -Version: 2.4.126 +Version: 2.4.127 Maintainer: MinKee Lee , Jihye Kim Package: mobile-3.0-emulator-manager-resources -- cgit v1.2.3 From 31ce6c11f3c0c16851ac18e0e76e0797c48d08d1 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Fri, 27 Nov 2015 17:59:30 +0900 Subject: package: copy all files in template directory It's for new template file. Change-Id: I0e89099658d9682b1d152b884960c56877957e79 Signed-off-by: minkee.lee --- package/build.linux | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/build.linux b/package/build.linux index 6145e79..0b94014 100755 --- a/package/build.linux +++ b/package/build.linux @@ -31,8 +31,7 @@ install() mkdir -p "$RESOURCES_DIR/template" mkdir -p "$RESOURCES_DIR/plugins" PROFILE_SRCDIR=$SRCDIR/plugins/${P} - cp "$PROFILE_SRCDIR/template/x86-standard.xml" "$RESOURCES_DIR/template/x86-standard.xml" - cp "$PROFILE_SRCDIR/template/x86-standard-template.xml" "$RESOURCES_DIR/template/x86-standard-template.xml" + cp "$PROFILE_SRCDIR/template/"* "$RESOURCES_DIR/template/" mv "$PROFILE_SRCDIR/em-plugin-${P}.jar" "$RESOURCES_DIR/plugins/" done } -- cgit v1.2.3 From a4e29068828454a044560a6bc4a9cfd0adeacd05 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Mon, 30 Nov 2015 13:02:12 +0900 Subject: package: update version (2.4.128) Change-Id: If6b396d798f914b4ee9f1616212a76993747f0d0 Signed-off-by: minkee.lee --- package/changelog | 4 ++++ package/pkginfo.manifest | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/changelog b/package/changelog index c1c0160..35fe747 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,7 @@ +* 2.4.128 +- copy new template file. +== minkee Lee 2015-11-30 + * 2.4.127 - add and re-arrange some template item for new UI. == minkee Lee 2015-11-27 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index b6689df..a21880d 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager-resources -Version: 2.4.127 +Version: 2.4.128 Maintainer: MinKee Lee , Jihye Kim Package: mobile-3.0-emulator-manager-resources -- cgit v1.2.3 From 5b2c20037d8e9162bb40d4984da90ca62c5ae263 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Mon, 30 Nov 2015 14:27:09 +0900 Subject: package: add package version to MANIFEST file - add package version information for about dialog Conflicts: build.sh package/build.linux Signed-off-by: jihye424.kim Change-Id: I505f2257bcdb0461a65914dee31b37bb5e8b6c97 --- build.sh | 13 +++++++++++-- package/build.linux | 18 ++++++++---------- plugins/mobile/build.xml | 1 + plugins/tv/build.xml | 1 + plugins/wearable/build.xml | 1 + 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index 4be5407..0a11d08 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,17 @@ #!/bin/sh -platform_version=3.0 common_libpath=`pwd -P`/lib +if [ -z "$platform_version" ] +then + platform_version=3.0 +fi + +if [ -z "$package_version" ] +then + package_version="" +fi + for d in plugins/*/ ; do - ant -buildfile "$d/build.xml" $1 -Dplatform.version=$platform_version -Dcommon.libpath="$common_libpath" + ant -buildfile "$d/build.xml" $* -Dplatform.version=$platform_version -Dcommon.libpath="$common_libpath" -Dpackage.version=${package_version} done diff --git a/package/build.linux b/package/build.linux index 0b94014..949e867 100755 --- a/package/build.linux +++ b/package/build.linux @@ -1,8 +1,5 @@ #!/bin/sh -xe # clean - -TIZEN_VER=3.0 - clean() { echo "$SRCDIR" @@ -14,16 +11,23 @@ clean() # build build() { + TIZEN_VER=3.0 + cd "$SRCDIR" mkdir "$SRCDIR/lib" cp "$ROOTDIR/swt_4.4/swt.jar" "$SRCDIR/lib" cp "$ROOTDIR/tools/emulator/bin/emulator-manager.jar" "$SRCDIR/lib" - ./build.sh + + PKG_INFO=$SRCDIR/package/pkginfo.manifest + BINARY_VERSION=`awk -F: '$1 == "Version" {name=$2; print name}' $PKG_INFO` + BINARY_VERSION=`echo ${BINARY_VERSION} | tr -d ' '` + platform_version=${TIZEN_VER} package_version=${BINARY_VERSION} ./build.sh } # install install() { + TIZEN_VER=3.0 PROFILES="mobile wearable tv" for P in $PROFILES; do RESOURCES_DIR=$SRCDIR/package/${P}-${TIZEN_VER}-emulator-manager-resources.package.$TARGET_OS/data/platforms/tizen-${TIZEN_VER}/${P}/emulator-resources @@ -35,9 +39,3 @@ install() mv "$PROFILE_SRCDIR/em-plugin-${P}.jar" "$RESOURCES_DIR/plugins/" done } - -[ "$1" = "clean" ] && clean -[ "$1" = "build" ] && build -[ "$1" = "install" ] && install - -echo "success" diff --git a/plugins/mobile/build.xml b/plugins/mobile/build.xml index 436c376..b47ecbe 100644 --- a/plugins/mobile/build.xml +++ b/plugins/mobile/build.xml @@ -52,6 +52,7 @@ + diff --git a/plugins/tv/build.xml b/plugins/tv/build.xml index 34804638..5017bb4 100644 --- a/plugins/tv/build.xml +++ b/plugins/tv/build.xml @@ -52,6 +52,7 @@ + diff --git a/plugins/wearable/build.xml b/plugins/wearable/build.xml index a95e83b..eb03c23 100644 --- a/plugins/wearable/build.xml +++ b/plugins/wearable/build.xml @@ -52,6 +52,7 @@ + -- cgit v1.2.3 From 5a52c377739dc720de7645f0e73eb95da533c32e Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Mon, 30 Nov 2015 17:48:30 +0900 Subject: widget: delete swt dependency - delete Launcher class -- this class is replaced vm option list - replace GC with PaintGC Change-Id: Ic16e1bcb464be9ded9ff779e89dd70108a891d12 Signed-off-by: jihye424.kim --- plugins/mobile/.classpath | 1 - plugins/mobile/build.xml | 2 +- .../manager/mobile/ui/widget/VMButtonPainter.java | 20 +- .../emulator/manager/mobile/vms/Launcher.java | 856 -------------------- .../emulator/manager/mobile/vms/VMWorker.java | 5 - plugins/tv/build.xml | 2 +- .../manager/tv/ui/widget/VMButtonPainter.java | 19 +- .../tizen/emulator/manager/tv/vms/Launcher.java | 856 -------------------- .../tizen/emulator/manager/tv/vms/VMWorker.java | 5 - plugins/wearable/build.xml | 2 +- .../wearable/ui/widget/VMButtonPainter.java | 19 +- .../emulator/manager/wearable/vms/Launcher.java | 872 --------------------- .../emulator/manager/wearable/vms/VMWorker.java | 5 - 13 files changed, 10 insertions(+), 2654 deletions(-) delete mode 100644 plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/Launcher.java delete mode 100644 plugins/tv/src/org/tizen/emulator/manager/tv/vms/Launcher.java delete mode 100644 plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/Launcher.java diff --git a/plugins/mobile/.classpath b/plugins/mobile/.classpath index 3b8e13c..1e4c2b3 100644 --- a/plugins/mobile/.classpath +++ b/plugins/mobile/.classpath @@ -3,6 +3,5 @@ - diff --git a/plugins/mobile/build.xml b/plugins/mobile/build.xml index b47ecbe..7ebcab5 100644 --- a/plugins/mobile/build.xml +++ b/plugins/mobile/build.xml @@ -15,7 +15,7 @@ - + diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/widget/VMButtonPainter.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/widget/VMButtonPainter.java index f879c58..bd9172a 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/widget/VMButtonPainter.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/ui/widget/VMButtonPainter.java @@ -29,12 +29,8 @@ package org.tizen.emulator.manager.mobile.ui.widget; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.emulator.manager.resources.FontResources; import org.tizen.emulator.manager.ui.widgets.CommonVMButtonPainter; -import org.tizen.emulator.manager.ui.widgets.VMButton; -import org.tizen.emulator.manager.ui.widgets.WSTATE; +import org.tizen.emulator.manager.ui.widgets.PaintGC; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.VMPropertyValue; @@ -54,22 +50,11 @@ public class VMButtonPainter extends CommonVMButtonPainter { } @Override - public void drawButtonText(GC gc, Rectangle rect, VMButton button) { - VMProperty property = button.getProperty(); + public void drawButtonText(PaintGC gc, VMProperty property) { if (property == null) { return; } - // drawing Title - gc.setForeground(button.getFontColor(button.currentState())); - gc.setFont(FontResources.VM_BUTTON_TITLE_FONT.getFont()); - - gc.setBackground(button.getBackgroundColor(button.currentState())); - gc.drawString(button.getTitle(), button.getTitle_x(), TITLE_Y_OFFSET, true); - - // reset font color - gc.setForeground(button.getFontColor(WSTATE.NORMAL)); - VMPropertyValue value = property.getPropertyValue(); String version = value.baseImage.isStandard() ? property.getImageVersion() : "custom"; @@ -79,4 +64,5 @@ public class VMButtonPainter extends CommonVMButtonPainter { gc.drawString(Integer.toString(value.ramSize), TEXT_X_POINT, TEXT_Y_POINT + TEXT_Y_GAP * 2, true); gc.drawString(value.resolution.getStrValue(), TEXT_RE_X_POINT, TEXT_Y_POINT + TEXT_Y_GAP * 3, true); } + } diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/Launcher.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/Launcher.java deleted file mode 100644 index 941e44f..0000000 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/Launcher.java +++ /dev/null @@ -1,856 +0,0 @@ -/* - * Emulator Manager - * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * MunKyu Im - * 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.mobile.vms; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import org.eclipse.swt.SWT; -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.console.RemoteManager; -import org.tizen.emulator.manager.job.CheckGPU; -import org.tizen.emulator.manager.job.CheckVT; -import org.tizen.emulator.manager.logging.EMLogger; -import org.tizen.emulator.manager.mobile.ui.detail.ItemListFactory; -import org.tizen.emulator.manager.resources.FilePathResources; -import org.tizen.emulator.manager.resources.StringResources; -import org.tizen.emulator.manager.tool.PortHelper; -import org.tizen.emulator.manager.tool.SettingInfoFile; -import org.tizen.emulator.manager.tool.TapUtil; -import org.tizen.emulator.manager.ui.detail.item.CommonItemListFactory; -import org.tizen.emulator.manager.ui.detail.item.property.NetIPInfoViewItem; -import org.tizen.emulator.manager.ui.detail.item.property.NetProxyViewItem; -import org.tizen.emulator.manager.ui.dialog.IPAddressInputDialog; -import org.tizen.emulator.manager.ui.dialog.MessageDialog; -import org.tizen.emulator.manager.vms.EmulatorVMList; -import org.tizen.emulator.manager.vms.ILauncher; -import org.tizen.emulator.manager.vms.VMProperty; -import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator; -import org.tizen.emulator.manager.vms.helper.HelperClass; -import org.tizen.emulator.manager.vms.helper.MonitoringEmulator; -import org.tizen.emulator.manager.vms.helper.ProcessResult; -import org.tizen.emulator.manager.vms.helper.VMLauncherException; -import org.tizen.emulator.manager.vms.xml.CpuType; -import org.tizen.emulator.manager.vms.helper.VMWorkerException; -import org.tizen.emulator.manager.vms.xml.OptionType; -import org.tizen.emulator.manager.vms.xml.TouchType; - -public class Launcher implements ILauncher { - private boolean isConsole = false; - private String binPath = null; - private String emulatorPath; - private static Launcher launcher; - - public static final String IFUP_SCRIPT = "emulator-ifup.sh"; //$NON-NLS-1$ - // Option names in vm_config.xml - // Add if need. - public static final String OPT_DEVICE = "device"; //$NON-NLS-1$ - public static final String OPT_NFC = "nfc"; //$NON-NLS-1$ - public static final String OPT_BATTERY = "battery"; //$NON-NLS-1$ - public static final String OPT_CAMERA = "camera"; //$NON-NLS-1$ - public static final String OPT_HWKEY = "hwkey"; //$NON-NLS-1$ - public static final String OPT_SWAP = "swap"; //$NON-NLS-1$ - public static final String OPT_CODEC = "codec"; //$NON-NLS-1$ - - public static final String OPT_JACK = "jack"; //$NON-NLS-1$ - public static final String OPT_EARJACK = "earjack"; //$NON-NLS-1$ - public static final String OPT_USB = "usb"; //$NON-NLS-1$ - public static final String OPT_CHARGER = "charger"; //$NON-NLS-1$ - - public static final String OPT_SENSOR = "sensor"; //$NON-NLS-1$ - public static final String OPT_ACCEL = "accel"; //$NON-NLS-1$ - public static final String OPT_GYRO = "gyro"; //$NON-NLS-1$ - public static final String OPT_GEO = "geo"; //$NON-NLS-1$ - public static final String OPT_LIGHT = "light"; //$NON-NLS-1$ - public static final String OPT_PROXI = "proxi"; //$NON-NLS-1$ - public static final String OPT_HAPTIC = "haptic"; //$NON-NLS-1$ - public static final String OPT_PRESS = "press"; // pressure //$NON-NLS-1$ - public static final String OPT_UV = "uv"; // ultra violet //$NON-NLS-1$ - public static final String OPT_HRM = "hrm"; // heartbeat rate meter //$NON-NLS-1$ - - public static final String OPT_EXPERIMENTAL = ItemListFactory.ITEM_EXPERIMENTAL; - public static final String OPT_QT_ENABLE = "qtEnable"; //$NON-NLS-1$ - - - // Network option. - public static final String OPT_NET_CONNECT_TYPE = CommonItemListFactory.ITEM_NET_CONNECT_TYPE; - public static final String OPT_NET_TAP_DEVICE = CommonItemListFactory.ITEM_NET_TAP_DEVICE; - public static final String OPT_NET_IP_INFO = CommonItemListFactory.ITEM_NET_IP_INFO; - public static final String OPT_NET_IPADDR = NetIPInfoViewItem.ITEM_IP; - public static final String OPT_NET_SUBNET = NetIPInfoViewItem.ITEM_SUBNET; - public static final String OPT_NET_GATEWAY = NetIPInfoViewItem.ITEM_GATEWAY; - public static final String OPT_NET_DNS = CommonItemListFactory.ITEM_NET_DNS; - public static final String OPT_NET_MAC = CommonItemListFactory.ITEM_NET_MAC; - public static final String OPT_NET_PROXY = CommonItemListFactory.ITEM_NET_PROXY; - public static final String OPT_NET_DHCP = NetIPInfoViewItem.ITEM_USE_DHCP; - - public static Launcher getInstance() { - if (launcher == null) { - launcher = new Launcher(); - } - return launcher; - } - - private Launcher() { - isConsole = EmulatorManager.isConsoleMode(); - } - - @Override - public List getLaunchCommand(VMProperty property, String path) throws VMLauncherException { - String binary; - String hwVirtualization = null; - int portNo; - boolean useBridgeNet = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_CONNECT_TYPE).equals("Bridge") && //$NON-NLS-1$ - (EmulatorManager.isLinux() || EmulatorManager.isWin() || EmulatorManager.isMac()); - String tapName = null; - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) - throw new VMLauncherException((new StringBuilder()) - .append("Tap device is not exist : ").append(tapName) //$NON-NLS-1$ - .append("\nCheck VM's tap configuration.").toString()); //$NON-NLS-1$ - if (isTapUsing(tapName)) - throw new VMLauncherException( - (new StringBuilder()) - .append("Tap device(") //$NON-NLS-1$ - .append(tapName) - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease select another tap device for current VM.") //$NON-NLS-1$ - .toString()); - String ipAddr = property.getPropertyValue() - .getAdvancedOptionSubValue(OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (isIpAddrUsing(ipAddr)) - throw new VMLauncherException((new StringBuilder()) - .append("VM's ip address(").append(ipAddr) //$NON-NLS-1$ - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease modify current VM's ip address.") //$NON-NLS-1$ - .toString()); - } - if (EmulatorManager.isWin()) { - try { - if (!TapUtil.isTapInBridge(tapName)) { - MessageDialog dialog = new MessageDialog(); - int res = dialog - .openWarningAndSelectionDialog("\nTap device is not connected with Bridge." //$NON-NLS-1$ - + "\nGuest network would work as NAT." //$NON-NLS-1$ - + "\nKeep launching ?"); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - useBridgeNet = false; - } - - } catch (VMWorkerException e) { - throw new VMLauncherException(e.getMessage()); - } - } - } - /* check available port number */ - portNo = new PortHelper().getPortNo(); - if(portNo == -1) { - String error = "Can not execute emulator." //$NON-NLS-1$ - + StringResources.NEW_LINE - + "All available ports are in use."; //$NON-NLS-1$ - throw new VMLauncherException(error); - } - - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - binary = "emulator-x86.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-x86"; //$NON-NLS-1$ - } - } else { - if (EmulatorManager.isWin()) { - binary = "emulator-arm.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-arm"; //$NON-NLS-1$ - } - } - - // check disk image - File child = new File(property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()); - File base = new File(property.getConfiguration().getBaseInformation().getDiskImage().getBaseDiskImage().getValue()); - if (!child.exists()) { - throw new VMLauncherException("Child disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + child.getAbsolutePath() - , true); - } - if (!base.exists()) { - throw new VMLauncherException("Base disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + base.getAbsolutePath() - , true); - } - - if (property.getConfiguration().getUsability().isHwVirtualization() && CheckVT.isVTSupported()) { - hwVirtualization = CheckVT.getVTEnablingCommand(); - } - - List cmd = new ArrayList(); - int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth(); - int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight(); - String skinPath = null; - if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) { - skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath(); - if (skinPath != null && skinPath.isEmpty()) { - skinPath = null; - } - } - String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath(); - //String osVersion = System.getProperty("os.version"); - boolean isFileshare = true; - if (fileshare == null) { - isFileshare = false; - } - - /* get MAC address of host set as guest MAC address */ - String macAddr = useBridgeNet ? property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_MAC) : SettingInfoFile - .getMACaddr(); - - if(macAddr.isEmpty()) { - macAddr = "52:54:00:12:34:56"; //$NON-NLS-1$ - EMLogger.getLogger().log(Level.INFO, String.format("MAC set as default = %s", macAddr)); //$NON-NLS-1$ - } - - emulatorPath = property.getPropertyValue().baseImage.getPlatform().getEmulatorPath(); - if (path == null || path.isEmpty()) { - cmd.add(FilePathResources.getEmulatorBinPath(emulatorPath) + File.separator + binary); - } else { - this.binPath = path; - cmd.add(binPath + File.separator + binary); - } - - cmd.add("--skin-args"); //$NON-NLS-1$ - cmd.add("width=" + width); //$NON-NLS-1$ - cmd.add("height=" + height); //$NON-NLS-1$ - if (skinPath != null) { - cmd.add("skin.path=" + skinPath); //$NON-NLS-1$ - } - - if (RemoteManager.getSpiceMode()) { - cmd.add("hb.ignore=true"); //$NON-NLS-1$ - } - - cmd.add("--qemu-args"); //$NON-NLS-1$ - - // x86 part of cmd - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()+ ",if=virtio,index=1"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add( "-boot"); //$NON-NLS-1$ - cmd.add("c"); //$NON-NLS-1$ - cmd.add("-append"); //$NON-NLS-1$ - String kernelOption = "console=ttyS0 video=LVDS-1:" //$NON-NLS-1$ - + width - + "x" //$NON-NLS-1$ - + height - + "-32@60" //$NON-NLS-1$ - + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 //$NON-NLS-1$ - + getIP(useBridgeNet, property) - + " vm_name=" + property.getConfiguration().getBaseInformation().getName(); //$NON-NLS-1$ - String hostIp = "10.0.2.2"; //$NON-NLS-1$ - if (useBridgeNet) { - String bridgeIp = TapUtil.getBridgeIpAddr(property - .getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE)); - if (bridgeIp == null) { - MessageDialog dialog = new MessageDialog(); - int res = dialog.openInfoDialog( - "\nCannot find host(bridge) IP address." //$NON-NLS-1$ - + "\nTo use bridge network, host IP is required." //$NON-NLS-1$ - + "\nPlease input manually."); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - - // Input host IP address. - String ip = IPAddressInputDialog.open("Input host's IP address"); //$NON-NLS-1$ - if (ip == null) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - - } else { - hostIp = ip; - } - - } else { - hostIp = bridgeIp; - } - } - kernelOption += " host_ip=" + hostIp; //$NON-NLS-1$ - - // Set proxy. - String proxyConfig = null; - String proxyMode = property.getPropertyValue(). - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_PROXY_MODE); - if (proxyMode.equals(NetProxyViewItem.MODE_AUTO)) { - proxyConfig = getHostProxy(); - - } else if (proxyMode.equals(NetProxyViewItem.MODE_MANUAL)) { - proxyConfig = "http_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTP_PROXY) - + " https_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTPS_PROXY) - + " ftp_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_FTP_PROXY) - + " socks_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_SOCKS_PROXY); - } - - if (proxyConfig != null) { - kernelOption += (" " + proxyConfig); //$NON-NLS-1$ - } - - /* set virtio-9p string in case of using directory share [kernel option] */ - if(isFileshare) { - kernelOption += " virtio-9p"; //$NON-NLS-1$ - } - - /* - if(property.getPropertyValue().skin != null && property.getPropertyValue().skin.getButtonType() == SKIN_BUTTON_TYPE.THREE_BUTTON_TYPE) { - kernelOption += " platform_feature=3btn"; - } else { - kernelOption += " platform_feature=1btn"; - } - */ - - cmd.add(kernelOption); - - /* use fileshare [non-kernel option] */ - if(isFileshare) { - cmd.add("-virtfs"); //$NON-NLS-1$ - cmd.add("local,path=" + property.getConfiguration().getUsability().getFileSharing().getPath() +",security_model=none,mount_tag=fileshare"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add("file:" + FilePathResources.getTizenVmsPath() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - CpuType cpuOption = property.getConfiguration().getDevice().getCPU(); - if (cpuOption != null) { - cmd.add("-smp"); //$NON-NLS-1$ - cmd.add(String.valueOf(cpuOption.getValue().getValue())); - } - cmd.add("-m"); //$NON-NLS-1$ - cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue())); - cmd.add("-M"); //$NON-NLS-1$ - cmd.add("maru-x86-machine"); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - cmd.add("nic,model=virtio,macaddr=" + macAddr); //$NON-NLS-1$ - cmd.add("-soundhw"); //$NON-NLS-1$ - cmd.add("all"); //$NON-NLS-1$ - cmd.add("-usb"); //$NON-NLS-1$ - cmd.add("-vga"); //$NON-NLS-1$ - cmd.add("none"); //$NON-NLS-1$ - cmd.add("-enable-vigs"); //$NON-NLS-1$ - cmd.add("-L"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorBiosPath(emulatorPath)); - cmd.add("-kernel"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorKernelPath(emulatorPath) + File.separator+ "bzImage." + property.getArch().toString()); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) { - throw new VMLauncherException("Tap device is not exist : " //$NON-NLS-1$ - + tapName + "\nCheck VM's tap configuration."); //$NON-NLS-1$ - } - cmd.add("tap,ifname=" + tapName + ",script=no,downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } else { - cmd.add("tap,script=/etc/" + IFUP_SCRIPT +",downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } else { - cmd.add("user,dhcpstart=10.0.2.16"); //$NON-NLS-1$ - } - - cmd.add("-rtc"); //$NON-NLS-1$ - cmd.add("base=utc"); //$NON-NLS-1$ - if (property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage() != null - && checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_SWAP))) { - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage().getValue() + ",if=virtio,index=2"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /* append HW virtualization option if supports */ - if (hwVirtualization != null) { - cmd.add(hwVirtualization); - } - - // add hw gl acceleration - if (property.getConfiguration().getUsability().isHwGLAcceleration() - && CheckGPU.isGPUSupported()) { -// cmd.add(CheckVirtualization.getInstance().getGPU_enable_command()); - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("gl"); //$NON-NLS-1$ - cmd.add("-enable-yagl"); //$NON-NLS-1$ - cmd.add("-yagl-backend"); //$NON-NLS-1$ - cmd.add("vigs"); //$NON-NLS-1$ - } else { - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("sw"); //$NON-NLS-1$ - } - - // for suspend - if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE - && property.getConfiguration().getUsability().isSupportSuspend()) { - cmd.add("-enable-suspend"); //$NON-NLS-1$ - } - - // for bootup status - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-esm-pci"); //$NON-NLS-1$ - - // for host keyboard - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-keyboard-pci"); //$NON-NLS-1$ - - // for ecp - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-evdi-pci,profile=" + property.getPropertyValue().baseImage.getProfile()); //$NON-NLS-1$ - - // for brightness - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-brightness"); //$NON-NLS-1$ - - // for vmodem - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-vmodem-pci"); //$NON-NLS-1$ - - // for hardware key - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_HWKEY))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-hwkey-pci"); //$NON-NLS-1$ - } - - // for codec - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_CODEC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("codec-pci"); //$NON-NLS-1$ - } - - // for nfc - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_NFC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-nfc-pci"); //$NON-NLS-1$ - } - - // for battery - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-power-pci"); //$NON-NLS-1$ - /*if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_BATTERY))) { - cmd.add("-device"); - cmd.add("virtio-power-pci"); - }*/ - - // for camera - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_CAMERA))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-camera"); //$NON-NLS-1$ - } - - cmd.add("-device"); //$NON-NLS-1$ - TouchType touchType = property.getConfiguration().getDevice().getTouch(); - if (touchType != null) { - cmd.add("virtio-touchscreen-pci,max_point=" + touchType.getMaxTouchPoint()); //$NON-NLS-1$ - } else { - cmd.add("virtio-touchscreen-pci"); //$NON-NLS-1$ - } - - // for sensor (accel, geo, gyro, light, proxi, haptic, pressure, ultra violet, heart rate meter) - OptionType sensor = property.getPropertyValue().getAdvancedOption(OPT_SENSOR); - if (sensor != null) { - cmd.add("-device"); //$NON-NLS-1$ - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_ACCEL))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("accel"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GEO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("geo"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GYRO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("gyro"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_LIGHT))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("light"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PROXI))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("proxi"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HAPTIC))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("haptic"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PRESS))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("press"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_UV))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("uv"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HRM))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("hrm"); //$NON-NLS-1$ - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-sensor-pci"); //$NON-NLS-1$ - } else { - sb.insert(0, "virtio-sensor-pci,sensors="); //$NON-NLS-1$ - cmd.add(sb.toString()); - } - } - - // for jacks (enabled charger, earjack and usb) - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-jack-pci,jacks=earjack&charger&usb"); //$NON-NLS-1$ - /* OptionType jacks = property.getPropertyValue().getAdvancedOption(OPT_JACK); - if (jacks != null) { - cmd.add("-device"); - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_EARJACK))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("earjack"); - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_CHARGER))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("charger"); - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_USB))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("usb"); - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-jack-pci"); - } else { - sb.insert(0, "virtio-jack-pci,jacks="); - cmd.add(sb.toString()); - } - } */ - } - - /* append user added options if exists */ - String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions(); - if (advancedOptions != null) { - String[] arrOptions = advancedOptions.split(" "); //$NON-NLS-1$ - for (String option : arrOptions) { - cmd.add(option); - } - } - - /* spice options */ - if (RemoteManager.getSpiceMode() - || CheckingRunningEmulator.isRemote(property)) { - cmd.add("-spice"); //$NON-NLS-1$ - cmd.add("disable-ticketing"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0"); //$NON-NLS-1$ - cmd.add("-chardev"); //$NON-NLS-1$ - cmd.add("spicevmc,id=vdagent,name=vdagent"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0"); //$NON-NLS-1$ - } - - //for qt enable - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue( - OPT_EXPERIMENTAL, OPT_QT_ENABLE))) { - if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) { - cmd.add("-display"); //$NON-NLS-1$ - if (EmulatorManager.isMac()) { - cmd.add("maru_qt,rendering=offscreen"); //$NON-NLS-1$ - } else { - cmd.add("maru_qt,rendering=onscreen"); //$NON-NLS-1$ - } - } - } - - EMLogger.getLogger().log(Level.INFO, "Starting Emulator Command : "); //$NON-NLS-1$ - String temp = cmd.get(0) + " "; //$NON-NLS-1$ - for (String s : cmd.subList(1, cmd.size())) { - temp += ("\"" + s + "\" "); //$NON-NLS-1$ //$NON-NLS-2$ - } - EMLogger.getLogger().log(Level.INFO, temp); - System.out.println("cmd : " + cmd); //$NON-NLS-1$ - return cmd; - } - - @Override - public boolean launch(VMProperty property) throws VMLauncherException { - return launch(property, false); - } - - @Override - public boolean launch(VMProperty property, boolean wait) throws VMLauncherException { - List cmd; - - cmd = getLaunchCommand(property, null); - - if (cmd == null) { - return false; - } - - CheckingRunningEmulator.addEmulator(property); - MonitoringEmulator monitor = new MonitoringEmulator(property); - Process process = launch(cmd); - if (process != null) { - monitor.setProcess(process); - monitor.start(); - if (wait) { - try { - monitor.join(); - } catch (InterruptedException e) { - EMLogger.getLogger().warning(e.getMessage()); - } - if (monitor.isSuccess()) { - return true; - } else { - return false; - } - } - return true; - } else { - CheckingRunningEmulator.removeEmulator(property, false); - monitor.interrupt(); - return false; - } - } - - @Override - public Process launch(List cmd) { - ProcessBuilder pb = new ProcessBuilder(cmd); - Map env = pb.environment(); - if (EmulatorManager.isLinux()) { - String value = env.get("LD_LIBRARY_PATH"); //$NON-NLS-1$ - env.put("LD_LIBRARY_PATH", ((value == null) ? "" : value + ":") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - + FilePathResources.getEmulatorBinPath(emulatorPath) + ":" + FilePathResources.getEmulatorCheckToolPath() + File.separator + "lib:"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "LD_LIBRARY_PATH=" + env.get("LD_LIBRARY_PATH")); //$NON-NLS-1$ //$NON-NLS-2$ - } - env.put("GL_VERSION", "2"); //$NON-NLS-1$ //$NON-NLS-2$ - env.put("VIGS_SYNC_READ_PIXELS", "1"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "GL_VERSION: " + env.get("GL_VERSION")); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "VIGS_SYNC_READ_PIXELS: " + env.get("VIGS_SYNC_READ_PIXELS")); //$NON-NLS-1$ //$NON-NLS-2$ - - if (this.binPath == null || this.binPath.isEmpty()) { - pb.directory(new File(FilePathResources.getEmulatorBinPath(emulatorPath))); - } else { - pb.directory(new File(this.binPath)); - } - - Process process = null; - try { - process = pb.start(); - } catch (IOException e) { - if (!isConsole) { - MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent())); - msg.openWarningDialog("Failed to launch" + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - EMLogger.getLogger().log(Level.WARNING, "Failed to launch." + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - - return process; - } - - - private boolean checkOnOff(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } else if (value.toLowerCase().equals("off")) { //$NON-NLS-1$ - return false; - } else if (value.isEmpty()){ - return true; - } else { - return false; - } - } - - private boolean checkOn(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } - return false; - } - - - @Override - public void sendRemoteLog(String msg) { - EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ - } - - private static boolean isTapUsing(String tapName) { - boolean isUsing = false; -// VMProperty arr[] = (VMProperty[]) EmulatorVMList.getInstance() -// .getProperties(); -// int len$ = arr$.length; -// for (int i$ = 0; i$ < len$; i$++) { - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String name = prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE); - if (tapName.equals(name)) { - isUsing = true; - break; - } - } - - return isUsing; - } - - private static boolean isIpAddrUsing(String ipAddr) { - boolean isUsing = false; - - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String ip = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (!ipAddr.equals(ip)) { - continue; - } - isUsing = true; - break; - } - - return isUsing; - } - - private String getIP(boolean useBridgeNet, VMProperty prop) { - StringBuilder sb = new StringBuilder(); - sb.append(" ip="); //$NON-NLS-1$ - if (useBridgeNet) { - String useDHCP = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_DHCP); - if (checkOn(useDHCP)) { - return ""; //$NON-NLS-1$ - } - - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_IPADDR)); - sb.append("::"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_GATEWAY)); - sb.append(":"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_SUBNET)); - sb.append("::eth0:none:"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_DNS)); - - } else { // NAT (default) - //sb.append("10.0.2.16::10.0.2.2:255.255.255.0::eth0:none:10.0.2.3"); - return ""; //$NON-NLS-1$ - } - return sb.toString(); - } - - private String getHostProxy() throws VMLauncherException{ - String result = null; - String proxyCommand = "check-net"; //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - proxyCommand = "check-net.exe"; //$NON-NLS-1$ - } - - List cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath() + File.separator + proxyCommand, "--proxy"); //$NON-NLS-1$ - ProcessResult res = HelperClass.runProcess(cmd); - boolean isCommandSuccess = false; - if (res.isSuccess()) { - for (String str : res.getStdOutMsg()) { - if (str.startsWith("MODE:")) { //$NON-NLS-1$ - isCommandSuccess = true; - } - if (str.startsWith("http_proxy")) { //$NON-NLS-1$ - result = str; - } - } - - } else if (!res.isSuccess() || !isCommandSuccess) { - EMLogger.getLogger().warning(res.getResultMessage()); - int dialogRes = new MessageDialog().openWarningAndSelectionDialog - ("Failed to get host proxy setting." //$NON-NLS-1$ - + "\n" + res.getResultMessage() //$NON-NLS-1$ - + "\nContinue launching anyway ?"); //$NON-NLS-1$ - if (dialogRes != SWT.OK) { - throw new VMLauncherException("User canceled launching VM."); //$NON-NLS-1$ - } - } - - if (result == null) { - EMLogger.getLogger().warning("Can't find host proxy setting."); //$NON-NLS-1$ - EMLogger.getLogger().warning("check-net result : " + res.getResultMessage()); //$NON-NLS-1$ - } - - return result; - } -} diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/VMWorker.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/VMWorker.java index eb22261..9a02d06 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/VMWorker.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/VMWorker.java @@ -39,9 +39,4 @@ public class VMWorker extends VMWorkerCommon { EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ } - @Override - public void initLauncher() { - setLauncher(Launcher.getInstance()); - } - } diff --git a/plugins/tv/build.xml b/plugins/tv/build.xml index 5017bb4..9155aee 100644 --- a/plugins/tv/build.xml +++ b/plugins/tv/build.xml @@ -15,7 +15,7 @@ - + diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/ui/widget/VMButtonPainter.java b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/widget/VMButtonPainter.java index 0f8f43e..4c964b1 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/ui/widget/VMButtonPainter.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/ui/widget/VMButtonPainter.java @@ -29,12 +29,8 @@ package org.tizen.emulator.manager.tv.ui.widget; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.emulator.manager.resources.FontResources; import org.tizen.emulator.manager.ui.widgets.CommonVMButtonPainter; -import org.tizen.emulator.manager.ui.widgets.VMButton; -import org.tizen.emulator.manager.ui.widgets.WSTATE; +import org.tizen.emulator.manager.ui.widgets.PaintGC; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.VMPropertyValue; @@ -53,22 +49,11 @@ public class VMButtonPainter extends CommonVMButtonPainter { } @Override - public void drawButtonText(GC gc, Rectangle rect, VMButton button) { - VMProperty property = button.getProperty(); + public void drawButtonText(PaintGC gc, VMProperty property) { if (property == null) { return; } - // drawing Title - gc.setForeground(button.getFontColor(button.currentState())); - gc.setFont(FontResources.VM_BUTTON_TITLE_FONT.getFont()); - - gc.setBackground(button.getBackgroundColor(button.currentState())); - gc.drawString(button.getTitle(), button.getTitle_x(), TITLE_Y_OFFSET, true); - - // reset font color - gc.setForeground(button.getFontColor(WSTATE.NORMAL)); - VMPropertyValue value = property.getPropertyValue(); String version = value.baseImage.isStandard() ? property.getImageVersion() : "custom"; diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/Launcher.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/Launcher.java deleted file mode 100644 index 2859633..0000000 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/Launcher.java +++ /dev/null @@ -1,856 +0,0 @@ -/* - * Emulator Manager - * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * MunKyu Im - * 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.tv.vms; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import org.eclipse.swt.SWT; -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.console.RemoteManager; -import org.tizen.emulator.manager.job.CheckGPU; -import org.tizen.emulator.manager.job.CheckVT; -import org.tizen.emulator.manager.logging.EMLogger; -import org.tizen.emulator.manager.tv.ui.detail.ItemListFactory; -import org.tizen.emulator.manager.resources.FilePathResources; -import org.tizen.emulator.manager.resources.StringResources; -import org.tizen.emulator.manager.tool.PortHelper; -import org.tizen.emulator.manager.tool.SettingInfoFile; -import org.tizen.emulator.manager.tool.TapUtil; -import org.tizen.emulator.manager.ui.detail.item.CommonItemListFactory; -import org.tizen.emulator.manager.ui.detail.item.property.NetIPInfoViewItem; -import org.tizen.emulator.manager.ui.detail.item.property.NetProxyViewItem; -import org.tizen.emulator.manager.ui.dialog.IPAddressInputDialog; -import org.tizen.emulator.manager.ui.dialog.MessageDialog; -import org.tizen.emulator.manager.vms.EmulatorVMList; -import org.tizen.emulator.manager.vms.ILauncher; -import org.tizen.emulator.manager.vms.VMProperty; -import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator; -import org.tizen.emulator.manager.vms.helper.HelperClass; -import org.tizen.emulator.manager.vms.helper.MonitoringEmulator; -import org.tizen.emulator.manager.vms.helper.ProcessResult; -import org.tizen.emulator.manager.vms.helper.VMLauncherException; -import org.tizen.emulator.manager.vms.xml.CpuType; -import org.tizen.emulator.manager.vms.helper.VMWorkerException; -import org.tizen.emulator.manager.vms.xml.OptionType; -import org.tizen.emulator.manager.vms.xml.TouchType; - -public class Launcher implements ILauncher { - private boolean isConsole = false; - private String binPath = null; - private String emulatorPath; - private static Launcher launcher; - - public static final String IFUP_SCRIPT = "emulator-ifup.sh"; //$NON-NLS-1$ - // Option names in vm_config.xml - // Add if need. - public static final String OPT_DEVICE = "device"; //$NON-NLS-1$ - public static final String OPT_NFC = "nfc"; //$NON-NLS-1$ - public static final String OPT_BATTERY = "battery"; //$NON-NLS-1$ - public static final String OPT_CAMERA = "camera"; //$NON-NLS-1$ - public static final String OPT_HWKEY = "hwkey"; //$NON-NLS-1$ - public static final String OPT_SWAP = "swap"; //$NON-NLS-1$ - public static final String OPT_CODEC = "codec"; //$NON-NLS-1$ - - public static final String OPT_JACK = "jack"; //$NON-NLS-1$ - public static final String OPT_EARJACK = "earjack"; //$NON-NLS-1$ - public static final String OPT_USB = "usb"; //$NON-NLS-1$ - public static final String OPT_CHARGER = "charger"; //$NON-NLS-1$ - - public static final String OPT_SENSOR = "sensor"; //$NON-NLS-1$ - public static final String OPT_ACCEL = "accel"; //$NON-NLS-1$ - public static final String OPT_GYRO = "gyro"; //$NON-NLS-1$ - public static final String OPT_GEO = "geo"; //$NON-NLS-1$ - public static final String OPT_LIGHT = "light"; //$NON-NLS-1$ - public static final String OPT_PROXI = "proxi"; //$NON-NLS-1$ - public static final String OPT_HAPTIC = "haptic"; //$NON-NLS-1$ - public static final String OPT_PRESS = "press"; // pressure //$NON-NLS-1$ - public static final String OPT_UV = "uv"; // ultra violet //$NON-NLS-1$ - public static final String OPT_HRM = "hrm"; // heartbeat rate meter //$NON-NLS-1$ - - public static final String OPT_EXPERIMENTAL = ItemListFactory.ITEM_EXPERIMENTAL; - public static final String OPT_QT_ENABLE = "qtEnable"; //$NON-NLS-1$ - - - // Network option. - public static final String OPT_NET_CONNECT_TYPE = CommonItemListFactory.ITEM_NET_CONNECT_TYPE; - public static final String OPT_NET_TAP_DEVICE = CommonItemListFactory.ITEM_NET_TAP_DEVICE; - public static final String OPT_NET_IP_INFO = CommonItemListFactory.ITEM_NET_IP_INFO; - public static final String OPT_NET_IPADDR = NetIPInfoViewItem.ITEM_IP; - public static final String OPT_NET_SUBNET = NetIPInfoViewItem.ITEM_SUBNET; - public static final String OPT_NET_GATEWAY = NetIPInfoViewItem.ITEM_GATEWAY; - public static final String OPT_NET_DNS = CommonItemListFactory.ITEM_NET_DNS; - public static final String OPT_NET_MAC = CommonItemListFactory.ITEM_NET_MAC; - public static final String OPT_NET_PROXY = CommonItemListFactory.ITEM_NET_PROXY; - public static final String OPT_NET_DHCP = NetIPInfoViewItem.ITEM_USE_DHCP; - - public static Launcher getInstance() { - if (launcher == null) { - launcher = new Launcher(); - } - return launcher; - } - - private Launcher() { - isConsole = EmulatorManager.isConsoleMode(); - } - - @Override - public List getLaunchCommand(VMProperty property, String path) throws VMLauncherException { - String binary; - String hwVirtualization = null; - int portNo; - boolean useBridgeNet = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_CONNECT_TYPE).equals("Bridge") && //$NON-NLS-1$ - (EmulatorManager.isLinux() || EmulatorManager.isWin() || EmulatorManager.isMac()); - String tapName = null; - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) - throw new VMLauncherException((new StringBuilder()) - .append("Tap device is not exist : ").append(tapName) //$NON-NLS-1$ - .append("\nCheck VM's tap configuration.").toString()); //$NON-NLS-1$ - if (isTapUsing(tapName)) - throw new VMLauncherException( - (new StringBuilder()) - .append("Tap device(") //$NON-NLS-1$ - .append(tapName) - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease select another tap device for current VM.") //$NON-NLS-1$ - .toString()); - String ipAddr = property.getPropertyValue() - .getAdvancedOptionSubValue(OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (isIpAddrUsing(ipAddr)) - throw new VMLauncherException((new StringBuilder()) - .append("VM's ip address(").append(ipAddr) //$NON-NLS-1$ - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease modify current VM's ip address.") //$NON-NLS-1$ - .toString()); - } - if (EmulatorManager.isWin()) { - try { - if (!TapUtil.isTapInBridge(tapName)) { - MessageDialog dialog = new MessageDialog(); - int res = dialog - .openWarningAndSelectionDialog("\nTap device is not connected with Bridge." //$NON-NLS-1$ - + "\nGuest network would work as NAT." //$NON-NLS-1$ - + "\nKeep launching ?"); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - useBridgeNet = false; - } - - } catch (VMWorkerException e) { - throw new VMLauncherException(e.getMessage()); - } - } - } - /* check available port number */ - portNo = new PortHelper().getPortNo(); - if(portNo == -1) { - String error = "Can not execute emulator." //$NON-NLS-1$ - + StringResources.NEW_LINE - + "All available ports are in use."; //$NON-NLS-1$ - throw new VMLauncherException(error); - } - - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - binary = "emulator-x86.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-x86"; //$NON-NLS-1$ - } - } else { - if (EmulatorManager.isWin()) { - binary = "emulator-arm.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-arm"; //$NON-NLS-1$ - } - } - - // check disk image - File child = new File(property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()); - File base = new File(property.getConfiguration().getBaseInformation().getDiskImage().getBaseDiskImage().getValue()); - if (!child.exists()) { - throw new VMLauncherException("Child disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + child.getAbsolutePath() - , true); - } - if (!base.exists()) { - throw new VMLauncherException("Base disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + base.getAbsolutePath() - , true); - } - - if (property.getConfiguration().getUsability().isHwVirtualization() && CheckVT.isVTSupported()) { - hwVirtualization = CheckVT.getVTEnablingCommand(); - } - - List cmd = new ArrayList(); - int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth(); - int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight(); - String skinPath = null; - if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) { - skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath(); - if (skinPath != null && skinPath.isEmpty()) { - skinPath = null; - } - } - String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath(); - //String osVersion = System.getProperty("os.version"); - boolean isFileshare = true; - if (fileshare == null) { - isFileshare = false; - } - - /* get MAC address of host set as guest MAC address */ - String macAddr = useBridgeNet ? property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_MAC) : SettingInfoFile - .getMACaddr(); - - if(macAddr.isEmpty()) { - macAddr = "52:54:00:12:34:56"; //$NON-NLS-1$ - EMLogger.getLogger().log(Level.INFO, String.format("MAC set as default = %s", macAddr)); //$NON-NLS-1$ - } - - emulatorPath = property.getPropertyValue().baseImage.getPlatform().getEmulatorPath(); - if (path == null || path.isEmpty()) { - cmd.add(FilePathResources.getEmulatorBinPath(emulatorPath) + File.separator + binary); - } else { - this.binPath = path; - cmd.add(binPath + File.separator + binary); - } - - cmd.add("--skin-args"); //$NON-NLS-1$ - cmd.add("width=" + width); //$NON-NLS-1$ - cmd.add("height=" + height); //$NON-NLS-1$ - if (skinPath != null) { - cmd.add("skin.path=" + skinPath); //$NON-NLS-1$ - } - - if (RemoteManager.getSpiceMode()) { - cmd.add("hb.ignore=true"); //$NON-NLS-1$ - } - - cmd.add("--qemu-args"); //$NON-NLS-1$ - - // x86 part of cmd - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()+ ",if=virtio,index=1"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add( "-boot"); //$NON-NLS-1$ - cmd.add("c"); //$NON-NLS-1$ - cmd.add("-append"); //$NON-NLS-1$ - String kernelOption = "console=ttyS0 video=LVDS-1:" //$NON-NLS-1$ - + width - + "x" //$NON-NLS-1$ - + height - + "-32@60" //$NON-NLS-1$ - + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 //$NON-NLS-1$ - + getIP(useBridgeNet, property) - + " vm_name=" + property.getConfiguration().getBaseInformation().getName(); //$NON-NLS-1$ - String hostIp = "10.0.2.2"; //$NON-NLS-1$ - if (useBridgeNet) { - String bridgeIp = TapUtil.getBridgeIpAddr(property - .getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE)); - if (bridgeIp == null) { - MessageDialog dialog = new MessageDialog(); - int res = dialog.openInfoDialog( - "\nCannot find host(bridge) IP address." //$NON-NLS-1$ - + "\nTo use bridge network, host IP is required." //$NON-NLS-1$ - + "\nPlease input manually."); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - - // Input host IP address. - String ip = IPAddressInputDialog.open("Input host's IP address"); //$NON-NLS-1$ - if (ip == null) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - - } else { - hostIp = ip; - } - - } else { - hostIp = bridgeIp; - } - } - kernelOption += " host_ip=" + hostIp; //$NON-NLS-1$ - - // Set proxy. - String proxyConfig = null; - String proxyMode = property.getPropertyValue(). - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_PROXY_MODE); - if (proxyMode.equals(NetProxyViewItem.MODE_AUTO)) { - proxyConfig = getHostProxy(); - - } else if (proxyMode.equals(NetProxyViewItem.MODE_MANUAL)) { - proxyConfig = "http_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTP_PROXY) - + " https_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTPS_PROXY) - + " ftp_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_FTP_PROXY) - + " socks_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_SOCKS_PROXY); - } - - if (proxyConfig != null) { - kernelOption += (" " + proxyConfig); //$NON-NLS-1$ - } - - /* set virtio-9p string in case of using directory share [kernel option] */ - if(isFileshare) { - kernelOption += " virtio-9p"; //$NON-NLS-1$ - } - - /* - if(property.getPropertyValue().skin != null && property.getPropertyValue().skin.getButtonType() == SKIN_BUTTON_TYPE.THREE_BUTTON_TYPE) { - kernelOption += " platform_feature=3btn"; - } else { - kernelOption += " platform_feature=1btn"; - } - */ - - cmd.add(kernelOption); - - /* use fileshare [non-kernel option] */ - if(isFileshare) { - cmd.add("-virtfs"); //$NON-NLS-1$ - cmd.add("local,path=" + property.getConfiguration().getUsability().getFileSharing().getPath() +",security_model=none,mount_tag=fileshare"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add("file:" + FilePathResources.getTizenVmsPath() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - CpuType cpuOption = property.getConfiguration().getDevice().getCPU(); - if (cpuOption != null) { - cmd.add("-smp"); //$NON-NLS-1$ - cmd.add(String.valueOf(cpuOption.getValue().getValue())); - } - cmd.add("-m"); //$NON-NLS-1$ - cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue())); - cmd.add("-M"); //$NON-NLS-1$ - cmd.add("maru-x86-machine"); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - cmd.add("nic,model=virtio,macaddr=" + macAddr); //$NON-NLS-1$ - cmd.add("-soundhw"); //$NON-NLS-1$ - cmd.add("all"); //$NON-NLS-1$ - cmd.add("-usb"); //$NON-NLS-1$ - cmd.add("-vga"); //$NON-NLS-1$ - cmd.add("none"); //$NON-NLS-1$ - cmd.add("-enable-vigs"); //$NON-NLS-1$ - cmd.add("-L"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorBiosPath(emulatorPath)); - cmd.add("-kernel"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorKernelPath(emulatorPath) + File.separator+ "bzImage." + property.getArch().toString()); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) { - throw new VMLauncherException("Tap device is not exist : " //$NON-NLS-1$ - + tapName + "\nCheck VM's tap configuration."); //$NON-NLS-1$ - } - cmd.add("tap,ifname=" + tapName + ",script=no,downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } else { - cmd.add("tap,script=/etc/" + IFUP_SCRIPT +",downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } else { - cmd.add("user,dhcpstart=10.0.2.16"); //$NON-NLS-1$ - } - - cmd.add("-rtc"); //$NON-NLS-1$ - cmd.add("base=utc"); //$NON-NLS-1$ - if (property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage() != null - && checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_SWAP))) { - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage().getValue() + ",if=virtio,index=2"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /* append HW virtualization option if supports */ - if (hwVirtualization != null) { - cmd.add(hwVirtualization); - } - - // add hw gl acceleration - if (property.getConfiguration().getUsability().isHwGLAcceleration() - && CheckGPU.isGPUSupported()) { -// cmd.add(CheckVirtualization.getInstance().getGPU_enable_command()); - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("gl"); //$NON-NLS-1$ - cmd.add("-enable-yagl"); //$NON-NLS-1$ - cmd.add("-yagl-backend"); //$NON-NLS-1$ - cmd.add("vigs"); //$NON-NLS-1$ - } else { - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("sw"); //$NON-NLS-1$ - } - - // for suspend - if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE - && property.getConfiguration().getUsability().isSupportSuspend()) { - cmd.add("-enable-suspend"); //$NON-NLS-1$ - } - - // for bootup status - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-esm-pci"); //$NON-NLS-1$ - - // for host keyboard - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-keyboard-pci"); //$NON-NLS-1$ - - // for ecp - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-evdi-pci,profile=" + property.getPropertyValue().baseImage.getProfile()); //$NON-NLS-1$ - - // for brightness - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-brightness"); //$NON-NLS-1$ - - // for vmodem - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-vmodem-pci"); //$NON-NLS-1$ - - // for hardware key - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_HWKEY))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-hwkey-pci"); //$NON-NLS-1$ - } - - // for codec - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_CODEC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("codec-pci"); //$NON-NLS-1$ - } - - // for nfc - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_NFC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-nfc-pci"); //$NON-NLS-1$ - } - - // for battery - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-power-pci"); //$NON-NLS-1$ - /*if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_BATTERY))) { - cmd.add("-device"); - cmd.add("virtio-power-pci"); - }*/ - - // for camera - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_CAMERA))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-camera"); //$NON-NLS-1$ - } - - cmd.add("-device"); //$NON-NLS-1$ - TouchType touchType = property.getConfiguration().getDevice().getTouch(); - if (touchType != null) { - cmd.add("virtio-touchscreen-pci,max_point=" + touchType.getMaxTouchPoint()); //$NON-NLS-1$ - } else { - cmd.add("virtio-touchscreen-pci"); //$NON-NLS-1$ - } - - // for sensor (accel, geo, gyro, light, proxi, haptic, pressure, ultra violet, heart rate meter) - OptionType sensor = property.getPropertyValue().getAdvancedOption(OPT_SENSOR); - if (sensor != null) { - cmd.add("-device"); //$NON-NLS-1$ - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_ACCEL))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("accel"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GEO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("geo"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GYRO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("gyro"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_LIGHT))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("light"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PROXI))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("proxi"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HAPTIC))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("haptic"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PRESS))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("press"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_UV))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("uv"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HRM))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("hrm"); //$NON-NLS-1$ - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-sensor-pci"); //$NON-NLS-1$ - } else { - sb.insert(0, "virtio-sensor-pci,sensors="); //$NON-NLS-1$ - cmd.add(sb.toString()); - } - } - - // for jacks (enabled charger, earjack and usb) - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-jack-pci,jacks=earjack&charger&usb"); //$NON-NLS-1$ - /* OptionType jacks = property.getPropertyValue().getAdvancedOption(OPT_JACK); - if (jacks != null) { - cmd.add("-device"); - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_EARJACK))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("earjack"); - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_CHARGER))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("charger"); - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_USB))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("usb"); - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-jack-pci"); - } else { - sb.insert(0, "virtio-jack-pci,jacks="); - cmd.add(sb.toString()); - } - } */ - } - - /* append user added options if exists */ - String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions(); - if (advancedOptions != null) { - String[] arrOptions = advancedOptions.split(" "); //$NON-NLS-1$ - for (String option : arrOptions) { - cmd.add(option); - } - } - - /* spice options */ - if (RemoteManager.getSpiceMode() - || CheckingRunningEmulator.isRemote(property)) { - cmd.add("-spice"); //$NON-NLS-1$ - cmd.add("disable-ticketing"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0"); //$NON-NLS-1$ - cmd.add("-chardev"); //$NON-NLS-1$ - cmd.add("spicevmc,id=vdagent,name=vdagent"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0"); //$NON-NLS-1$ - } - - //for qt enable - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue( - OPT_EXPERIMENTAL, OPT_QT_ENABLE))) { - if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) { - cmd.add("-display"); //$NON-NLS-1$ - if (EmulatorManager.isMac()) { - cmd.add("maru_qt,rendering=offscreen"); //$NON-NLS-1$ - } else { - cmd.add("maru_qt,rendering=onscreen"); //$NON-NLS-1$ - } - } - } - - EMLogger.getLogger().log(Level.INFO, "Starting Emulator Command : "); //$NON-NLS-1$ - String temp = cmd.get(0) + " "; //$NON-NLS-1$ - for (String s : cmd.subList(1, cmd.size())) { - temp += ("\"" + s + "\" "); //$NON-NLS-1$ //$NON-NLS-2$ - } - EMLogger.getLogger().log(Level.INFO, temp); - System.out.println("cmd : " + cmd); //$NON-NLS-1$ - return cmd; - } - - @Override - public boolean launch(VMProperty property) throws VMLauncherException { - return launch(property, false); - } - - @Override - public boolean launch(VMProperty property, boolean wait) throws VMLauncherException { - List cmd; - - cmd = getLaunchCommand(property, null); - - if (cmd == null) { - return false; - } - - CheckingRunningEmulator.addEmulator(property); - MonitoringEmulator monitor = new MonitoringEmulator(property); - Process process = launch(cmd); - if (process != null) { - monitor.setProcess(process); - monitor.start(); - if (wait) { - try { - monitor.join(); - } catch (InterruptedException e) { - EMLogger.getLogger().warning(e.getMessage()); - } - if (monitor.isSuccess()) { - return true; - } else { - return false; - } - } - return true; - } else { - CheckingRunningEmulator.removeEmulator(property, false); - monitor.interrupt(); - return false; - } - } - - @Override - public Process launch(List cmd) { - ProcessBuilder pb = new ProcessBuilder(cmd); - Map env = pb.environment(); - if (EmulatorManager.isLinux()) { - String value = env.get("LD_LIBRARY_PATH"); //$NON-NLS-1$ - env.put("LD_LIBRARY_PATH", ((value == null) ? "" : value + ":") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - + FilePathResources.getEmulatorBinPath(emulatorPath) + ":" + FilePathResources.getToolEmulatorRemotePath() + File.separator + "lib:"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "LD_LIBRARY_PATH=" + env.get("LD_LIBRARY_PATH")); //$NON-NLS-1$ //$NON-NLS-2$ - } - env.put("GL_VERSION", "2"); //$NON-NLS-1$ //$NON-NLS-2$ - env.put("VIGS_SYNC_READ_PIXELS", "1"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "GL_VERSION: " + env.get("GL_VERSION")); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "VIGS_SYNC_READ_PIXELS: " + env.get("VIGS_SYNC_READ_PIXELS")); //$NON-NLS-1$ //$NON-NLS-2$ - - if (this.binPath == null || this.binPath.isEmpty()) { - pb.directory(new File(FilePathResources.getEmulatorBinPath(emulatorPath))); - } else { - pb.directory(new File(this.binPath)); - } - - Process process = null; - try { - process = pb.start(); - } catch (IOException e) { - if (!isConsole) { - MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent())); - msg.openWarningDialog("Failed to launch" + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - EMLogger.getLogger().log(Level.WARNING, "Failed to launch." + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - - return process; - } - - - private boolean checkOnOff(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } else if (value.toLowerCase().equals("off")) { //$NON-NLS-1$ - return false; - } else if (value.isEmpty()){ - return true; - } else { - return false; - } - } - - private boolean checkOn(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } - return false; - } - - - @Override - public void sendRemoteLog(String msg) { - EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ - } - - private static boolean isTapUsing(String tapName) { - boolean isUsing = false; -// VMProperty arr[] = (VMProperty[]) EmulatorVMList.getInstance() -// .getProperties(); -// int len$ = arr$.length; -// for (int i$ = 0; i$ < len$; i$++) { - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String name = prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE); - if (tapName.equals(name)) { - isUsing = true; - break; - } - } - - return isUsing; - } - - private static boolean isIpAddrUsing(String ipAddr) { - boolean isUsing = false; - - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String ip = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (!ipAddr.equals(ip)) { - continue; - } - isUsing = true; - break; - } - - return isUsing; - } - - private String getIP(boolean useBridgeNet, VMProperty prop) { - StringBuilder sb = new StringBuilder(); - sb.append(" ip="); //$NON-NLS-1$ - if (useBridgeNet) { - String useDHCP = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_DHCP); - if (checkOn(useDHCP)) { - return ""; //$NON-NLS-1$ - } - - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_IPADDR)); - sb.append("::"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_GATEWAY)); - sb.append(":"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_SUBNET)); - sb.append("::eth0:none:"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_DNS)); - - } else { // NAT (default) - //sb.append("10.0.2.16::10.0.2.2:255.255.255.0::eth0:none:10.0.2.3"); - return ""; //$NON-NLS-1$ - } - return sb.toString(); - } - - private String getHostProxy() throws VMLauncherException{ - String result = null; - String proxyCommand = "check-net"; //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - proxyCommand = "check-net.exe"; //$NON-NLS-1$ - } - - List cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath() + File.separator + proxyCommand, "--proxy"); //$NON-NLS-1$ - ProcessResult res = HelperClass.runProcess(cmd); - boolean isCommandSuccess = false; - if (res.isSuccess()) { - for (String str : res.getStdOutMsg()) { - if (str.startsWith("MODE:")) { //$NON-NLS-1$ - isCommandSuccess = true; - } - if (str.startsWith("http_proxy")) { //$NON-NLS-1$ - result = str; - } - } - - } else if (!res.isSuccess() || !isCommandSuccess) { - EMLogger.getLogger().warning(res.getResultMessage()); - int dialogRes = new MessageDialog().openWarningAndSelectionDialog - ("Failed to get host proxy setting." //$NON-NLS-1$ - + "\n" + res.getResultMessage() //$NON-NLS-1$ - + "\nContinue launching anyway ?"); //$NON-NLS-1$ - if (dialogRes != SWT.OK) { - throw new VMLauncherException("User canceled launching VM."); //$NON-NLS-1$ - } - } - - if (result == null) { - EMLogger.getLogger().warning("Can't find host proxy setting."); //$NON-NLS-1$ - EMLogger.getLogger().warning("check-net result : " + res.getResultMessage()); //$NON-NLS-1$ - } - - return result; - } -} diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/VMWorker.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/VMWorker.java index 791405c..4058ae5 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/VMWorker.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/VMWorker.java @@ -39,9 +39,4 @@ public class VMWorker extends VMWorkerCommon { EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ } - @Override - public void initLauncher() { - setLauncher(Launcher.getInstance()); - } - } diff --git a/plugins/wearable/build.xml b/plugins/wearable/build.xml index eb03c23..d26e8a9 100644 --- a/plugins/wearable/build.xml +++ b/plugins/wearable/build.xml @@ -15,7 +15,7 @@ - + diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/widget/VMButtonPainter.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/widget/VMButtonPainter.java index 319aa76..ab40955 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/widget/VMButtonPainter.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/ui/widget/VMButtonPainter.java @@ -29,12 +29,8 @@ package org.tizen.emulator.manager.wearable.ui.widget; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.emulator.manager.resources.FontResources; import org.tizen.emulator.manager.ui.widgets.CommonVMButtonPainter; -import org.tizen.emulator.manager.ui.widgets.VMButton; -import org.tizen.emulator.manager.ui.widgets.WSTATE; +import org.tizen.emulator.manager.ui.widgets.PaintGC; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.VMPropertyValue; @@ -54,22 +50,11 @@ public class VMButtonPainter extends CommonVMButtonPainter { } @Override - public void drawButtonText(GC gc, Rectangle rect, VMButton button) { - VMProperty property = button.getProperty(); + public void drawButtonText(PaintGC gc, VMProperty property) { if (property == null) { return; } - // drawing Title - gc.setForeground(button.getFontColor(button.currentState())); - gc.setFont(FontResources.VM_BUTTON_TITLE_FONT.getFont()); - - gc.setBackground(button.getBackgroundColor(button.currentState())); - gc.drawString(button.getTitle(), button.getTitle_x(), TITLE_Y_OFFSET, true); - - // reset font color - gc.setForeground(button.getFontColor(WSTATE.NORMAL)); - VMPropertyValue value = property.getPropertyValue(); String version = value.baseImage.isStandard() ? property.getImageVersion() : "custom"; diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/Launcher.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/Launcher.java deleted file mode 100644 index a35a774..0000000 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/Launcher.java +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Emulator Manager - * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * MunKyu Im - * 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.wearable.vms; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import org.eclipse.swt.SWT; -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.console.RemoteManager; -import org.tizen.emulator.manager.job.CheckGPU; -import org.tizen.emulator.manager.job.CheckVT; -import org.tizen.emulator.manager.logging.EMLogger; -import org.tizen.emulator.manager.wearable.ui.detail.ItemListFactory; -import org.tizen.emulator.manager.resources.FilePathResources; -import org.tizen.emulator.manager.resources.StringResources; -import org.tizen.emulator.manager.tool.PortHelper; -import org.tizen.emulator.manager.tool.SettingInfoFile; -import org.tizen.emulator.manager.tool.TapUtil; -import org.tizen.emulator.manager.ui.detail.item.CommonItemListFactory; -import org.tizen.emulator.manager.ui.detail.item.property.NetIPInfoViewItem; -import org.tizen.emulator.manager.ui.detail.item.property.NetProxyViewItem; -import org.tizen.emulator.manager.ui.dialog.IPAddressInputDialog; -import org.tizen.emulator.manager.ui.dialog.MessageDialog; -import org.tizen.emulator.manager.vms.EmulatorVMList; -import org.tizen.emulator.manager.vms.ILauncher; -import org.tizen.emulator.manager.vms.VMProperty; -import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator; -import org.tizen.emulator.manager.vms.helper.HelperClass; -import org.tizen.emulator.manager.vms.helper.MonitoringEmulator; -import org.tizen.emulator.manager.vms.helper.ProcessResult; -import org.tizen.emulator.manager.vms.helper.VMLauncherException; -import org.tizen.emulator.manager.vms.xml.CpuType; -import org.tizen.emulator.manager.vms.xml.OptionType; -import org.tizen.emulator.manager.vms.helper.VMWorkerException; -import org.tizen.emulator.manager.vms.xml.TouchType; - -public class Launcher implements ILauncher { - private boolean isConsole = false; - private String binPath = null; - private String emulatorPath; - private static Launcher launcher; - public static final String IFUP_SCRIPT = "emulator-ifup.sh"; //$NON-NLS-1$ - - // Option names in vm_config.xml - // Add if need. - public static final String OPT_DEVICE = "device"; //$NON-NLS-1$ - public static final String OPT_NFC = "nfc"; //$NON-NLS-1$ - public static final String OPT_BATTERY = "battery"; //$NON-NLS-1$ - public static final String OPT_CAMERA = "camera"; //$NON-NLS-1$ - public static final String OPT_HWKEY = "hwkey"; //$NON-NLS-1$ - public static final String OPT_SWAP = "swap"; //$NON-NLS-1$ - public static final String OPT_CODEC = "codec"; //$NON-NLS-1$ - - public static final String OPT_JACK = "jack"; //$NON-NLS-1$ - public static final String OPT_USB = "usb"; //$NON-NLS-1$ - public static final String OPT_CHARGER = "charger"; //$NON-NLS-1$ - - public static final String OPT_SENSOR = "sensor"; //$NON-NLS-1$ - public static final String OPT_ACCEL = "accel"; //$NON-NLS-1$ - public static final String OPT_GYRO = "gyro"; //$NON-NLS-1$ - public static final String OPT_GEO = "geo"; //$NON-NLS-1$ - public static final String OPT_LIGHT = "light"; //$NON-NLS-1$ - public static final String OPT_PROXI = "proxi"; //$NON-NLS-1$ - public static final String OPT_HAPTIC = "haptic"; //$NON-NLS-1$ - public static final String OPT_PRESS = "press"; // pressure //$NON-NLS-1$ - public static final String OPT_UV = "uv"; // ultra violet //$NON-NLS-1$ - public static final String OPT_HRM = "hrm"; // heartbeat rate meter //$NON-NLS-1$ - - public static final String OPT_EXPERIMENTAL = ItemListFactory.ITEM_EXPERIMENTAL; - public static final String OPT_QT_ENABLE = "qtEnable"; //$NON-NLS-1$ - - // Network option. - public static final String OPT_NET_CONNECT_TYPE = CommonItemListFactory.ITEM_NET_CONNECT_TYPE; - public static final String OPT_NET_TAP_DEVICE = CommonItemListFactory.ITEM_NET_TAP_DEVICE; - public static final String OPT_NET_IP_INFO = CommonItemListFactory.ITEM_NET_IP_INFO; - public static final String OPT_NET_IPADDR = NetIPInfoViewItem.ITEM_IP; - public static final String OPT_NET_SUBNET = NetIPInfoViewItem.ITEM_SUBNET; - public static final String OPT_NET_GATEWAY = NetIPInfoViewItem.ITEM_GATEWAY; - public static final String OPT_NET_DNS = CommonItemListFactory.ITEM_NET_DNS; - public static final String OPT_NET_MAC = CommonItemListFactory.ITEM_NET_MAC; - public static final String OPT_NET_PROXY = CommonItemListFactory.ITEM_NET_PROXY; - public static final String OPT_NET_DHCP = NetIPInfoViewItem.ITEM_USE_DHCP; - - public static Launcher getInstance() { - if (launcher == null) { - launcher = new Launcher(); - } - return launcher; - } - - public Launcher() { - isConsole = EmulatorManager.isConsoleMode(); - } - - @Override - public List getLaunchCommand(VMProperty property, String path) - throws VMLauncherException { - String binary; - String hwVirtualization = null; - int portNo; - boolean useBridgeNet = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_CONNECT_TYPE).equals("Bridge") && //$NON-NLS-1$ - (EmulatorManager.isLinux() || EmulatorManager.isWin() || EmulatorManager.isMac()); - String tapName = null; - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) - throw new VMLauncherException((new StringBuilder()) - .append("Tap device is not exist : ").append(tapName) //$NON-NLS-1$ - .append("\nCheck VM's tap configuration.").toString()); //$NON-NLS-1$ - if (isTapUsing(tapName)) - throw new VMLauncherException( - (new StringBuilder()) - .append("Tap device(") //$NON-NLS-1$ - .append(tapName) - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease select another tap device for current VM.") //$NON-NLS-1$ - .toString()); - String ipAddr = property.getPropertyValue() - .getAdvancedOptionSubValue(OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (isIpAddrUsing(ipAddr)) - throw new VMLauncherException((new StringBuilder()) - .append("VM's ip address(").append(ipAddr) //$NON-NLS-1$ - .append(") is being used by other VM.") //$NON-NLS-1$ - .append("\nPlease modify current VM's ip address.") //$NON-NLS-1$ - .toString()); - } - if (EmulatorManager.isWin()) { - try { - if (!TapUtil.isTapInBridge(tapName)) { - MessageDialog dialog = new MessageDialog(); - int res = dialog - .openWarningAndSelectionDialog("\nTap device is not connected with Bridge." //$NON-NLS-1$ - + "\nGuest network would work as NAT." //$NON-NLS-1$ - + "\nKeep launching ?"); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - useBridgeNet = false; - } - - } catch (VMWorkerException e) { - throw new VMLauncherException(e.getMessage()); - } - } - } - /* check available port number */ - portNo = new PortHelper().getPortNo(); - if(portNo == -1) { - String error = "Can not execute emulator." //$NON-NLS-1$ - + StringResources.NEW_LINE - + "All available ports are in use."; //$NON-NLS-1$ - throw new VMLauncherException(error); - } - - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - binary = "emulator-x86.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-x86"; //$NON-NLS-1$ - } - } else { - if (EmulatorManager.isWin()) { - binary = "emulator-arm.exe"; //$NON-NLS-1$ - } else { - binary = "emulator-arm"; //$NON-NLS-1$ - } - } - - // check disk image - File child = new File(property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()); - File base = new File(property.getConfiguration().getBaseInformation().getDiskImage().getBaseDiskImage().getValue()); - if (!child.exists()) { - throw new VMLauncherException("Child disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + child.getAbsolutePath() - , true); - } - if (!base.exists()) { - throw new VMLauncherException("Base disk image does not exist." //$NON-NLS-1$ - + StringResources.NEW_LINE + base.getAbsolutePath() - , true); - } - - if (property.getConfiguration().getUsability().isHwVirtualization() && CheckVT.isVTSupported()) { - hwVirtualization = CheckVT.getVTEnablingCommand(); - } - - List cmd = new ArrayList(); - int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth(); - int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight(); - String skinPath = null; - if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) { - skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath(); - if (skinPath != null && skinPath.isEmpty()) { - skinPath = null; - } - } - String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath(); - //String osVersion = System.getProperty("os.version"); - boolean isFileshare = true; - if (fileshare == null) { - isFileshare = false; - } - - /* get MAC address of host set as guest MAC address */ - String macAddr = useBridgeNet ? property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_MAC) : SettingInfoFile - .getMACaddr(); - - if(macAddr.isEmpty()) { - macAddr = "52:54:00:12:34:56"; //$NON-NLS-1$ - EMLogger.getLogger().log(Level.INFO, String.format("MAC set as default = %s", macAddr)); //$NON-NLS-1$ - } - - emulatorPath = property.getPropertyValue().baseImage.getPlatform().getEmulatorPath(); - if (path == null || path.isEmpty()) { - cmd.add(FilePathResources.getEmulatorBinPath(emulatorPath) + File.separator + binary); - } else { - this.binPath = path; - cmd.add(binPath + File.separator + binary); - } - - cmd.add("--skin-args"); //$NON-NLS-1$ - cmd.add("width=" + width); //$NON-NLS-1$ - cmd.add("height=" + height); //$NON-NLS-1$ - if (skinPath != null) { - cmd.add("skin.path=" + skinPath); //$NON-NLS-1$ - } - - if (RemoteManager.getSpiceMode()) { - cmd.add("hb.ignore=true"); //$NON-NLS-1$ - } - - cmd.add("--qemu-args"); //$NON-NLS-1$ - // x86 part of cmd - if (property.getArch().toString().equals("x86")) { //$NON-NLS-1$ - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()+ ",if=virtio,index=1"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add( "-boot"); //$NON-NLS-1$ - cmd.add("c"); //$NON-NLS-1$ - cmd.add("-append"); //$NON-NLS-1$ - - String kernelOption = "console=ttyS0 video=LVDS-1:" //$NON-NLS-1$ - + width - + "x" //$NON-NLS-1$ - + height - + "-32@60" //$NON-NLS-1$ - + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 //$NON-NLS-1$ - + getIP(useBridgeNet, property) - + " vm_name=" + property.getConfiguration().getBaseInformation().getName(); //$NON-NLS-1$ - String hostIp = "10.0.2.2"; //$NON-NLS-1$ - if (useBridgeNet) { - String bridgeIp = TapUtil.getBridgeIpAddr(property - .getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE)); - if (bridgeIp == null) { - MessageDialog dialog = new MessageDialog(); - int res = dialog.openInfoDialog( - "\nCannot find host(bridge) IP address." //$NON-NLS-1$ - + "\nTo use bridge network, host IP is required." //$NON-NLS-1$ - + "\nPlease input manually."); //$NON-NLS-1$ - if (res != SWT.OK) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - } - - // Input host IP address. - String ip = IPAddressInputDialog.open("Input host's IP address"); //$NON-NLS-1$ - if (ip == null) { - throw new VMLauncherException("User canceled."); //$NON-NLS-1$ - - } else { - hostIp = ip; - } - - } else { - hostIp = bridgeIp; - } - } - kernelOption += " host_ip=" + hostIp; //$NON-NLS-1$ - - // Set proxy. - String proxyConfig = null; - String proxyMode = property.getPropertyValue(). - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_PROXY_MODE); - if (proxyMode.equals(NetProxyViewItem.MODE_AUTO)) { - proxyConfig = getHostProxy(); - - } else if (proxyMode.equals(NetProxyViewItem.MODE_MANUAL)) { - proxyConfig = "http_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTP_PROXY) - + " https_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_HTTPS_PROXY) - + " ftp_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_FTP_PROXY) - + " socks_proxy=" + property.getPropertyValue(). //$NON-NLS-1$ - getAdvancedOptionSubValue(OPT_NET_PROXY, NetProxyViewItem.ITEM_SOCKS_PROXY); - } - - if (proxyConfig != null) { - kernelOption += (" " + proxyConfig); //$NON-NLS-1$ - } - - /* set virtio-9p string in case of using directory share [kernel option] */ - if(isFileshare) { - kernelOption += " virtio-9p"; //$NON-NLS-1$ - } - /* - if(property.getPropertyValue().skin != null && property.getPropertyValue().skin.getButtonType() == SKIN_BUTTON_TYPE.THREE_BUTTON_TYPE) { - kernelOption += " platform_feature=3btn"; - } else { - kernelOption += " platform_feature=1btn"; - } - */ - - cmd.add(kernelOption); - - /* use fileshare [non-kernel option] */ - if (isFileshare) { - cmd.add("-virtfs"); //$NON-NLS-1$ - cmd.add("local,path=" + property.getConfiguration().getUsability().getFileSharing().getPath() +",security_model=none,mount_tag=fileshare"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add("file:" + FilePathResources.getTizenVmsPath() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - CpuType cpuOption = property.getConfiguration().getDevice().getCPU(); - if (cpuOption != null) { - cmd.add("-smp"); //$NON-NLS-1$ - cmd.add(String.valueOf(cpuOption.getValue().getValue())); - } - cmd.add("-m"); //$NON-NLS-1$ - cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue())); - cmd.add("-M"); //$NON-NLS-1$ - cmd.add("maru-x86-machine"); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - cmd.add("nic,model=virtio,macaddr=" + macAddr); //$NON-NLS-1$ - cmd.add("-soundhw"); //$NON-NLS-1$ - cmd.add("all"); //$NON-NLS-1$ - cmd.add("-usb"); //$NON-NLS-1$ - cmd.add("-vga"); //$NON-NLS-1$ - cmd.add("none"); //$NON-NLS-1$ - cmd.add("-enable-vigs"); //$NON-NLS-1$ - cmd.add("-L"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorBiosPath(emulatorPath)); - cmd.add("-kernel"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorKernelPath(emulatorPath) + File.separator+ "bzImage." + property.getArch().toString()); //$NON-NLS-1$ - cmd.add("-net"); //$NON-NLS-1$ - if (useBridgeNet) { - if (EmulatorManager.isWin()) { - tapName = property.getPropertyValue() - .getAdvancedOptionValue(OPT_NET_TAP_DEVICE); - if (TapUtil.nameNotExist(tapName)) { - throw new VMLauncherException("Tap device is not exist : " //$NON-NLS-1$ - + tapName + "\nCheck VM's tap configuration."); //$NON-NLS-1$ - } - cmd.add("tap,ifname=" + tapName + ",script=no,downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } else { - cmd.add("tap,script=/etc/" + IFUP_SCRIPT +",downscript=no"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } else { - cmd.add("user,dhcpstart=10.0.2.16"); //$NON-NLS-1$ - } - - cmd.add("-rtc"); //$NON-NLS-1$ - cmd.add("base=utc"); //$NON-NLS-1$ - if (property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage() != null) { - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage().getValue() + ",if=virtio,index=2"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /* append HW virtualization option if supports */ - if (hwVirtualization != null) { - cmd.add(hwVirtualization); - } - - // add hw gl acceleration - if (property.getConfiguration().getUsability().isHwGLAcceleration() - && CheckGPU.isGPUSupported()) { - //cmd.add(CheckVirtualization.getInstance().getGPU_enable_command()); - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("gl"); //$NON-NLS-1$ - cmd.add("-enable-yagl"); //$NON-NLS-1$ - cmd.add("-yagl-backend"); //$NON-NLS-1$ - cmd.add("vigs"); //$NON-NLS-1$ - } else { - cmd.add("-vigs-backend"); //$NON-NLS-1$ - cmd.add("sw"); //$NON-NLS-1$ - } - - // for bootup status - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-esm-pci"); //$NON-NLS-1$ - - // for brightness - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-brightness"); //$NON-NLS-1$ - - // for vmodem - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-vmodem-pci"); //$NON-NLS-1$ - - // for hardware key - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_HWKEY))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-hwkey-pci"); //$NON-NLS-1$ - } - - // for codec - if (checkOnOff(property.getPropertyValue().getAdvancedOptionValue(OPT_CODEC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("codec-pci"); //$NON-NLS-1$ - } - - // for ecp - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-evdi-pci,profile=" + property.getPropertyValue().baseImage.getProfile()); //$NON-NLS-1$ - - // for camera - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_CAMERA))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("maru-camera"); //$NON-NLS-1$ - } - - // for battery - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-power-pci"); //$NON-NLS-1$ - - // for nfc - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_DEVICE, OPT_NFC))) { - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-nfc-pci"); //$NON-NLS-1$ - } - - // for sensor (accel, geo, gyro, light, proxi, haptic, pressure, ultra violet, heart rate meter) - OptionType sensor = property.getPropertyValue().getAdvancedOption(OPT_SENSOR); - if (sensor != null) { - cmd.add("-device"); //$NON-NLS-1$ - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_ACCEL))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("accel"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GEO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("geo"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_GYRO))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("gyro"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_LIGHT))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("light"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PROXI))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("proxi"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HAPTIC))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("haptic"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PRESS))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("press"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_UV))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("uv"); //$NON-NLS-1$ - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HRM))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); //$NON-NLS-1$ - } - sb.append("hrm"); //$NON-NLS-1$ - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-sensor-pci"); //$NON-NLS-1$ - } else { - sb.insert(0, "virtio-sensor-pci,sensors="); //$NON-NLS-1$ - cmd.add(sb.toString()); - } - } - - // for jacks (enabled charger, and usb) - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-jack-pci,jacks=charger&usb"); //$NON-NLS-1$ - /* OptionType jacks = property.getPropertyValue().getAdvancedOption(OPT_JACK); - if (jacks != null) { - cmd.add("-device"); - - StringBuilder sb = new StringBuilder(); - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_CHARGER))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("charger"); - } - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_JACK, OPT_USB))) { - if(!sb.toString().isEmpty()) { - sb.append("&"); - } - sb.append("usb"); - } - - if (sb.toString().isEmpty()) { - cmd.add("virtio-jack-pci"); - } else { - sb.insert(0, "virtio-jack-pci,jacks="); - cmd.add(sb.toString()); - } - } */ - - - cmd.add("-device"); //$NON-NLS-1$ - TouchType touchType = property.getConfiguration().getDevice().getTouch(); - if (touchType != null) { - cmd.add("virtio-touchscreen-pci,max_point=" + touchType.getMaxTouchPoint()); //$NON-NLS-1$ - } else { - cmd.add("virtio-touchscreen-pci"); //$NON-NLS-1$ - } - - } else { // ARM part of cmd - cmd.add("-drive"); //$NON-NLS-1$ - cmd.add("file=" + property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue()+ ",id=virtio-blk,if=none"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add( "-device"); //$NON-NLS-1$ - cmd.add("virtio-blk,drive=virtio-blk,transport=virtio-mmio.0"); //$NON-NLS-1$ - cmd.add("-netdev"); //$NON-NLS-1$ - cmd.add("user,id=virtio-net"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-net,netdev=virtio-net,transport=virtio-mmio.1"); //$NON-NLS-1$ - cmd.add("-append"); //$NON-NLS-1$ - cmd.add("yagl=1 console=ttySAC2,115200 video=s3cfb:" //$NON-NLS-1$ - + width - + "x" //$NON-NLS-1$ - + height - + "-24" //$NON-NLS-1$ - + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 //$NON-NLS-1$ - + " rootwait root=/dev/vda rw rootfstype=ext4" //$NON-NLS-1$ - + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none" //$NON-NLS-1$ - + " vm_name=" + property.getConfiguration().getBaseInformation().getName() //$NON-NLS-1$ - + " virtio_mmio.device=4K@0x10AD0000:423 virtio_mmio.device=4K@0x10AC0000:422"); //$NON-NLS-1$ - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add(EmulatorManager.isLinux() ? "/dev/null" : "none"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add(EmulatorManager.isLinux() ? "/dev/null" : "none"); //$NON-NLS-1$ //$NON-NLS-2$ - cmd.add("-serial"); //$NON-NLS-1$ - cmd.add("file:" + FilePathResources.getTizenVmsPath() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - cmd.add("-m"); //$NON-NLS-1$ - cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue())); - cmd.add("-M"); //$NON-NLS-1$ - cmd.add("maru-arm-machine"); //$NON-NLS-1$ - cmd.add("-soundhw"); //$NON-NLS-1$ - cmd.add("all"); //$NON-NLS-1$ - cmd.add("-usb"); //$NON-NLS-1$ - cmd.add("-usbdevice"); //$NON-NLS-1$ - cmd.add("maru-touchscreen"); //$NON-NLS-1$ - cmd.add("-kernel"); //$NON-NLS-1$ - cmd.add(FilePathResources.getEmulatorKernelPath(emulatorPath) + File.separator+ "bzImage." + property.getArch().toString()); //$NON-NLS-1$ - } - - //} - - /* append user added options if exists */ - String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions(); - if (advancedOptions != null) { - String[] arrOptions = advancedOptions.split(" "); //$NON-NLS-1$ - for (String option : arrOptions) { - cmd.add(option); - } - } - - /* spice options */ - if (RemoteManager.getSpiceMode()) { - cmd.add("-spice"); //$NON-NLS-1$ - cmd.add("disable-ticketing"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0"); //$NON-NLS-1$ - cmd.add("-chardev"); //$NON-NLS-1$ - cmd.add("spicevmc,id=vdagent,name=vdagent"); //$NON-NLS-1$ - cmd.add("-device"); //$NON-NLS-1$ - cmd.add("virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0"); //$NON-NLS-1$ - } - - //for qt enable - if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue( - OPT_EXPERIMENTAL, OPT_QT_ENABLE))) { - if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) { - cmd.add("-display"); //$NON-NLS-1$ - if (EmulatorManager.isMac()) { - cmd.add("maru_qt,rendering=offscreen"); //$NON-NLS-1$ - } else { - cmd.add("maru_qt,rendering=onscreen"); //$NON-NLS-1$ - } - } - } - - EMLogger.getLogger().log(Level.INFO, "Starting Emulator Command : "); //$NON-NLS-1$ - String temp = cmd.get(0) + " "; //$NON-NLS-1$ - for (String s : cmd.subList(1, cmd.size())) { - temp += ("\"" + s + "\" "); //$NON-NLS-1$ //$NON-NLS-2$ - } - EMLogger.getLogger().log(Level.INFO, temp); - System.out.println("cmd : " + cmd); //$NON-NLS-1$ - return cmd; - } - - @Override - public boolean launch(VMProperty property) throws VMLauncherException { - return launch(property, false); - } - - @Override - public boolean launch(VMProperty property, boolean wait) throws VMLauncherException { - List cmd; - - cmd = getLaunchCommand(property, null); - - if (cmd == null) { - return false; - } - - CheckingRunningEmulator.addEmulator(property); - MonitoringEmulator monitor = new MonitoringEmulator(property); - Process process = launch(cmd); - if (process != null) { - monitor.setProcess(process); - monitor.start(); - if (wait) { - try { - monitor.join(); - } catch (InterruptedException e) { - EMLogger.getLogger().warning(e.getMessage()); - } - if (monitor.isSuccess()) { - return true; - } else { - return false; - } - } - return true; - } else { - CheckingRunningEmulator.removeEmulator(property, false); - monitor.interrupt(); - return false; - } - } - - @Override - public Process launch(List cmd) { - ProcessBuilder pb = new ProcessBuilder(cmd); - Map env = pb.environment(); - if (EmulatorManager.isLinux()) { - String value = env.get("LD_LIBRARY_PATH"); //$NON-NLS-1$ - env.put("LD_LIBRARY_PATH", ((value == null) ? "" : value + ":") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - + FilePathResources.getEmulatorBinPath(emulatorPath) + ":" + FilePathResources.getToolEmulatorRemotePath() + File.separator + "lib:"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "LD_LIBRARY_PATH=" + env.get("LD_LIBRARY_PATH")); //$NON-NLS-1$ //$NON-NLS-2$ - } - env.put("GL_VERSION", "2"); //$NON-NLS-1$ //$NON-NLS-2$ - env.put("VIGS_SYNC_READ_PIXELS", "1"); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "GL_VERSION: " + env.get("GL_VERSION")); //$NON-NLS-1$ //$NON-NLS-2$ - EMLogger.getLogger().log(Level.INFO, "VIGS_SYNC_READ_PIXELS: " + env.get("VIGS_SYNC_READ_PIXELS")); //$NON-NLS-1$ //$NON-NLS-2$ - - if (this.binPath == null || this.binPath.isEmpty()) { - pb.directory(new File(FilePathResources.getEmulatorBinPath(emulatorPath))); - } else { - pb.directory(new File(this.binPath)); - } - - Process process = null; - try { - process = pb.start(); - } catch (IOException e) { - if (!isConsole) { - MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent())); - msg.openWarningDialog("Failed to launch" + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - EMLogger.getLogger().log(Level.WARNING, "Failed to launch." + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$ - } - - return process; - } - - private boolean checkOnOff(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } else if (value.toLowerCase().equals("off")) { //$NON-NLS-1$ - return false; - } else if (value.isEmpty()){ - return true; - } else { - return false; - } - } - - private boolean checkOn(String value) { - if (value.toLowerCase().equals("on")) { //$NON-NLS-1$ - return true; - } - return false; - } - - @Override - public void sendRemoteLog(String msg) { - EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ - } - - private static boolean isTapUsing(String tapName) { - boolean isUsing = false; -// VMProperty arr[] = (VMProperty[]) EmulatorVMList.getInstance() -// .getProperties(); -// int len$ = arr$.length; -// for (int i$ = 0; i$ < len$; i$++) { - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String name = prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_TAP_DEVICE); - if (tapName.equals(name)) { - isUsing = true; - break; - } - } - - return isUsing; - } - - private static boolean isIpAddrUsing(String ipAddr) { - boolean isUsing = false; - - for (VMProperty prop : EmulatorVMList.getInstance().getProperties()) { - if (!prop.isRunning()) { - continue; - } - String ip = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, "ipAddr"); //$NON-NLS-1$ - if (!ipAddr.equals(ip)) { - continue; - } - isUsing = true; - break; - } - - return isUsing; - } - - private String getIP(boolean useBridgeNet, VMProperty prop) { - StringBuilder sb = new StringBuilder(); - sb.append(" ip="); //$NON-NLS-1$ - if (useBridgeNet) { - String useDHCP = prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_DHCP); - if (checkOn(useDHCP)) { - return ""; //$NON-NLS-1$ - } - - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_IPADDR)); - sb.append("::"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_GATEWAY)); - sb.append(":"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionSubValue( - OPT_NET_IP_INFO, OPT_NET_SUBNET)); - sb.append("::eth0:none:"); //$NON-NLS-1$ - sb.append(prop.getPropertyValue().getAdvancedOptionValue( - OPT_NET_DNS)); - - } else { // NAT (default) - //sb.append("10.0.2.16::10.0.2.2:255.255.255.0::eth0:none:10.0.2.3"); - return ""; //$NON-NLS-1$ - } - return sb.toString(); - } - - private String getHostProxy() throws VMLauncherException{ - String result = null; - String proxyCommand = "check-net"; //$NON-NLS-1$ - if (EmulatorManager.isWin()) { - proxyCommand = "check-net.exe"; //$NON-NLS-1$ - } - - List cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath() + File.separator + proxyCommand, "--proxy"); //$NON-NLS-1$ - ProcessResult res = HelperClass.runProcess(cmd); - boolean isCommandSuccess = false; - if (res.isSuccess()) { - for (String str : res.getStdOutMsg()) { - if (str.startsWith("MODE:")) { //$NON-NLS-1$ - isCommandSuccess = true; - } - if (str.startsWith("http_proxy")) { //$NON-NLS-1$ - result = str; - } - } - - } else if (!res.isSuccess() || !isCommandSuccess) { - EMLogger.getLogger().warning(res.getResultMessage()); - int dialogRes = new MessageDialog().openWarningAndSelectionDialog - ("Failed to get host proxy setting." //$NON-NLS-1$ - + "\n" + res.getResultMessage() //$NON-NLS-1$ - + "\nContinue launching anyway ?"); //$NON-NLS-1$ - if (dialogRes != SWT.OK) { - throw new VMLauncherException("User canceled launching VM."); //$NON-NLS-1$ - } - } - - if (result == null) { - EMLogger.getLogger().warning("Can't find host proxy setting."); //$NON-NLS-1$ - EMLogger.getLogger().warning("check-net result : " + res.getResultMessage()); //$NON-NLS-1$ - } - - return result; - } - -} diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/VMWorker.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/VMWorker.java index b0e55a9..3c9be76 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/VMWorker.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/VMWorker.java @@ -39,9 +39,4 @@ public class VMWorker extends VMWorkerCommon { EMLogger.getLogger().info("Launcher log : " + msg); //$NON-NLS-1$ } - @Override - public void initLauncher() { - setLauncher(Launcher.getInstance()); - } - } \ No newline at end of file -- cgit v1.2.3 From 2647f4e8f8469c8cb02529f2a55af66a814e5b01 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Mon, 30 Nov 2015 18:08:23 +0900 Subject: package: remove swt package dependency Change-Id: Ic49f7df0c59651570b0fa1430d19f6d1722581fd Signed-off-by: jihye424.kim --- package/build.linux | 1 - package/pkginfo.manifest | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/build.linux b/package/build.linux index 949e867..800d140 100755 --- a/package/build.linux +++ b/package/build.linux @@ -15,7 +15,6 @@ build() cd "$SRCDIR" mkdir "$SRCDIR/lib" - cp "$ROOTDIR/swt_4.4/swt.jar" "$SRCDIR/lib" cp "$ROOTDIR/tools/emulator/bin/emulator-manager.jar" "$SRCDIR/lib" PKG_INFO=$SRCDIR/package/pkginfo.manifest diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index a21880d..445444c 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -5,18 +5,18 @@ Maintainer: MinKee Lee , Jihye Kim Date: Mon, 30 Nov 2015 18:13:11 +0900 Subject: option: replace deprecated function with new function - replace deprecated function for remove warning Change-Id: I221001d9fc5238c1cd4749ab2f255b23ec17750b Signed-off-by: jihye424.kim --- .../org/tizen/emulator/manager/mobile/vms/option/MJackOption.java | 5 ++--- .../org/tizen/emulator/manager/mobile/vms/option/MSensorOption.java | 5 ++--- .../tv/src/org/tizen/emulator/manager/tv/vms/option/TJackOption.java | 5 ++--- .../src/org/tizen/emulator/manager/tv/vms/option/TSensorOption.java | 5 ++--- .../org/tizen/emulator/manager/wearable/vms/option/WJackOption.java | 5 ++--- .../tizen/emulator/manager/wearable/vms/option/WSensorOption.java | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MJackOption.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MJackOption.java index 9406697..4ec4da2 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MJackOption.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MJackOption.java @@ -29,18 +29,17 @@ package org.tizen.emulator.manager.mobile.vms.option; import org.tizen.emulator.manager.mobile.ui.detail.MItemName; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; public class MJackOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType jacks = property.getPropertyValue().getAdvancedOption( - MItemName.JACK); + VMOption jacks = property.getPropertyValue().getVMAdvancedOption(MItemName.JACK); StringBuilder sb = new StringBuilder(); if (jacks != null) { if (checkOnOff(property.getPropertyValue() diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MSensorOption.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MSensorOption.java index 7e780bc..cc7a2c4 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MSensorOption.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MSensorOption.java @@ -29,18 +29,17 @@ package org.tizen.emulator.manager.mobile.vms.option; import org.tizen.emulator.manager.mobile.ui.detail.MItemName; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; public class MSensorOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType sensor = property.getPropertyValue().getAdvancedOption( - MItemName.SENSOR); + VMOption sensor = property.getPropertyValue().getVMAdvancedOption(MItemName.SENSOR); StringBuilder sb = new StringBuilder(); if (sensor != null) { if (checkOnOff(property.getPropertyValue() diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TJackOption.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TJackOption.java index 3fa00bc..63cf789 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TJackOption.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TJackOption.java @@ -29,18 +29,17 @@ package org.tizen.emulator.manager.tv.vms.option; import org.tizen.emulator.manager.tv.ui.detail.TItemName; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; public class TJackOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType jacks = property.getPropertyValue().getAdvancedOption( - TItemName.JACK); + VMOption jacks = property.getPropertyValue().getVMAdvancedOption(TItemName.JACK); StringBuilder sb = new StringBuilder(); if (jacks != null) { if (checkOnOff(property.getPropertyValue() diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TSensorOption.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TSensorOption.java index b320515..e6cb5a4 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TSensorOption.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TSensorOption.java @@ -29,18 +29,17 @@ package org.tizen.emulator.manager.tv.vms.option; import org.tizen.emulator.manager.tv.ui.detail.TItemName; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; public class TSensorOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType sensor = property.getPropertyValue().getAdvancedOption( - TItemName.SENSOR); + VMOption sensor = property.getPropertyValue().getVMAdvancedOption(TItemName.SENSOR); StringBuilder sb = new StringBuilder(); if (sensor != null) { if (checkOnOff(property.getPropertyValue() diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WJackOption.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WJackOption.java index beb2bdb..5c73228 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WJackOption.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WJackOption.java @@ -28,19 +28,18 @@ package org.tizen.emulator.manager.wearable.vms.option; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; import org.tizen.emulator.manager.wearable.ui.detail.WItemName; public class WJackOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType jacks = property.getPropertyValue().getAdvancedOption( - WItemName.JACK); + VMOption jacks = property.getPropertyValue().getVMAdvancedOption(WItemName.JACK); StringBuilder sb = new StringBuilder(); if (jacks != null) { if (checkOnOff(property.getPropertyValue() diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WSensorOption.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WSensorOption.java index 03d4ae4..25ed528 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WSensorOption.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WSensorOption.java @@ -28,19 +28,18 @@ package org.tizen.emulator.manager.wearable.vms.option; +import org.tizen.emulator.manager.vms.VMOption; import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.OptionType; import org.tizen.emulator.manager.wearable.ui.detail.WItemName; public class WSensorOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - OptionType sensor = property.getPropertyValue().getAdvancedOption( - WItemName.SENSOR); + VMOption sensor = property.getPropertyValue().getVMAdvancedOption(WItemName.SENSOR); StringBuilder sb = new StringBuilder(); if (sensor != null) { if (checkOnOff(property.getPropertyValue() -- cgit v1.2.3 From ebf12d5a87d45ea0281cc485b12d8da2f22884ae Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Mon, 30 Nov 2015 18:41:52 +0900 Subject: direct-rendering: remove direct-rendering option SWT GUI is not supported from 3.0. Change-Id: Icc7ef11afd808082699680108f9513f4b3941d4e Signed-off-by: minkee.lee --- plugins/mobile/template/x86-standard-template.xml | 8 -------- plugins/tv/template/x86-standard-template.xml | 8 -------- plugins/wearable/template/x86-standard-template.xml | 8 -------- 3 files changed, 24 deletions(-) diff --git a/plugins/mobile/template/x86-standard-template.xml b/plugins/mobile/template/x86-standard-template.xml index e845034..7f9cad7 100644 --- a/plugins/mobile/template/x86-standard-template.xml +++ b/plugins/mobile/template/x86-standard-template.xml @@ -127,14 +127,6 @@ - - - - - - - - diff --git a/plugins/tv/template/x86-standard-template.xml b/plugins/tv/template/x86-standard-template.xml index 3f1f641..df8fed0 100644 --- a/plugins/tv/template/x86-standard-template.xml +++ b/plugins/tv/template/x86-standard-template.xml @@ -125,14 +125,6 @@ - - - - - - - - diff --git a/plugins/wearable/template/x86-standard-template.xml b/plugins/wearable/template/x86-standard-template.xml index 0abcec6..4820c54 100644 --- a/plugins/wearable/template/x86-standard-template.xml +++ b/plugins/wearable/template/x86-standard-template.xml @@ -115,14 +115,6 @@ - - - - - - - - -- cgit v1.2.3 From cc048aae9ea12eb5d2c38265549df22d31ca29b8 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Tue, 12 Jan 2016 12:19:30 +0900 Subject: remove build dependency with swt.jar Change-Id: Ic932f7879db2801a75de2742ea27f538f0fe67b4 Signed-off-by: jihye424.kim --- plugins/tv/.classpath | 1 - plugins/wearable/.classpath | 1 - 2 files changed, 2 deletions(-) diff --git a/plugins/tv/.classpath b/plugins/tv/.classpath index 3b8e13c..1e4c2b3 100644 --- a/plugins/tv/.classpath +++ b/plugins/tv/.classpath @@ -3,6 +3,5 @@ - diff --git a/plugins/wearable/.classpath b/plugins/wearable/.classpath index 3b8e13c..1e4c2b3 100644 --- a/plugins/wearable/.classpath +++ b/plugins/wearable/.classpath @@ -3,6 +3,5 @@ - -- cgit v1.2.3 From cc0dd15c437a8b951d7c0ab2f9b1e9d0cc1ac17a Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Tue, 12 Jan 2016 12:20:11 +0900 Subject: launch option: replace deprecated method Change-Id: I60269daa0aa9a777fc9f61ab1ab9459a4c3a8dd0 Signed-off-by: jihye424.kim --- .../emulator/manager/mobile/vms/option/MTouchPointOption.java | 7 ++----- .../tizen/emulator/manager/tv/vms/option/TTouchPointOption.java | 7 ++----- .../emulator/manager/wearable/vms/option/WTouchPointOption.java | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MTouchPointOption.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MTouchPointOption.java index 3a3ffac..def0ab8 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MTouchPointOption.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/MTouchPointOption.java @@ -33,17 +33,14 @@ import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.TouchType; public class MTouchPointOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - TouchType touchType = property.getConfiguration().getDevice() - .getTouch(); - if (touchType != null && touchType.getMaxTouchPoint() > 0) { + if (property.getPropertyValue().maxTouchCount > 0) { config.addVariable(OPTION_KEY.VAR_MAX_POINT, - String.valueOf(touchType.getMaxTouchPoint())); + String.valueOf(property.getPropertyValue().maxTouchCount)); config.addQemuOption("-device", "virtio-maru-touchscreen-pci,max_point=" //$NON-NLS-1$ //$NON-NLS-2$ + varForm(OPTION_KEY.VAR_MAX_POINT)); } else { diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TTouchPointOption.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TTouchPointOption.java index e6bf2d2..0a11d8a 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TTouchPointOption.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TTouchPointOption.java @@ -33,17 +33,14 @@ import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.TouchType; public class TTouchPointOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - TouchType touchType = property.getConfiguration().getDevice() - .getTouch(); - if (touchType != null && touchType.getMaxTouchPoint() > 0) { + if (property.getPropertyValue().maxTouchCount > 0) { config.addVariable(OPTION_KEY.VAR_MAX_POINT, - String.valueOf(touchType.getMaxTouchPoint())); + String.valueOf(property.getPropertyValue().maxTouchCount)); config.addQemuOption("-device", "virtio-maru-touchscreen-pci,max_point=" //$NON-NLS-1$ //$NON-NLS-2$ + varForm(OPTION_KEY.VAR_MAX_POINT)); } else { diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WTouchPointOption.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WTouchPointOption.java index 12dac7c..d526421 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WTouchPointOption.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WTouchPointOption.java @@ -33,17 +33,14 @@ import org.tizen.emulator.manager.vms.VMProperty; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; -import org.tizen.emulator.manager.vms.xml.TouchType; public class WTouchPointOption extends Option { @Override public void getLaunchArgument(LaunchConfig config, VMProperty property) { - TouchType touchType = property.getConfiguration().getDevice() - .getTouch(); - if (touchType != null && touchType.getMaxTouchPoint() > 0) { + if (property.getPropertyValue().maxTouchCount > 0) { config.addVariable(OPTION_KEY.VAR_MAX_POINT, - String.valueOf(touchType.getMaxTouchPoint())); + String.valueOf(property.getPropertyValue().maxTouchCount)); config.addQemuOption("-device", "virtio-maru-touchscreen-pci,max_point=" //$NON-NLS-1$ //$NON-NLS-2$ + varForm(OPTION_KEY.VAR_MAX_POINT)); } else { -- cgit v1.2.3 From effa0546f1141ea8de8f23172a28ec27bf6ded4c Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Tue, 12 Jan 2016 12:22:41 +0900 Subject: package: update version (2.4.129) Change-Id: Id65c8d303c2f331ad3aebc94c5e11912eeab8538 Signed-off-by: jihye424.kim --- package/pkginfo.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 445444c..33d0ddb 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager-resources -Version: 2.4.128 +Version: 2.4.129 Maintainer: MinKee Lee , Jihye Kim Package: mobile-3.0-emulator-manager-resources -- cgit v1.2.3 From 25894c3ac91f690072be1d44d0d563f37cf17037 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Thu, 21 Jan 2016 10:29:44 +0900 Subject: option: remove unnecessary, deprecated exception Change-Id: I82a6685901a20281f4035851e9665c2ae8e9739a Signed-off-by: minkee.lee --- .../src/org/tizen/emulator/manager/tv/vms/option/TDefaultOption.java | 4 +--- .../tizen/emulator/manager/wearable/vms/option/WDefaultOption.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TDefaultOption.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TDefaultOption.java index 35954e2..3c25c3c 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TDefaultOption.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/TDefaultOption.java @@ -29,15 +29,13 @@ package org.tizen.emulator.manager.tv.vms.option; import org.tizen.emulator.manager.vms.VMProperty; -import org.tizen.emulator.manager.vms.helper.VMLauncherException; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.Option; public class TDefaultOption extends Option { @Override - public void getLaunchArgument(LaunchConfig config, VMProperty property) - throws VMLauncherException { + public void getLaunchArgument(LaunchConfig config, VMProperty property) { config.addQemuOption("-device AC97"); //$NON-NLS-1$ config.addQemuOption("-device virtio-maru-esm-pci"); //$NON-NLS-1$ diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WDefaultOption.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WDefaultOption.java index f869bb6..29497b8 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WDefaultOption.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/WDefaultOption.java @@ -29,7 +29,6 @@ package org.tizen.emulator.manager.wearable.vms.option; import org.tizen.emulator.manager.vms.VMProperty; -import org.tizen.emulator.manager.vms.helper.VMLauncherException; import org.tizen.emulator.manager.vms.option.LaunchConfig; import org.tizen.emulator.manager.vms.option.OPTION_KEY; import org.tizen.emulator.manager.vms.option.Option; @@ -37,8 +36,7 @@ import org.tizen.emulator.manager.vms.option.Option; public class WDefaultOption extends Option { @Override - public void getLaunchArgument(LaunchConfig config, VMProperty property) - throws VMLauncherException { + public void getLaunchArgument(LaunchConfig config, VMProperty property) { config.addQemuOption("-device AC97"); //$NON-NLS-1$ config.addQemuOption("-device virtio-maru-esm-pci"); //$NON-NLS-1$ -- cgit v1.2.3 From 91e4340df24faf9b2ca2c0a0b86bd51b96ea4fa7 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Wed, 27 Jan 2016 15:18:03 +0900 Subject: wearable: prepare wearable 3.0 (new UI) - Prepare template file. (for both old and new UI) Change-Id: I12e49d0146f31248af51b8c67376db11b160763b Signed-off-by: minkee.lee --- .../template/3.0-wearable-circle-template-v2.xml | 102 +++++++++++++++++ .../template/3.0-wearable-circle-template.xml | 122 +++++++++++++++++++++ plugins/wearable/template/3.0-wearable-circle.xml | 50 +++++++++ .../wearable/template/x86-standard-template-v2.xml | 1 + .../wearable/template/x86-standard-template.xml | 1 + plugins/wearable/template/x86-standard.xml | 4 +- 6 files changed, 278 insertions(+), 2 deletions(-) create mode 100644 plugins/wearable/template/3.0-wearable-circle-template-v2.xml create mode 100644 plugins/wearable/template/3.0-wearable-circle-template.xml create mode 100644 plugins/wearable/template/3.0-wearable-circle.xml diff --git a/plugins/wearable/template/3.0-wearable-circle-template-v2.xml b/plugins/wearable/template/3.0-wearable-circle-template-v2.xml new file mode 100644 index 0000000..9e5588c --- /dev/null +++ b/plugins/wearable/template/3.0-wearable-circle-template-v2.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/wearable/template/3.0-wearable-circle-template.xml b/plugins/wearable/template/3.0-wearable-circle-template.xml new file mode 100644 index 0000000..95e5a30 --- /dev/null +++ b/plugins/wearable/template/3.0-wearable-circle-template.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/wearable/template/3.0-wearable-circle.xml b/plugins/wearable/template/3.0-wearable-circle.xml new file mode 100644 index 0000000..7cb1204 --- /dev/null +++ b/plugins/wearable/template/3.0-wearable-circle.xml @@ -0,0 +1,50 @@ + + + + + + + + NONE + + + true + true + + + + + 360 + 360 + + 302 + + + 512 + + + + + + + + + + diff --git a/plugins/wearable/template/x86-standard-template-v2.xml b/plugins/wearable/template/x86-standard-template-v2.xml index 0560d06..251ff16 100644 --- a/plugins/wearable/template/x86-standard-template-v2.xml +++ b/plugins/wearable/template/x86-standard-template-v2.xml @@ -16,6 +16,7 @@ + diff --git a/plugins/wearable/template/x86-standard-template.xml b/plugins/wearable/template/x86-standard-template.xml index 4820c54..dc9ec32 100644 --- a/plugins/wearable/template/x86-standard-template.xml +++ b/plugins/wearable/template/x86-standard-template.xml @@ -15,6 +15,7 @@ + diff --git a/plugins/wearable/template/x86-standard.xml b/plugins/wearable/template/x86-standard.xml index 14f28e0..ed9f0a6 100644 --- a/plugins/wearable/template/x86-standard.xml +++ b/plugins/wearable/template/x86-standard.xml @@ -1,7 +1,7 @@ - - + + -- cgit v1.2.3 From 3193cedbcf5bb03795ffa6c87d2f4454bdbac19c Mon Sep 17 00:00:00 2001 From: Minkee Lee Date: Thu, 28 Jan 2016 21:48:53 +0900 Subject: package: update version (2.4.131) Change-Id: Ib79415cb841bfd88c89e632a8de90e4f919155a2 Signed-off-by: Minkee Lee --- package/changelog | 4 ++++ package/pkginfo.manifest | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/changelog b/package/changelog index 35fe747..4d357e3 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,7 @@ +* 2.4.131 +- prepare wearable 3.0 (both old and new UI) +== minkee Lee 2016-01-28 + * 2.4.128 - copy new template file. == minkee Lee 2015-11-30 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 33d0ddb..156305b 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager-resources -Version: 2.4.129 +Version: 2.4.131 Maintainer: MinKee Lee , Jihye Kim Package: mobile-3.0-emulator-manager-resources -- cgit v1.2.3 From c3005ae5de4029e73f2c9b6e364b1a0695e32bd9 Mon Sep 17 00:00:00 2001 From: Minkee Lee Date: Tue, 2 Feb 2016 15:50:54 +0900 Subject: template-xml: change option name ("defaultValue") - Change option name : "defaultOnCreate" -> "defaultValue" - Change DHCP default : on Change-Id: I8ac53be7742365459077608380d8703de7225c2e Signed-off-by: Minkee Lee --- plugins/mobile/template/x86-standard-template-v2.xml | 6 +++--- plugins/tv/template/x86-standard-template-v2.xml | 4 ++-- plugins/wearable/template/3.0-wearable-circle-template-v2.xml | 4 ++-- plugins/wearable/template/x86-standard-template-v2.xml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/mobile/template/x86-standard-template-v2.xml b/plugins/mobile/template/x86-standard-template-v2.xml index c930e33..73ddfa4 100644 --- a/plugins/mobile/template/x86-standard-template-v2.xml +++ b/plugins/mobile/template/x86-standard-template-v2.xml @@ -82,7 +82,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -107,7 +107,7 @@ - + diff --git a/plugins/tv/template/x86-standard-template-v2.xml b/plugins/tv/template/x86-standard-template-v2.xml index 4d4a2e5..811afea 100644 --- a/plugins/tv/template/x86-standard-template-v2.xml +++ b/plugins/tv/template/x86-standard-template-v2.xml @@ -48,7 +48,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/plugins/wearable/template/3.0-wearable-circle-template-v2.xml b/plugins/wearable/template/3.0-wearable-circle-template-v2.xml index 9e5588c..f494bf4 100644 --- a/plugins/wearable/template/3.0-wearable-circle-template-v2.xml +++ b/plugins/wearable/template/3.0-wearable-circle-template-v2.xml @@ -74,7 +74,7 @@ - + @@ -87,7 +87,7 @@ - + diff --git a/plugins/wearable/template/x86-standard-template-v2.xml b/plugins/wearable/template/x86-standard-template-v2.xml index 251ff16..c79c18e 100644 --- a/plugins/wearable/template/x86-standard-template-v2.xml +++ b/plugins/wearable/template/x86-standard-template-v2.xml @@ -76,7 +76,7 @@ - + @@ -89,7 +89,7 @@ - + -- cgit v1.2.3 From ac649b2af6adbbd9cf8dc59a42bc4b72f8ac5776 Mon Sep 17 00:00:00 2001 From: Minkee Lee Date: Fri, 5 Feb 2016 15:53:44 +0900 Subject: option: add 'force_pat' kernel option Change-Id: I58e6e3c397a095b4638ed642168cc12de06dd03d Signed-off-by: Minkee Lee (cherry picked from commit 80cab0a54b0d5d968b557fb5b8bc1cd5bdcd37cf) --- .../org/tizen/emulator/manager/mobile/vms/option/OptionFactory.java | 2 ++ .../tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java | 3 ++- .../src/org/tizen/emulator/manager/tv/vms/option/OptionFactory.java | 2 ++ .../org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java | 3 ++- .../tizen/emulator/manager/wearable/vms/option/OptionFactory.java | 2 ++ .../tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java | 5 +++-- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactory.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactory.java index 8ffab58..c7f42c9 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactory.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactory.java @@ -35,6 +35,7 @@ import org.tizen.emulator.manager.ui.detail.item.ItemName; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.CommonOptionFactroy; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -55,6 +56,7 @@ public class OptionFactory extends CommonOptionFactroy { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(MDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } diff --git a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java index 07b3b0e..7064519 100644 --- a/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java +++ b/plugins/mobile/src/org/tizen/emulator/manager/mobile/vms/option/OptionFactoryV2.java @@ -37,6 +37,7 @@ import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -55,7 +56,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(MDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); - + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactory.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactory.java index 6d0aaa5..920b6a4 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactory.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactory.java @@ -35,6 +35,7 @@ import org.tizen.emulator.manager.ui.detail.item.ItemName; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.CommonOptionFactroy; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -55,6 +56,7 @@ public class OptionFactory extends CommonOptionFactroy { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(TDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } diff --git a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java index 7013d9f..d2c904d 100644 --- a/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java +++ b/plugins/tv/src/org/tizen/emulator/manager/tv/vms/option/OptionFactoryV2.java @@ -37,6 +37,7 @@ import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -55,7 +56,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(TDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); - + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactory.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactory.java index 05fc2b9..7605c07 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactory.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactory.java @@ -36,6 +36,7 @@ import org.tizen.emulator.manager.ui.detail.item.ItemName; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.CommonOptionFactroy; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -56,6 +57,7 @@ public class OptionFactory extends CommonOptionFactroy { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(WDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } diff --git a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java index 8e0deab..7eeb342 100644 --- a/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java +++ b/plugins/wearable/src/org/tizen/emulator/manager/wearable/vms/option/OptionFactoryV2.java @@ -37,6 +37,7 @@ import org.tizen.emulator.manager.template.renewal.VMItem; import org.tizen.emulator.manager.ui.renewal.item.CommonOptionFactory; import org.tizen.emulator.manager.vms.option.CommonOption; import org.tizen.emulator.manager.vms.option.DisplayModeOption; +import org.tizen.emulator.manager.vms.option.ForcePatOption; import org.tizen.emulator.manager.vms.option.IOption; import org.tizen.emulator.manager.vms.option.Option; import org.tizen.emulator.manager.vms.option.RemoteOption; @@ -55,7 +56,7 @@ public class OptionFactoryV2 extends CommonOptionFactory { optionList.add(Option.getInstance(RemoteOption.class)); optionList.add(Option.getInstance(WDefaultOption.class)); optionList.add(Option.getInstance(DisplayModeOption.class)); - + optionList.add(Option.getInstance(ForcePatOption.class)); return optionList; } @@ -65,4 +66,4 @@ public class OptionFactoryV2 extends CommonOptionFactory { super.addOption(optionList, item); } -} \ No newline at end of file +} -- cgit v1.2.3 From 026bd9c1f8ce047d5a4cf497190e5fba4d626ecc Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Mon, 15 Feb 2016 13:59:32 +0900 Subject: template: add default network option Change-Id: Ic766cc575f411747c30d63e8932a94d3e78126cb Signed-off-by: jihye424.kim (cherry picked from commit f73883d02b24829ce398a64fedb31902bac4745f) --- plugins/mobile/template/x86-standard.xml | 24 +++++++++++++++++++++++ plugins/tv/template/x86-standard.xml | 17 ++++++++++++++++ plugins/wearable/template/3.0-wearable-circle.xml | 20 +++++++++++++++++++ plugins/wearable/template/x86-standard.xml | 20 +++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/plugins/mobile/template/x86-standard.xml b/plugins/mobile/template/x86-standard.xml index 116d1b4..3847fd5 100644 --- a/plugins/mobile/template/x86-standard.xml +++ b/plugins/mobile/template/x86-standard.xml @@ -47,5 +47,29 @@ + + + + + + + + + + + + + + + +