don't try to boot with bad paths

svn path=/trunk/tools/Qemu GUI/; revision=178
This commit is contained in:
Ged Murphy 2007-05-11 13:41:40 +00:00
parent 520a970527
commit 9c8af3359d
5 changed files with 69 additions and 32 deletions

22
AboutForm.Designer.cs generated
View File

@ -32,8 +32,8 @@ namespace Qemu_GUI
this.button1 = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBox2 = new System.Windows.Forms.TextBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
@ -71,6 +71,16 @@ namespace Qemu_GUI
this.tabPage1.Text = "License";
this.tabPage1.UseVisualStyleBackColor = true;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(6, 6);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(267, 207);
this.textBox1.TabIndex = 0;
this.textBox1.Text = resources.GetString("textBox1.Text");
//
// tabPage2
//
this.tabPage2.Controls.Add(this.textBox2);
@ -82,16 +92,6 @@ namespace Qemu_GUI
this.tabPage2.Text = "Credits";
this.tabPage2.UseVisualStyleBackColor = true;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(6, 6);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(267, 207);
this.textBox1.TabIndex = 0;
this.textBox1.Text = resources.GetString("textBox1.Text");
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(6, 6);

View File

@ -117,14 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="textBox2.Text" xml:space="preserve">
<value>ReactOS QEmu Manager was brought to you by:
Magnus Olsen [greatlord@reactos.org]
Christoph Von Widitch [Christoph_vW@ReactOS.org]
Samuel Serapión [samcharly@hotmail.com]
Ged Murphy [gedmurphy@reactos.org]</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
<value>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.
@ -132,4 +124,12 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
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., 675 Mass Ave, Cambridge, MA 02139, USA.</value>
</data>
<data name="textBox2.Text" xml:space="preserve">
<value>ReactOS QEmu Manager was brought to you by:
Magnus Olsen [greatlord@reactos.org]
Christoph von Wittich [Christoph_vW@ReactOS.org]
Samuel Serapión [samcharly@hotmail.com]
Ged Murphy [gedmurphy@reactos.org]</value>
</data>
</root>

20
MainForm.Designer.cs generated
View File

@ -358,9 +358,9 @@ namespace Qemu_GUI
this.groupBox3.Controls.Add(this.btnBrowseBios);
this.groupBox3.Controls.Add(this.txtABios);
this.groupBox3.Enabled = false;
this.groupBox3.Location = new System.Drawing.Point(6, 65);
this.groupBox3.Location = new System.Drawing.Point(3, 65);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(351, 57);
this.groupBox3.Size = new System.Drawing.Size(354, 57);
this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "BIOS";
@ -475,9 +475,9 @@ namespace Qemu_GUI
this.groupBox1.Controls.Add(this.btnBrowseLinuxK);
this.groupBox1.Controls.Add(this.txtLinuxK);
this.groupBox1.Enabled = false;
this.groupBox1.Location = new System.Drawing.Point(6, 6);
this.groupBox1.Location = new System.Drawing.Point(3, 6);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(351, 53);
this.groupBox1.Size = new System.Drawing.Size(354, 53);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Linux";
@ -532,9 +532,9 @@ namespace Qemu_GUI
this.grpVDK.Controls.Add(this.btnMount);
this.grpVDK.Controls.Add(this.lblImage);
this.grpVDK.Enabled = false;
this.grpVDK.Location = new System.Drawing.Point(4, 83);
this.grpVDK.Location = new System.Drawing.Point(3, 83);
this.grpVDK.Name = "grpVDK";
this.grpVDK.Size = new System.Drawing.Size(501, 118);
this.grpVDK.Size = new System.Drawing.Size(502, 118);
this.grpVDK.TabIndex = 7;
this.grpVDK.TabStop = false;
this.grpVDK.Text = "VDK";
@ -619,9 +619,9 @@ namespace Qemu_GUI
this.groupBox9.Controls.Add(this.lblImageSize);
this.groupBox9.Controls.Add(this.btnCreateImage);
this.groupBox9.Controls.Add(this.cboImageFormat);
this.groupBox9.Location = new System.Drawing.Point(4, 3);
this.groupBox9.Location = new System.Drawing.Point(3, 3);
this.groupBox9.Name = "groupBox9";
this.groupBox9.Size = new System.Drawing.Size(501, 74);
this.groupBox9.Size = new System.Drawing.Size(502, 74);
this.groupBox9.TabIndex = 6;
this.groupBox9.TabStop = false;
this.groupBox9.Text = "Harddisk Tools";
@ -1315,9 +1315,9 @@ namespace Qemu_GUI
this.grpHarddisk.Controls.Add(this.btnBrowseHDA);
this.grpHarddisk.Controls.Add(this.chkUseHDB);
this.grpHarddisk.Controls.Add(this.chkUseHDA);
this.grpHarddisk.Location = new System.Drawing.Point(5, 3);
this.grpHarddisk.Location = new System.Drawing.Point(3, 3);
this.grpHarddisk.Name = "grpHarddisk";
this.grpHarddisk.Size = new System.Drawing.Size(500, 195);
this.grpHarddisk.Size = new System.Drawing.Size(502, 195);
this.grpHarddisk.TabIndex = 5;
this.grpHarddisk.TabStop = false;
this.grpHarddisk.Text = " Harddisks";

View File

@ -697,18 +697,56 @@ namespace Qemu_GUI
bool HasHDisk = false;
bool HasFDisk = false;
/* check the QEmu path */
if (!Directory.Exists(data.Paths.Qemu))
{
MessageBox.Show("\"" + data.Paths.Qemu + "\"" + " does not exist", "Error - QEmu path");
return;
}
/* There must be atleast one source of OS */
for (int i = 0; i < data.Harddisks.HDD.Length; i++)
{
if (data.Harddisks.HDD[i].Enabled == true)
HasHDisk = true;
{
if (File.Exists(data.Harddisks.HDD[i].Path))
{
HasHDisk = true;
}
else
{
MessageBox.Show("\"" + data.Harddisks.HDD[i].Path + "\"" + " does not exist", "Error - Harddisk file");
return;
}
}
}
for (int i = 0; i < data.Floppies.FDD.Length; i++)
{
if (data.Floppies.FDD[i].Enabled == true)
HasFDisk = true;
{
if (File.Exists(data.Floppies.FDD[i].Path))
{
HasFDisk = true;
}
else
{
MessageBox.Show("\"" + data.Floppies.FDD[i].Path + "\"" + " does not exist", "Error - Floppy File");
return;
}
}
}
/* ensure we have a correct CD image if we need to boot from it */
if (optCDImage.Enabled && txtCDROM.Text.Length > 0)
{
if (!File.Exists(txtCDROM.Text))
{
MessageBox.Show("\"" + txtCDROM.Text + "\"" + " does not exist", "Error - CD-ROM image");
return;
}
}
if (HasHDisk == false && data.CDROM.Enabled == false && HasFDisk == false)
MessageBox.Show("Must enable atleast 1 Hard disk, CD-Rom or Floppy disk!", "Error");//or specify linux kernel image???
else

View File

@ -79,7 +79,6 @@ namespace Qemu_GUI
}
catch { }
}
}
p.StartInfo.Arguments = data.GetArgv();
}