Author: greatlrd
Date: Wed Jun 21 19:34:26 2006
New Revision: 22465
URL:
http://svn.reactos.ru/svn/reactos?rev=22465&view=rev
Log:
1. Adding support for img for hd
2. fixing hda to hdd working again
3. fixing floppy working again
4. remove StandardPC as checkbox and repalace it with a combobox, futer version like arm.
x64, ppc of qemu is plan to be supported
5. alot other smaller bugs are fixed
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=22465&…
==============================================================================
--- trunk/tools/Qemu GUI/QEmu.cs (original)
+++ trunk/tools/Qemu GUI/QEmu.cs Wed Jun 21 19:34:26 2006
@@ -32,7 +32,7 @@
public bool CreateImage(string FileName, long Size, string Format)
{
long d = Size * 1024;
- string argv = " create -f " + Format + " " + (char) 34 +
FileName + (char) 34 + " " + d.ToString(); ;
+ string argv = " create -f " + Format + " \""+
FileName + "\" " + d.ToString(); ;
Process p = new Process();
p.StartInfo.FileName = Path.GetDirectoryName (this.Paths.QEmu) +
"\\" + "qemu-img.exe";
p.StartInfo.WorkingDirectory = Path.GetDirectoryName(this.Paths.QEmu);
@@ -169,7 +169,17 @@
for (int i = 0; i < 4; i++)
{
if (this.HDD[i].Enabled && (this.HDD[i].Path.Length > 0))
- buffer += "-hd" + ((char) (i + 97)) + " " +
(char) 34 + this.HDD[i].Path + (char) 34 +" ";
+ {
+ if (i == 0)
+ buffer += "-hda \"" + this.HDD[i].Path +
"\" ";
+ if (i == 1)
+ buffer += "-hdb \"" + this.HDD[i].Path +
"\" ";
+ if (i == 2)
+ buffer += "-hdc \"" + this.HDD[i].Path +
"\" ";
+ if (i == 3)
+ buffer += "-hdd \""+ this.HDD[i].Path +
"\" ";
+
+ }
}
return buffer;
}
@@ -197,10 +207,10 @@
{
string buffer = "";
if (this.FDD[0].Enabled && (this.FDD[0].Path.Length > 0))
- buffer += "-fda " + (char) 34 + this.FDD[0].Path + (char) 34 +
" ";
+ buffer += "-fda \"" + this.FDD[0].Path + "\"
";
if (this.FDD[1].Enabled && (this.FDD[1].Path.Length > 0))
- buffer += "-fdb " + (char) 34 + this.FDD[1].Path + (char) 34 +
" ";
+ buffer += "-fdb \"" + this.FDD[1].Path + "\"
";
return buffer;
}
@@ -243,8 +253,8 @@
public class Misc
{
- [XmlElement("StandardPC")]
- public bool StandardPC;
+ [XmlElement("Machine")]
+ public string Machine;
[XmlElement("Memory")]
public int Memory;
[XmlElement("CPUs")]
@@ -285,10 +295,11 @@
buffer += "-no-kqemu ";
/* Machine settings */
- if (!this.StandardPC)
+ if (this.Machine == "Standard PC")
+ buffer += "-M pc ";
+ if (this.Machine == "ISA only PC")
buffer += "-M isapc ";
- else
- buffer += "-M pc ";
+
/* 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…
==============================================================================
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%2…
==============================================================================
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=224…
==============================================================================
--- trunk/tools/Qemu GUI/frmMain.cs (original)
+++ trunk/tools/Qemu GUI/frmMain.cs Wed Jun 21 19:34:26 2006
@@ -19,8 +19,6 @@
private System.Windows.Forms.GroupBox grpMachine;
private System.Windows.Forms.TabPage tabMisc;
private System.Windows.Forms.TabControl HardDisk2;
- private System.Windows.Forms.RadioButton optStandardPC;
- private System.Windows.Forms.RadioButton optLegacyPC;
private System.Windows.Forms.GroupBox grpFloppy;
private System.Windows.Forms.CheckBox chkFloppyA;
private System.Windows.Forms.CheckBox chkFloppyB;
@@ -127,6 +125,7 @@
private Label lblImage;
private TextBox txtVDKImage;
private ComboBox cboVDKDrive;
+ private ComboBox cboMachineFrom;
private QEmu qemu;
public frmMain()
@@ -165,8 +164,6 @@
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(frmMain));
this.grpMachine = new System.Windows.Forms.GroupBox();
- this.optLegacyPC = new System.Windows.Forms.RadioButton();
- this.optStandardPC = new System.Windows.Forms.RadioButton();
this.HardDisk2 = new System.Windows.Forms.TabControl();
this.tabMisc = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox();
@@ -274,6 +271,7 @@
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();
@@ -310,34 +308,13 @@
//
// grpMachine
//
- this.grpMachine.Controls.Add(this.optLegacyPC);
- this.grpMachine.Controls.Add(this.optStandardPC);
+ this.grpMachine.Controls.Add(this.cboMachineFrom);
this.grpMachine.Location = new System.Drawing.Point(3, 3);
this.grpMachine.Name = "grpMachine";
this.grpMachine.Size = new System.Drawing.Size(274, 48);
this.grpMachine.TabIndex = 2;
this.grpMachine.TabStop = false;
this.grpMachine.Text = "Machine";
- //
- // optLegacyPC
- //
- this.optLegacyPC.CausesValidation = false;
- this.optLegacyPC.Location = new System.Drawing.Point(154, 16);
- this.optLegacyPC.Name = "optLegacyPC";
- this.optLegacyPC.Size = new System.Drawing.Size(98, 24);
- this.optLegacyPC.TabIndex = 5;
- this.optLegacyPC.Text = "ISA only PC";
- //
- // optStandardPC
- //
- this.optStandardPC.CausesValidation = false;
- this.optStandardPC.Checked = true;
- this.optStandardPC.Location = new System.Drawing.Point(19, 16);
- this.optStandardPC.Name = "optStandardPC";
- this.optStandardPC.Size = new System.Drawing.Size(104, 24);
- this.optStandardPC.TabIndex = 4;
- this.optStandardPC.TabStop = true;
- this.optStandardPC.Text = "Standard PC";
//
// HardDisk2
//
@@ -1416,6 +1393,18 @@
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
//
@@ -1522,28 +1511,28 @@
#region Harddisks
private void btnBrowseHDA_Click(object sender, System.EventArgs e)
{
- openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw";
+ openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw;*.img";
if (openFile.ShowDialog() == DialogResult.OK)
txtHDA.Text = openFile.FileName;
}
private void btnBrowseHDB_Click(object sender, System.EventArgs e)
{
- openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw";
+ openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw;*.img";
if (openFile.ShowDialog() == DialogResult.OK)
qemu.Harddisks.HDD[1].Path = openFile.FileName;
}
private void btnBrowseHDC_Click(object sender, System.EventArgs e)
{
- openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw";
+ openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw;*.img";
if (openFile.ShowDialog() == DialogResult.OK)
txtHDC.Text = openFile.FileName;
}
private void btnBrowseHDD_Click(object sender, System.EventArgs e)
{
- openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw";
+ openFile.Filter = "Harddisk images
|*.vmdk;*.cloop;*.cow;*.qcow;*.raw;*.img";
if (openFile.ShowDialog() == DialogResult.OK)
txtHDD.Text = openFile.FileName;
}
@@ -1821,8 +1810,7 @@
private void LoadSettings()
{
/* Misc */
- optStandardPC.Checked = qemu.Misc.StandardPC;
- optLegacyPC.Checked = !qemu.Misc.StandardPC;
+ cboMachineFrom.Text = qemu.Misc.Machine;
numMemory.Value = qemu.Misc.Memory;
numSMP.Value = qemu.Misc.CPUs;
cboBootFrom.Text = qemu.Misc.BootFrom;
@@ -1874,8 +1862,8 @@
private void SaveSettings()
{
- /* Misc */
- qemu.Misc.StandardPC = optStandardPC.Checked;
+ /* Misc */
+ qemu.Misc.Machine = cboMachineFrom.SelectedText;
qemu.Misc.Memory = (int) numMemory.Value;
qemu.Misc.CPUs = (int) numSMP.Value;
qemu.Misc.BootFrom = cboBootFrom.Text;