mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
This commit is contained in:
parent
486b3f0967
commit
fe58783b4f
4 changed files with 106 additions and 49 deletions
|
|
@ -6,12 +6,24 @@ using System.Text;
|
||||||
namespace Cosmos.Build.Common {
|
namespace Cosmos.Build.Common {
|
||||||
public class BuildProperties : PropertiesBase {
|
public class BuildProperties : PropertiesBase {
|
||||||
|
|
||||||
// Execute
|
// Profile
|
||||||
public Profile Profile {
|
public Profile Profile {
|
||||||
get { return this.GetProperty("Profile", Profile.VMware); }
|
get { return this.GetProperty("Profile", Profile.VMware); }
|
||||||
set { this.SetProperty("Profile", value); }
|
set { this.SetProperty("Profile", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deployment
|
||||||
|
public Deployment Deployment {
|
||||||
|
get { return this.GetProperty("Deployment", Deployment.ISO); }
|
||||||
|
set { this.SetProperty("Deployment", value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Launch
|
||||||
|
public Launch Launch {
|
||||||
|
get { return this.GetProperty("Launch", Launch.VMware); }
|
||||||
|
set { this.SetProperty("Launch", value); }
|
||||||
|
}
|
||||||
|
|
||||||
// VMware
|
// VMware
|
||||||
public VMwareEdition VMwareEdition {
|
public VMwareEdition VMwareEdition {
|
||||||
get { return GetProperty("VMwareEdition", VMwareEdition.Player); }
|
get { return GetProperty("VMwareEdition", VMwareEdition.Player); }
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,26 @@ namespace Cosmos.Build.Common {
|
||||||
PXE
|
PXE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum Deployment {
|
||||||
|
[Description("ISO Image")]
|
||||||
|
ISO,
|
||||||
|
[Description("USB Device")]
|
||||||
|
USB,
|
||||||
|
[Description("PXE Network Boot")]
|
||||||
|
PXE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Launch {
|
||||||
|
[Description("None or Manual")]
|
||||||
|
None,
|
||||||
|
[Description("VMware")]
|
||||||
|
VMware,
|
||||||
|
[Description("PXE Server")]
|
||||||
|
PXE,
|
||||||
|
[Description("Specially attached slave")]
|
||||||
|
Slave
|
||||||
|
}
|
||||||
|
|
||||||
public enum VMwareEdition {
|
public enum VMwareEdition {
|
||||||
Workstation,
|
Workstation,
|
||||||
Player
|
Player
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@
|
||||||
this.lablDeployText = new System.Windows.Forms.Label();
|
this.lablDeployText = new System.Windows.Forms.Label();
|
||||||
this.lablBuildOnly = new System.Windows.Forms.Label();
|
this.lablBuildOnly = new System.Windows.Forms.Label();
|
||||||
this.lboxProfile = new System.Windows.Forms.ListBox();
|
this.lboxProfile = new System.Windows.Forms.ListBox();
|
||||||
this.tabDeploy = new System.Windows.Forms.TabPage();
|
this.tabDeployment = new System.Windows.Forms.TabPage();
|
||||||
this.lboxDeploy = new System.Windows.Forms.ListBox();
|
this.lboxDeployment = new System.Windows.Forms.ListBox();
|
||||||
this.tabLunch = new System.Windows.Forms.TabPage();
|
this.tabLunch = new System.Windows.Forms.TabPage();
|
||||||
this.listBox2 = new System.Windows.Forms.ListBox();
|
this.lboxLaunch = new System.Windows.Forms.ListBox();
|
||||||
this.tabCompile = new System.Windows.Forms.TabPage();
|
this.tabCompile = new System.Windows.Forms.TabPage();
|
||||||
this.comboFramework = new System.Windows.Forms.ComboBox();
|
this.comboFramework = new System.Windows.Forms.ComboBox();
|
||||||
this.buttonOutputBrowse = new System.Windows.Forms.Button();
|
this.buttonOutputBrowse = new System.Windows.Forms.Button();
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.TabControl1.SuspendLayout();
|
this.TabControl1.SuspendLayout();
|
||||||
this.tabProfile.SuspendLayout();
|
this.tabProfile.SuspendLayout();
|
||||||
this.tabDeploy.SuspendLayout();
|
this.tabDeployment.SuspendLayout();
|
||||||
this.tabLunch.SuspendLayout();
|
this.tabLunch.SuspendLayout();
|
||||||
this.tabCompile.SuspendLayout();
|
this.tabCompile.SuspendLayout();
|
||||||
this.tabAssembler.SuspendLayout();
|
this.tabAssembler.SuspendLayout();
|
||||||
|
|
@ -120,7 +120,7 @@
|
||||||
// TabControl1
|
// TabControl1
|
||||||
//
|
//
|
||||||
this.TabControl1.Controls.Add(this.tabProfile);
|
this.TabControl1.Controls.Add(this.tabProfile);
|
||||||
this.TabControl1.Controls.Add(this.tabDeploy);
|
this.TabControl1.Controls.Add(this.tabDeployment);
|
||||||
this.TabControl1.Controls.Add(this.tabLunch);
|
this.TabControl1.Controls.Add(this.tabLunch);
|
||||||
this.TabControl1.Controls.Add(this.tabCompile);
|
this.TabControl1.Controls.Add(this.tabCompile);
|
||||||
this.TabControl1.Controls.Add(this.tabAssembler);
|
this.TabControl1.Controls.Add(this.tabAssembler);
|
||||||
|
|
@ -192,29 +192,29 @@
|
||||||
this.lboxProfile.Sorted = true;
|
this.lboxProfile.Sorted = true;
|
||||||
this.lboxProfile.TabIndex = 2;
|
this.lboxProfile.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// tabDeploy
|
// tabDeployment
|
||||||
//
|
//
|
||||||
this.tabDeploy.Controls.Add(this.lboxDeploy);
|
this.tabDeployment.Controls.Add(this.lboxDeployment);
|
||||||
this.tabDeploy.Location = new System.Drawing.Point(4, 22);
|
this.tabDeployment.Location = new System.Drawing.Point(4, 22);
|
||||||
this.tabDeploy.Name = "tabDeploy";
|
this.tabDeployment.Name = "tabDeployment";
|
||||||
this.tabDeploy.Size = new System.Drawing.Size(627, 293);
|
this.tabDeployment.Size = new System.Drawing.Size(627, 293);
|
||||||
this.tabDeploy.TabIndex = 11;
|
this.tabDeployment.TabIndex = 11;
|
||||||
this.tabDeploy.Text = "Deploy";
|
this.tabDeployment.Text = "Deployment";
|
||||||
this.tabDeploy.UseVisualStyleBackColor = true;
|
this.tabDeployment.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// lboxDeploy
|
// lboxDeployment
|
||||||
//
|
//
|
||||||
this.lboxDeploy.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lboxDeployment.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lboxDeploy.FormattingEnabled = true;
|
this.lboxDeployment.FormattingEnabled = true;
|
||||||
this.lboxDeploy.Location = new System.Drawing.Point(0, 0);
|
this.lboxDeployment.Location = new System.Drawing.Point(0, 0);
|
||||||
this.lboxDeploy.Name = "lboxDeploy";
|
this.lboxDeployment.Name = "lboxDeployment";
|
||||||
this.lboxDeploy.Size = new System.Drawing.Size(206, 293);
|
this.lboxDeployment.Size = new System.Drawing.Size(206, 293);
|
||||||
this.lboxDeploy.Sorted = true;
|
this.lboxDeployment.Sorted = true;
|
||||||
this.lboxDeploy.TabIndex = 3;
|
this.lboxDeployment.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// tabLunch
|
// tabLunch
|
||||||
//
|
//
|
||||||
this.tabLunch.Controls.Add(this.listBox2);
|
this.tabLunch.Controls.Add(this.lboxLaunch);
|
||||||
this.tabLunch.Location = new System.Drawing.Point(4, 22);
|
this.tabLunch.Location = new System.Drawing.Point(4, 22);
|
||||||
this.tabLunch.Name = "tabLunch";
|
this.tabLunch.Name = "tabLunch";
|
||||||
this.tabLunch.Size = new System.Drawing.Size(627, 293);
|
this.tabLunch.Size = new System.Drawing.Size(627, 293);
|
||||||
|
|
@ -222,15 +222,15 @@
|
||||||
this.tabLunch.Text = "Launch";
|
this.tabLunch.Text = "Launch";
|
||||||
this.tabLunch.UseVisualStyleBackColor = true;
|
this.tabLunch.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// listBox2
|
// lboxLaunch
|
||||||
//
|
//
|
||||||
this.listBox2.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lboxLaunch.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.listBox2.FormattingEnabled = true;
|
this.lboxLaunch.FormattingEnabled = true;
|
||||||
this.listBox2.Location = new System.Drawing.Point(0, 0);
|
this.lboxLaunch.Location = new System.Drawing.Point(0, 0);
|
||||||
this.listBox2.Name = "listBox2";
|
this.lboxLaunch.Name = "lboxLaunch";
|
||||||
this.listBox2.Size = new System.Drawing.Size(206, 336);
|
this.lboxLaunch.Size = new System.Drawing.Size(206, 293);
|
||||||
this.listBox2.Sorted = true;
|
this.lboxLaunch.Sorted = true;
|
||||||
this.listBox2.TabIndex = 3;
|
this.lboxLaunch.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// tabCompile
|
// tabCompile
|
||||||
//
|
//
|
||||||
|
|
@ -619,7 +619,7 @@
|
||||||
this.TabControl1.ResumeLayout(false);
|
this.TabControl1.ResumeLayout(false);
|
||||||
this.tabProfile.ResumeLayout(false);
|
this.tabProfile.ResumeLayout(false);
|
||||||
this.tabProfile.PerformLayout();
|
this.tabProfile.PerformLayout();
|
||||||
this.tabDeploy.ResumeLayout(false);
|
this.tabDeployment.ResumeLayout(false);
|
||||||
this.tabLunch.ResumeLayout(false);
|
this.tabLunch.ResumeLayout(false);
|
||||||
this.tabCompile.ResumeLayout(false);
|
this.tabCompile.ResumeLayout(false);
|
||||||
this.tabCompile.PerformLayout();
|
this.tabCompile.PerformLayout();
|
||||||
|
|
@ -649,10 +649,10 @@
|
||||||
private System.Windows.Forms.Label lablDeployText;
|
private System.Windows.Forms.Label lablDeployText;
|
||||||
private System.Windows.Forms.Label lablBuildOnly;
|
private System.Windows.Forms.Label lablBuildOnly;
|
||||||
private System.Windows.Forms.ListBox lboxProfile;
|
private System.Windows.Forms.ListBox lboxProfile;
|
||||||
private System.Windows.Forms.TabPage tabDeploy;
|
private System.Windows.Forms.TabPage tabDeployment;
|
||||||
private System.Windows.Forms.ListBox lboxDeploy;
|
private System.Windows.Forms.ListBox lboxDeployment;
|
||||||
private System.Windows.Forms.TabPage tabLunch;
|
private System.Windows.Forms.TabPage tabLunch;
|
||||||
private System.Windows.Forms.ListBox listBox2;
|
private System.Windows.Forms.ListBox lboxLaunch;
|
||||||
private System.Windows.Forms.TabPage tabCompile;
|
private System.Windows.Forms.TabPage tabCompile;
|
||||||
private System.Windows.Forms.ComboBox comboFramework;
|
private System.Windows.Forms.ComboBox comboFramework;
|
||||||
private System.Windows.Forms.Button buttonOutputBrowse;
|
private System.Windows.Forms.Button buttonOutputBrowse;
|
||||||
|
|
|
||||||
|
|
@ -116,13 +116,40 @@ namespace Cosmos.VS.Package {
|
||||||
public CosmosPage() {
|
public CosmosPage() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
textOutputPath.TextChanged += delegate(Object sender, EventArgs e) {
|
# region Profile
|
||||||
string value = textOutputPath.Text;
|
lboxProfile.Items.AddRange(EnumValue.GetEnumValues(typeof(Profile), true));
|
||||||
if (!string.Equals(value, mProps.OutputPath, StringComparison.InvariantCultureIgnoreCase)) {
|
lboxProfile.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
||||||
mProps.OutputPath = textOutputPath.Text;
|
var xValue = (Profile)((EnumValue)lboxProfile.SelectedItem).Value;
|
||||||
|
if (xValue != mProps.Profile) {
|
||||||
|
mProps.Profile = xValue;
|
||||||
|
IsDirty = true;
|
||||||
|
UpdateUI();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
# region Deploy
|
||||||
|
lboxDeployment.Items.AddRange(EnumValue.GetEnumValues(typeof(Deployment), true));
|
||||||
|
lboxDeployment.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
||||||
|
var xValue = (Deployment)((EnumValue)lboxDeployment.SelectedItem).Value;
|
||||||
|
if (xValue != mProps.Deployment) {
|
||||||
|
mProps.Deployment = xValue;
|
||||||
IsDirty = true;
|
IsDirty = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
# region Launch
|
||||||
|
lboxLaunch.Items.AddRange(EnumValue.GetEnumValues(typeof(Launch), true));
|
||||||
|
lboxLaunch.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
||||||
|
var xValue = (Launch)((EnumValue)lboxLaunch.SelectedItem).Value;
|
||||||
|
if (xValue != mProps.Launch) {
|
||||||
|
mProps.Launch = xValue;
|
||||||
|
IsDirty = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
comboFramework.Items.AddRange(EnumValue.GetEnumValues(typeof(Framework), true));
|
comboFramework.Items.AddRange(EnumValue.GetEnumValues(typeof(Framework), true));
|
||||||
comboFramework.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
comboFramework.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
||||||
var value = (Framework)((EnumValue)comboFramework.SelectedItem).Value;
|
var value = (Framework)((EnumValue)comboFramework.SelectedItem).Value;
|
||||||
|
|
@ -132,6 +159,14 @@ namespace Cosmos.VS.Package {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
textOutputPath.TextChanged += delegate(Object sender, EventArgs e) {
|
||||||
|
string value = textOutputPath.Text;
|
||||||
|
if (!string.Equals(value, mProps.OutputPath, StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
|
mProps.OutputPath = textOutputPath.Text;
|
||||||
|
IsDirty = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
checkUseInternalAssembler.CheckedChanged += delegate(Object sender, EventArgs e) {
|
checkUseInternalAssembler.CheckedChanged += delegate(Object sender, EventArgs e) {
|
||||||
bool value = checkUseInternalAssembler.Checked;
|
bool value = checkUseInternalAssembler.Checked;
|
||||||
if (value != mProps.UseInternalAssembler) {
|
if (value != mProps.UseInternalAssembler) {
|
||||||
|
|
@ -141,16 +176,6 @@ namespace Cosmos.VS.Package {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
lboxProfile.Items.AddRange(EnumValue.GetEnumValues(typeof(Profile), true));
|
|
||||||
lboxProfile.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
|
||||||
var value = (Profile)((EnumValue)lboxProfile.SelectedItem).Value;
|
|
||||||
if (value != mProps.Profile) {
|
|
||||||
mProps.Profile = value;
|
|
||||||
IsDirty = true;
|
|
||||||
UpdateUI();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#region VMware
|
#region VMware
|
||||||
cmboVMwareEdition.Items.AddRange(EnumValue.GetEnumValues(typeof(VMwareEdition), true));
|
cmboVMwareEdition.Items.AddRange(EnumValue.GetEnumValues(typeof(VMwareEdition), true));
|
||||||
cmboVMwareEdition.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
cmboVMwareEdition.SelectedIndexChanged += delegate(Object sender, EventArgs e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue