private static String GPU_disable_command = null;
private static boolean isCheck = false;
+ private static boolean isGallium = false; // for ubuntu OS
+
private CheckVirtualization() {
// singleton class
return isGPUSupport;
}
+ public boolean isGallium() {
+ return isGallium;
+ }
+
public String getVirtualizationEnableCommnad() {
return virtualization_enable_command;
}
EMLogger.getLogger().log(Level.WARNING, "Exception" + e.getMessage());
}
- if(exitValue == 0) {
+ if( exitValue == 0) {
isGPUSupport = true;
+
+ } else if (exitValue == 2) {
+ isGPUSupport = true;
+ isGallium = true;
+
} else {
GPU_enable_command = "";
isGPUSupport = false;
return openMessageDialog(title, message, SWT.ICON_QUESTION, SWT.OK | SWT.CANCEL);
}
+ public int openWarningAndSelectionDialog(final String message) {
+ return openMessageDialog("Emulator Manager", message, SWT.ICON_WARNING, SWT.OK | SWT.CANCEL);
+ }
+
public int openRemoveVMFailDialog(final String path, final String vmName) {
msgResponse = 0;
return openRemoveVMFailDialog("Emulator Manager", path, vmName, SWT.ICON_WARNING, SWT.OK);
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.swt.SWT;
import org.tizen.emulator.manager.EmulatorManager;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.StringResources;
+import org.tizen.emulator.manager.tool.CheckVirtualization;
import org.tizen.emulator.manager.ui.VMsMainView;
+import org.tizen.emulator.manager.ui.dialog.MessageDialog;
import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator;
import org.tizen.emulator.manager.vms.helper.QemuImgProc;
import org.tizen.emulator.manager.vms.helper.VMLauncherException;
}
}
+ // Check graphic driver (only in linux)
+ if (EmulatorManager.isLinux() && CheckVirtualization.getInstance().isGallium()
+ && property.getPropertyValue().isGLAcceleration) {
+ // show [ok/cancel] message.
+ MessageDialog dialog = new MessageDialog();
+ int response = dialog.openWarningAndSelectionDialog(
+ "\n You are using invalid graphic card driver for the emulator."
+ + "\n If you continue launching emulator, it may not work properly."
+
+ + "\n\n You have to use the lastest vendor-provided graphic card driver."
+ + "\n For more information, see under ubuntu driver help page."
+ + "\n https://help.ubuntu.com/community/BinaryDriverHowto/ "
+
+ + "\n\n Do you want to continue launching emulator?"
+ + "\n (If you set GPU support \"off\", you can avoid this message.)"
+ );
+ if (response != SWT.OK) {
+ throw new VMWorkerException("User stops launching emulator.");
+ }
+ }
+
isRunningNow();
if (!launcher.launch(property, wait)) {