2.7
This commit is contained in:
parent
ebcef2c3fb
commit
e54405800c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\ARCHBLOXLauncherGUI.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
Binary file not shown.
|
|
@ -6,10 +6,10 @@
|
|||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ApplicationIcon>archblox.ico</ApplicationIcon>
|
||||
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
|
||||
<PackageProjectUrl>https://www.archblox.com</PackageProjectUrl>
|
||||
<PackageProjectUrl>http://www.archblox.com</PackageProjectUrl>
|
||||
<Description>ARCHBLOX Launcher</Description>
|
||||
<PackageIcon>archblox.png</PackageIcon>
|
||||
<RepositoryUrl>https://www.github.com/thomasluigi07/ARCHBLOXLauncher</RepositoryUrl>
|
||||
<RepositoryUrl>http://www.github.com/thomasluigi07/ARCHBLOXLauncher</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<AssemblyVersion>2.7</AssemblyVersion>
|
||||
<FileVersion>2.7</FileVersion>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.IO;
|
||||
|
||||
namespace ARCHBLOXLauncherGUI
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@
|
|||
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Image = global::ARCHBLOXLauncherGUI.Properties.Resources.unknown;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(51, 11);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(51, 12);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(203, 37);
|
||||
this.pictureBox1.Size = new System.Drawing.Size(203, 40);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
|
|
@ -72,9 +72,9 @@
|
|||
this.JoinBox.Controls.Add(this.serverport);
|
||||
this.JoinBox.Controls.Add(this.label7);
|
||||
this.JoinBox.Controls.Add(this.button2);
|
||||
this.JoinBox.Location = new System.Drawing.Point(7, 48);
|
||||
this.JoinBox.Location = new System.Drawing.Point(7, 51);
|
||||
this.JoinBox.Name = "JoinBox";
|
||||
this.JoinBox.Size = new System.Drawing.Size(286, 140);
|
||||
this.JoinBox.Size = new System.Drawing.Size(286, 150);
|
||||
this.JoinBox.TabIndex = 26;
|
||||
this.JoinBox.TabStop = false;
|
||||
this.JoinBox.Visible = false;
|
||||
|
|
@ -83,40 +83,40 @@
|
|||
//
|
||||
this.serverip.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower;
|
||||
this.serverip.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.serverip.Location = new System.Drawing.Point(6, 37);
|
||||
this.serverip.Location = new System.Drawing.Point(6, 40);
|
||||
this.serverip.MaxLength = 15;
|
||||
this.serverip.Name = "serverip";
|
||||
this.serverip.PlaceholderText = "IP";
|
||||
this.serverip.Size = new System.Drawing.Size(276, 21);
|
||||
this.serverip.Size = new System.Drawing.Size(276, 23);
|
||||
this.serverip.TabIndex = 18;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label4.Location = new System.Drawing.Point(6, 18);
|
||||
this.label4.Location = new System.Drawing.Point(6, 19);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(277, 14);
|
||||
this.label4.Size = new System.Drawing.Size(270, 15);
|
||||
this.label4.TabIndex = 17;
|
||||
this.label4.Text = "Server IP (Use localhost if joining your own server)";
|
||||
//
|
||||
// serverport
|
||||
//
|
||||
this.serverport.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.serverport.Location = new System.Drawing.Point(6, 78);
|
||||
this.serverport.Location = new System.Drawing.Point(6, 84);
|
||||
this.serverport.MaxLength = 5;
|
||||
this.serverport.Name = "serverport";
|
||||
this.serverport.PlaceholderText = "PORT";
|
||||
this.serverport.Size = new System.Drawing.Size(274, 21);
|
||||
this.serverport.Size = new System.Drawing.Size(274, 23);
|
||||
this.serverport.TabIndex = 19;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label7.Location = new System.Drawing.Point(6, 62);
|
||||
this.label7.Location = new System.Drawing.Point(6, 66);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(67, 14);
|
||||
this.label7.Size = new System.Drawing.Size(64, 15);
|
||||
this.label7.TabIndex = 25;
|
||||
this.label7.Text = "Server Port";
|
||||
//
|
||||
|
|
@ -127,9 +127,9 @@
|
|||
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button2.Location = new System.Drawing.Point(6, 109);
|
||||
this.button2.Location = new System.Drawing.Point(6, 117);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(274, 21);
|
||||
this.button2.Size = new System.Drawing.Size(274, 22);
|
||||
this.button2.TabIndex = 24;
|
||||
this.button2.Text = "Join";
|
||||
this.button2.UseVisualStyleBackColor = false;
|
||||
|
|
@ -144,9 +144,9 @@
|
|||
this.HostBox.Controls.Add(this.button3);
|
||||
this.HostBox.Controls.Add(this.textBox2);
|
||||
this.HostBox.Controls.Add(this.button1);
|
||||
this.HostBox.Location = new System.Drawing.Point(7, 48);
|
||||
this.HostBox.Location = new System.Drawing.Point(7, 51);
|
||||
this.HostBox.Name = "HostBox";
|
||||
this.HostBox.Size = new System.Drawing.Size(288, 131);
|
||||
this.HostBox.Size = new System.Drawing.Size(288, 140);
|
||||
this.HostBox.TabIndex = 27;
|
||||
this.HostBox.TabStop = false;
|
||||
this.HostBox.Visible = false;
|
||||
|
|
@ -155,29 +155,29 @@
|
|||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Location = new System.Drawing.Point(4, 18);
|
||||
this.label2.Location = new System.Drawing.Point(4, 19);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(168, 14);
|
||||
this.label2.Size = new System.Drawing.Size(162, 15);
|
||||
this.label2.TabIndex = 23;
|
||||
this.label2.Text = "Port (53640 is recommended)";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.textBox1.Location = new System.Drawing.Point(6, 35);
|
||||
this.textBox1.Location = new System.Drawing.Point(6, 38);
|
||||
this.textBox1.MaxLength = 5;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.PlaceholderText = "PORT";
|
||||
this.textBox1.Size = new System.Drawing.Size(274, 21);
|
||||
this.textBox1.Size = new System.Drawing.Size(274, 23);
|
||||
this.textBox1.TabIndex = 24;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.Location = new System.Drawing.Point(4, 59);
|
||||
this.label3.Location = new System.Drawing.Point(4, 63);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(190, 14);
|
||||
this.label3.Size = new System.Drawing.Size(187, 15);
|
||||
this.label3.TabIndex = 27;
|
||||
this.label3.Text = "Filename (use temp.rbxl if unsure)";
|
||||
//
|
||||
|
|
@ -187,9 +187,9 @@
|
|||
this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button3.Location = new System.Drawing.Point(207, 75);
|
||||
this.button3.Location = new System.Drawing.Point(207, 80);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(73, 21);
|
||||
this.button3.Size = new System.Drawing.Size(73, 22);
|
||||
this.button3.TabIndex = 26;
|
||||
this.button3.Text = "Browse...";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
|
|
@ -198,10 +198,10 @@
|
|||
// textBox2
|
||||
//
|
||||
this.textBox2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.textBox2.Location = new System.Drawing.Point(6, 76);
|
||||
this.textBox2.Location = new System.Drawing.Point(6, 81);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.PlaceholderText = "Filename";
|
||||
this.textBox2.Size = new System.Drawing.Size(195, 21);
|
||||
this.textBox2.Size = new System.Drawing.Size(195, 23);
|
||||
this.textBox2.TabIndex = 25;
|
||||
//
|
||||
// button1
|
||||
|
|
@ -211,9 +211,9 @@
|
|||
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button1.Location = new System.Drawing.Point(6, 102);
|
||||
this.button1.Location = new System.Drawing.Point(6, 109);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(274, 21);
|
||||
this.button1.Size = new System.Drawing.Size(274, 22);
|
||||
this.button1.TabIndex = 28;
|
||||
this.button1.Text = "Host";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
|
|
@ -226,9 +226,9 @@
|
|||
this.HostBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.HostBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.HostBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.HostBTN.Location = new System.Drawing.Point(12, 121);
|
||||
this.HostBTN.Location = new System.Drawing.Point(12, 130);
|
||||
this.HostBTN.Name = "HostBTN";
|
||||
this.HostBTN.Size = new System.Drawing.Size(137, 49);
|
||||
this.HostBTN.Size = new System.Drawing.Size(137, 52);
|
||||
this.HostBTN.TabIndex = 28;
|
||||
this.HostBTN.Text = "Host a Game";
|
||||
this.HostBTN.UseVisualStyleBackColor = true;
|
||||
|
|
@ -241,9 +241,9 @@
|
|||
this.JoinBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.JoinBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.JoinBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.JoinBTN.Location = new System.Drawing.Point(155, 121);
|
||||
this.JoinBTN.Location = new System.Drawing.Point(155, 130);
|
||||
this.JoinBTN.Name = "JoinBTN";
|
||||
this.JoinBTN.Size = new System.Drawing.Size(135, 49);
|
||||
this.JoinBTN.Size = new System.Drawing.Size(135, 52);
|
||||
this.JoinBTN.TabIndex = 29;
|
||||
this.JoinBTN.Text = "Join a Game";
|
||||
this.JoinBTN.UseVisualStyleBackColor = true;
|
||||
|
|
@ -256,9 +256,9 @@
|
|||
this.UpdateBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.UpdateBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.UpdateBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.UpdateBTN.Location = new System.Drawing.Point(12, 66);
|
||||
this.UpdateBTN.Location = new System.Drawing.Point(12, 71);
|
||||
this.UpdateBTN.Name = "UpdateBTN";
|
||||
this.UpdateBTN.Size = new System.Drawing.Size(276, 49);
|
||||
this.UpdateBTN.Size = new System.Drawing.Size(277, 53);
|
||||
this.UpdateBTN.TabIndex = 30;
|
||||
this.UpdateBTN.Text = "Install";
|
||||
this.UpdateBTN.UseVisualStyleBackColor = true;
|
||||
|
|
@ -269,9 +269,9 @@
|
|||
this.BackBTN.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
|
||||
this.BackBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.BackBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.BackBTN.Location = new System.Drawing.Point(254, 19);
|
||||
this.BackBTN.Location = new System.Drawing.Point(254, 20);
|
||||
this.BackBTN.Name = "BackBTN";
|
||||
this.BackBTN.Size = new System.Drawing.Size(42, 21);
|
||||
this.BackBTN.Size = new System.Drawing.Size(42, 22);
|
||||
this.BackBTN.TabIndex = 31;
|
||||
this.BackBTN.Text = "Back";
|
||||
this.BackBTN.UseVisualStyleBackColor = true;
|
||||
|
|
@ -280,12 +280,12 @@
|
|||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(107)))), ((int)(((byte)(223)))));
|
||||
this.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.animated;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.ClientSize = new System.Drawing.Size(302, 193);
|
||||
this.ClientSize = new System.Drawing.Size(302, 207);
|
||||
this.Controls.Add(this.BackBTN);
|
||||
this.Controls.Add(this.UpdateBTN);
|
||||
this.Controls.Add(this.JoinBTN);
|
||||
|
|
|
|||
48
Form1.cs
48
Form1.cs
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using IWshRuntimeLibrary;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -30,16 +28,26 @@ namespace ARCHBLOXLauncherGUI
|
|||
bool ingame = false;
|
||||
bool hosting = false;
|
||||
private static WebClient wc = new WebClient();
|
||||
static byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
static byte[] raw = wc.DownloadData("http://archblox.com/client/version.txt");
|
||||
static string webData = Encoding.UTF8.GetString(raw);
|
||||
static string version_string = webData;
|
||||
static string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
static string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
static string filePath = Path.Combine(clientPath, "ArchbloxPlayerBeta.exe");
|
||||
// animations
|
||||
delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Check for a internet connection
|
||||
try
|
||||
{
|
||||
wc.DownloadData("http://archblox.com/client/version.txt");
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: HttpOpenRequest failed for GET http://archblox.com/client/version.txt, Error ID: 6", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
|
||||
CreateShortcut();
|
||||
var lastword = "";
|
||||
|
|
@ -67,7 +75,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
}
|
||||
if (info1 == "" || info2 == "")
|
||||
{
|
||||
MessageBox.Show("Paramaters are invalid. Please try again. (ID: 500)", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: Invalid Arguments, Error ID: 500", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
var pProcess = new Process();
|
||||
|
|
@ -99,7 +107,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
}
|
||||
if (info1 == "" || info2 == "")
|
||||
{
|
||||
MessageBox.Show("Paramaters are invalid. Please try again. (ID: 500)", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: Invalid Arguments, Error ID: 500", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
var pProcess = new Process();
|
||||
|
|
@ -130,7 +138,6 @@ namespace ARCHBLOXLauncherGUI
|
|||
// close program
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
client = new DiscordRpcClient("996030605106090006");
|
||||
client.Initialize();
|
||||
client.SetPresence(new RichPresence()
|
||||
|
|
@ -166,7 +173,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
}
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
DialogResult res = MessageBox.Show("You need to install the latest version of ARCHBLOX to host. Would you like to install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
DialogResult res = MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: Out of date client! To update the client, select Yes or select the Install button on the main menu.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
ARCHBLOXLauncherGUI.Form2 form2 = new ARCHBLOXLauncherGUI.Form2();
|
||||
|
|
@ -175,11 +182,11 @@ namespace ARCHBLOXLauncherGUI
|
|||
}
|
||||
else if (textBox1.Text == "" || textBox2.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("Please fill in all of the text boxes.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else if (rbxl == false)
|
||||
{
|
||||
MessageBox.Show("Please use a valid .RBXL! ." + sWord + " is not a supported file format.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: Invalid .RBXL, " + sWord + " is not a supported file format.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -247,7 +254,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
// joining
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
DialogResult res = MessageBox.Show("You need to install the latest version of ARCHBLOX to join " + serverip.Text + ":" + serverport.Text + ". Would you like to install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
DialogResult res = MessageBox.Show("An error occoured while starting ARCHBLOX\n\nDetails: Out of date client! To update the client, select Yes or select the Install button on the main menu.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
ARCHBLOXLauncherGUI.Form2 form2 = new ARCHBLOXLauncherGUI.Form2();
|
||||
|
|
@ -256,7 +263,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
}
|
||||
else if (serverip.Text == "" || serverport.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("Please fill in all of the text boxes.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -324,7 +331,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Title = "Choose a RBXL...";
|
||||
dialog.AddExtension = true;
|
||||
dialog.Filter = "Place File (*.rbxl)| *.rbxl";
|
||||
dialog.Filter = "ROBLOX Place File (*.rbxl)| *.rbxl";
|
||||
if (DialogResult.OK == dialog.ShowDialog())
|
||||
{
|
||||
// check if it is a rbxl
|
||||
|
|
@ -339,7 +346,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
if (line.Contains("<roblox!"))
|
||||
{
|
||||
// is binary/unsupported format
|
||||
MessageBox.Show("Sorry, binary .RBXL files are not supported. Please convert the RBXL into XML format using a converter, then try again.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("Binary ROBLOX Place files are not supported. Did you convert the place correctly, or use ARCHBLOX Studio to create the game?", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
@ -355,13 +362,13 @@ namespace ARCHBLOXLauncherGUI
|
|||
else if (word == ".rbxlx")
|
||||
{
|
||||
// rbxlx, cringe!
|
||||
MessageBox.Show(".RBXLX file formats are not supported, are you sure you converted the .RBXL correctly?", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(".RBXLX place files are not supported! Are you sure you converted the place correctly?", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// wtf this isn't even a place
|
||||
MessageBox.Show(word.ToUpper() + " is not a supported file type!", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(word.ToUpper() + " is not a supported place file!", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -378,7 +385,14 @@ namespace ARCHBLOXLauncherGUI
|
|||
private void UpdateBTN_Click(object sender, EventArgs e)
|
||||
{
|
||||
ARCHBLOXLauncherGUI.Form2 form2 = new ARCHBLOXLauncherGUI.Form2();
|
||||
form2.Show();
|
||||
try
|
||||
{
|
||||
form2.Show();
|
||||
}
|
||||
catch
|
||||
{
|
||||
form2.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void BackBTN_Click(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -39,46 +39,51 @@
|
|||
//
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Image = global::ARCHBLOXLauncherGUI.Properties.Resources.archblox;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(3, 6);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(18, 17);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(46, 46);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.Size = new System.Drawing.Size(35, 42);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(55, 9);
|
||||
this.label1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.label1.Location = new System.Drawing.Point(58, 18);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(144, 15);
|
||||
this.label1.Size = new System.Drawing.Size(237, 21);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Configuring ARCHBLOX...";
|
||||
this.label1.Text = "Static";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(55, 27);
|
||||
this.progressBar1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.progressBar1.BackColor = System.Drawing.Color.White;
|
||||
this.progressBar1.Location = new System.Drawing.Point(58, 51);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(219, 23);
|
||||
this.progressBar1.Size = new System.Drawing.Size(287, 26);
|
||||
this.progressBar1.TabIndex = 2;
|
||||
//
|
||||
// Form2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(280, 59);
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.ClientSize = new System.Drawing.Size(352, 136);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Cursor = System.Windows.Forms.Cursors.AppStarting;
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Form2";
|
||||
this.Text = "ARCHBLOX Installer";
|
||||
this.Text = "ARCHBLOX";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
117
Form2.cs
117
Form2.cs
|
|
@ -20,7 +20,7 @@ namespace ARCHBLOXLauncherGUI
|
|||
|
||||
private static long GetDirectorySize(string folderPath)
|
||||
{
|
||||
// get size of a directory
|
||||
// get size of a directory, important for showing the user how much space ARCHBLOX takes
|
||||
DirectoryInfo di = new DirectoryInfo(folderPath);
|
||||
return di.EnumerateFiles("*", SearchOption.AllDirectories).Sum(fi => fi.Length) / 1000000;
|
||||
}
|
||||
|
|
@ -29,56 +29,73 @@ namespace ARCHBLOXLauncherGUI
|
|||
{
|
||||
InitializeComponent();
|
||||
// setup other variables
|
||||
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
string webData = Encoding.UTF8.GetString(raw);
|
||||
string version_string = webData;
|
||||
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
|
||||
// setup file paths etc
|
||||
{
|
||||
if (Directory.Exists(folderPath))
|
||||
{
|
||||
// since the folder already exists, show size of folder and ask user if they want to delete older versions
|
||||
DialogResult res = MessageBox.Show("Do you want to delete previous installs of ARCHBLOX? Current size of ARCHBLOX folder: " + GetDirectorySize(folderPath) + "MB.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous installs...";
|
||||
Directory.Delete(folderPath, true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// setup variables
|
||||
wc.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
progressBar1.Style = ProgressBarStyle.Marquee;
|
||||
label1.Text = "Configuring ARCHBLOX...";
|
||||
wc.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
if (Directory.Exists(clientPath))
|
||||
try
|
||||
{
|
||||
// ask user if they want to re-install
|
||||
DialogResult res = MessageBox.Show("The latest version of ARCHBLOX is already installed. Do you want to re-install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous install...";
|
||||
Directory.Delete(clientPath, true);
|
||||
|
||||
}
|
||||
if (res == DialogResult.No)
|
||||
{
|
||||
label1.Text = "Cancelled install.";
|
||||
DontEvenBother = true;
|
||||
}
|
||||
wc.DownloadData("http://archblox.com/client/version.txt");
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("An error occoured while installing ARCHBLOX\n\nDetails: HttpOpenRequest failed for GET http://archblox.com/client/version.txt, Error ID: 6", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
DontEvenBother = true;
|
||||
}
|
||||
if (DontEvenBother == false)
|
||||
{
|
||||
// continue with install
|
||||
Directory.CreateDirectory(clientPath);
|
||||
wc.DownloadFileAsync(new Uri(@"https://archblox.com/client/" + version_string + ".zip"), filePath);
|
||||
progressBar1.Style = ProgressBarStyle.Blocks;
|
||||
handle.WaitOne();
|
||||
byte[] raw = wc.DownloadData("http://archblox.com/client/version.txt");
|
||||
string webData = Encoding.UTF8.GetString(raw);
|
||||
string version_string = webData;
|
||||
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
string filePath = Path.Combine(Path.GetTempPath(),version_string + ".zip");
|
||||
// setup file paths etc
|
||||
{
|
||||
if (Directory.Exists(folderPath))
|
||||
{
|
||||
// since the folder already exists, show size of folder and ask user if they want to delete older versions
|
||||
DialogResult res = MessageBox.Show("Do you want to delete previous installs of ARCHBLOX? Current size of ARCHBLOX folder: " + GetDirectorySize(folderPath) + "MB.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous installs...";
|
||||
Directory.Delete(folderPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// setup variables
|
||||
wc.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
label1.Text = "Configuring ARCHBLOX...";
|
||||
if (Directory.Exists(clientPath))
|
||||
{
|
||||
// ask user if they want to re-install
|
||||
DialogResult res = MessageBox.Show("The latest version of ARCHBLOX is already installed. Do you want to re-install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous install...";
|
||||
Directory.Delete(clientPath, true);
|
||||
|
||||
}
|
||||
if (res == DialogResult.No)
|
||||
{
|
||||
label1.Text = "Cancelled install.";
|
||||
DontEvenBother = true;
|
||||
}
|
||||
}
|
||||
if (DontEvenBother == false)
|
||||
{
|
||||
// continue with install
|
||||
Directory.CreateDirectory(clientPath);
|
||||
wc.DownloadFileAsync(new Uri(@"http://archblox.com/client/" + version_string + ".zip"), filePath);
|
||||
progressBar1.Style = ProgressBarStyle.Blocks;
|
||||
handle.WaitOne();
|
||||
} else
|
||||
{
|
||||
this.Hide();
|
||||
this.Close();
|
||||
}
|
||||
} else
|
||||
{
|
||||
this.Hide();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
|
|
@ -87,12 +104,12 @@ namespace ARCHBLOXLauncherGUI
|
|||
{
|
||||
// the download has completed, extract zip, setup URI.
|
||||
IsCompleted = true;
|
||||
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
byte[] raw = wc.DownloadData("http://archblox.com/client/version.txt");
|
||||
string webData = Encoding.UTF8.GetString(raw);
|
||||
string version_string = webData;
|
||||
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
|
||||
string filePath = Path.Combine(Path.GetTempPath(), version_string + ".zip");
|
||||
ZipFile.ExtractToDirectory(filePath, clientPath);
|
||||
File.Delete(filePath);
|
||||
label1.Text = "Installing URi...";
|
||||
|
|
@ -109,7 +126,9 @@ namespace ARCHBLOXLauncherGUI
|
|||
{
|
||||
label1.Text = "ARCHBLOX installed without URI.";
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
this.Hide();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
http://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
http://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
http://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,8 @@
|
|||
## ARCHBLOXLauncher
|
||||
A Launcher for ARCHBLOX.
|
||||
|
||||
# Credits
|
||||
p0s0: Helped out with URI
|
||||
BakonBot: Binary RBXL detection
|
||||
Stack Exchange members: Most of the funny methods used for a lot of things.
|
||||
You: for being awesome. B)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -19,7 +19,7 @@ using System.Reflection;
|
|||
[assembly: System.Reflection.AssemblyProductAttribute("ARCHBLOXLauncherGUI")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ARCHBLOXLauncherGUI")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("2.7")]
|
||||
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://www.github.com/thomasluigi07/ARCHBLOXLauncher")]
|
||||
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "http://www.github.com/thomasluigi07/ARCHBLOXLauncher")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
e7b2af59e3d4d105d76a22845727b3b92c2ba77c
|
||||
bc0113f22f7454ffa2eed34d308b6d9c26a358a0
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,11 +13,13 @@ using System.Reflection;
|
|||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ARCHBLOXLauncherGUI")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyDescriptionAttribute("ARCHBLOX Launcher")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ARCHBLOXLauncherGUI")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ARCHBLOXLauncherGUI")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("2.7")]
|
||||
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://www.github.com/thomasluigi07/ARCHBLOXLauncher")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6f9d16c093487edd1e5a5cc9891c502fd7bc9069
|
||||
96d1eaab556670d9b3f5c78fd41934fe1d9ac03e
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.RootNamespace = ARCHBLOXLauncherGUI
|
||||
build_property.ProjectDir = C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue