[ros-diffs] [greatlrd] 22470: 1. Adding 64Bits support. 2. Use Qemu path not the file name. 3. fixing smaller bugs

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Wed Jun 21 18:35:01 CEST 2006


Author: greatlrd
Date: Wed Jun 21 20:35:00 2006
New Revision: 22470

URL: http://svn.reactos.ru/svn/reactos?rev=22470&view=rev
Log:
1. Adding 64Bits support.
2. Use Qemu path not the file name. 
3. fixing smaller bugs

Modified:
    trunk/tools/Qemu GUI/QEmu.cs
    trunk/tools/Qemu GUI/Qemu GUI.suo
    trunk/tools/Qemu GUI/bin/Release/Qemu GUI.exe
    trunk/tools/Qemu GUI/frmMain.cs

Modified: trunk/tools/Qemu GUI/QEmu.cs
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/QEmu.cs?rev=22470&r1=22469&r2=22470&view=diff
==============================================================================
--- trunk/tools/Qemu GUI/QEmu.cs (original)
+++ trunk/tools/Qemu GUI/QEmu.cs Wed Jun 21 20:35:00 2006
@@ -60,10 +60,19 @@
             return m_LastError;
         }
 
-        public bool Start()
+        public bool Start(string platfrom)
         {
             Process p = new Process();
-            p.StartInfo.FileName = this.Paths.QEmu;
+            
+            if (platfrom == "Standard PC 32Bits") 
+                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu.exe";
+            if (platfrom == "Standard PC 64Bits") 
+                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu-system-x86_64.exe"; 
+            if (platfrom == "ISA only PC 32Bits") 
+                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu.exe";
+            if (platfrom == "ISA only PC 64Bits")
+                p.StartInfo.FileName = this.Paths.QEmu + "\\qemu-system-x86_64.exe"; 
+                       
             p.StartInfo.WorkingDirectory = Path.GetDirectoryName(this.Paths.QEmu);
             p.StartInfo.Arguments = GetArgv();
             p.StartInfo.RedirectStandardError = true;
@@ -79,7 +88,7 @@
             }
             catch 
             {
-                m_LastError = "qemu.exe not found!";
+                m_LastError = "qemu not found!";
                 return false;
             }
             return true;
@@ -136,7 +145,7 @@
 
         private string GetArgv()
         {
-            string arg = "-L " + Path.GetDirectoryName(this.Paths.QEmu) + " ";
+            string arg = "-L " + this.Paths.QEmu + " ";
 
             arg += Misc.ToString();
             arg += Floppies.ToString();  
@@ -286,11 +295,15 @@
                 buffer += "-no-kqemu ";
 
             /* Machine settings */
-            if (this.Machine == "Standard PC")
+            if (this.Machine == "Standard PC 32Bits") 
                 buffer += "-M pc ";
-            if (this.Machine == "ISA only PC")
+            if (this.Machine == "Standard PC 64Bits") 
+                buffer += "-M pc ";
+            if (this.Machine == "ISA only PC 32Bits") 
                 buffer += "-M isapc ";
-    
+            if (this.Machine == "ISA only PC 64Bits") 
+                buffer += "-M isapc ";
+         
 
             /* Boot options */
             switch (this.BootFrom)

Modified: trunk/tools/Qemu GUI/Qemu GUI.suo
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/Qemu%20GUI.suo?rev=22470&r1=22469&r2=22470&view=diff
==============================================================================
Binary files - no diff available.

Modified: trunk/tools/Qemu GUI/bin/Release/Qemu GUI.exe
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/bin/Release/Qemu%20GUI.exe?rev=22470&r1=22469&r2=22470&view=diff
==============================================================================
Binary files - no diff available.

Modified: trunk/tools/Qemu GUI/frmMain.cs
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/frmMain.cs?rev=22470&r1=22469&r2=22470&view=diff
==============================================================================
--- trunk/tools/Qemu GUI/frmMain.cs (original)
+++ trunk/tools/Qemu GUI/frmMain.cs Wed Jun 21 20:35:00 2006
@@ -164,6 +164,7 @@
 		{
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
             this.grpMachine = new System.Windows.Forms.GroupBox();
+            this.cboMachineFrom = new System.Windows.Forms.ComboBox();
             this.HardDisk2 = new System.Windows.Forms.TabControl();
             this.tabMisc = new System.Windows.Forms.TabPage();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
@@ -271,7 +272,6 @@
             this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
             this.btnLoad = new System.Windows.Forms.Button();
             this.btnSave = new System.Windows.Forms.Button();
-            this.cboMachineFrom = new System.Windows.Forms.ComboBox();
             this.grpMachine.SuspendLayout();
             this.HardDisk2.SuspendLayout();
             this.tabMisc.SuspendLayout();
@@ -316,6 +316,21 @@
             this.grpMachine.TabStop = false;
             this.grpMachine.Text = "Machine";
             // 
+            // cboMachineFrom
+            // 
+            this.cboMachineFrom.DisplayMember = "1";
+            this.cboMachineFrom.FormattingEnabled = true;
+            this.cboMachineFrom.Items.AddRange(new object[] {
+            "Standard PC 32Bits",
+            "ISA only PC 32Bits",
+            "Standard PC 64Bits",
+            "ISA only PC 64Bits"});
+            this.cboMachineFrom.Location = new System.Drawing.Point(19, 19);
+            this.cboMachineFrom.Name = "cboMachineFrom";
+            this.cboMachineFrom.Size = new System.Drawing.Size(239, 21);
+            this.cboMachineFrom.TabIndex = 20;
+            this.cboMachineFrom.SelectedIndexChanged += new System.EventHandler(this.cboMachineFrom_SelectedIndexChanged);
+            // 
             // HardDisk2
             // 
             this.HardDisk2.Controls.Add(this.tabMisc);
@@ -367,6 +382,8 @@
             // chkKQEmu
             // 
             this.chkKQEmu.AutoSize = true;
+            this.chkKQEmu.Checked = true;
+            this.chkKQEmu.CheckState = System.Windows.Forms.CheckState.Checked;
             this.chkKQEmu.Location = new System.Drawing.Point(19, 106);
             this.chkKQEmu.Name = "chkKQEmu";
             this.chkKQEmu.Size = new System.Drawing.Size(177, 17);
@@ -1376,6 +1393,10 @@
             this.openFile.Title = "Path to VDK";
             this.openFile.ValidateNames = false;
             // 
+            // folderBrowserDialog1
+            // 
+            this.folderBrowserDialog1.HelpRequest += new System.EventHandler(this.folderBrowserDialog1_HelpRequest);
+            // 
             // btnLoad
             // 
             this.btnLoad.Location = new System.Drawing.Point(12, 243);
@@ -1393,18 +1414,6 @@
             this.btnSave.TabIndex = 6;
             this.btnSave.Text = "Save";
             this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
-            // 
-            // cboMachineFrom
-            // 
-            this.cboMachineFrom.FormattingEnabled = true;
-            this.cboMachineFrom.Items.AddRange(new object[] {
-            "Standard PC",
-            "ISA only PC"});
-            this.cboMachineFrom.Location = new System.Drawing.Point(19, 19);
-            this.cboMachineFrom.Name = "cboMachineFrom";
-            this.cboMachineFrom.Size = new System.Drawing.Size(239, 21);
-            this.cboMachineFrom.TabIndex = 20;
-            this.cboMachineFrom.Text = "Standard PC";
             // 
             // frmMain
             // 
@@ -1651,7 +1660,7 @@
         private void btnLaunch_Click(object sender, System.EventArgs e)
         {
             SaveSettings();
-            if (!qemu.Start())
+            if (!qemu.Start(cboMachineFrom.SelectedItem.ToString()))
             {
                 frmError fError = new frmError();
                 fError.txtError.Text = qemu.GetLastError();
@@ -1715,6 +1724,7 @@
             cboCDROM.SelectedIndex = 0;
             cboBootFrom.SelectedIndex = 1;
             cboImageFormat.SelectedIndex = 4;
+            cboMachineFrom.SelectedIndex = 0;
 
             /* try to load config.xml from current directory */
             try
@@ -1761,9 +1771,13 @@
         #region Paths
         private void btnQEmuPath_Click(object sender, EventArgs e)
         {
-            openFile.Filter = "Executable files (*.exe)|*.exe"; 
-            if (openFile.ShowDialog() == DialogResult.OK)
-                txtQEmuPath.Text = openFile.FileName; 
+            //openFile.Filter = "Executable files (*.exe)|*.exe"; 
+
+            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
+            {
+                txtQEmuPath.Text = folderBrowserDialog1.SelectedPath;
+                qemu.Paths.QEmu = txtQEmuPath.Text; 
+            }
         }
 
         private void btnVDKBrowse_Click(object sender, EventArgs e)
@@ -1912,6 +1926,17 @@
 
         #endregion
 
+        private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
+        {
+
+        }
+
+        private void cboMachineFrom_SelectedIndexChanged(object sender, EventArgs e)
+        {
+
+           
+        }
+
 
  
 




More information about the Ros-diffs mailing list