Compare commits

...

8 Commits

Author SHA1 Message Date
Zack 67a2a9132f
Add notice for new installer 2021-04-03 14:34:55 -04:00
Zack Rauen 2cf46226ae Bump version 2020-07-29 16:07:25 -04:00
Zack Rauen f05a5e5d60 Update verification files 2020-07-29 16:05:36 -04:00
Zack Rauen 14e327ceed Update version 2020-04-23 20:43:49 -04:00
Zack Rauen 83164b7b66 some updates 2020-04-10 11:33:53 -04:00
Zack fdac1c5bc0
Merge pull request #7 from CallumCarmicheal/master
Fixed DPI issue by setting anchor points
2020-04-07 22:48:52 -04:00
Callum Carmicheal b6d3e2ee09 Fixed DPI issue by setting anchor points
Fixes for issues:
rauenzi/BBDInstaller#4
rauenzi/BBDInstaller#5
2020-04-06 15:49:56 +01:00
Zack Rauen bcd4c38f68 Fix issue with getting paths 2019-12-11 00:58:17 -05:00
14 changed files with 176 additions and 79 deletions

View File

@ -40,11 +40,10 @@
//
// titleLabel
//
this.titleLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
this.titleLabel.AutoSize = true;
this.titleLabel.BackColor = System.Drawing.Color.Transparent;
this.titleLabel.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.titleLabel.Location = new System.Drawing.Point(6, 9);
this.titleLabel.Location = new System.Drawing.Point(7, 10);
this.titleLabel.Name = "titleLabel";
this.titleLabel.Size = new System.Drawing.Size(533, 13);
this.titleLabel.TabIndex = 37;
@ -53,15 +52,15 @@
//
// browsePTB
//
this.browsePTB.Anchor = System.Windows.Forms.AnchorStyles.None;
this.browsePTB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.browsePTB.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.browsePTB.Cursor = System.Windows.Forms.Cursors.Hand;
this.browsePTB.FlatAppearance.BorderSize = 0;
this.browsePTB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.browsePTB.ForeColor = System.Drawing.Color.White;
this.browsePTB.Location = new System.Drawing.Point(573, 120);
this.browsePTB.Location = new System.Drawing.Point(657, 138);
this.browsePTB.Name = "browsePTB";
this.browsePTB.Size = new System.Drawing.Size(75, 23);
this.browsePTB.Size = new System.Drawing.Size(86, 26);
this.browsePTB.TabIndex = 36;
this.browsePTB.Text = "Browse";
this.browsePTB.UseVisualStyleBackColor = false;
@ -69,37 +68,39 @@
//
// tbPTB
//
this.tbPTB.Anchor = System.Windows.Forms.AnchorStyles.None;
this.tbPTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbPTB.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.tbPTB.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tbPTB.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.tbPTB.ForeColor = System.Drawing.Color.White;
this.tbPTB.Location = new System.Drawing.Point(169, 125);
this.tbPTB.Location = new System.Drawing.Point(194, 143);
this.tbPTB.Name = "tbPTB";
this.tbPTB.ReadOnly = true;
this.tbPTB.Size = new System.Drawing.Size(385, 13);
this.tbPTB.Size = new System.Drawing.Size(441, 15);
this.tbPTB.TabIndex = 34;
//
// panel3
//
this.panel3.Anchor = System.Windows.Forms.AnchorStyles.None;
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.panel3.Location = new System.Drawing.Point(156, 120);
this.panel3.Location = new System.Drawing.Point(179, 138);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(411, 23);
this.panel3.Size = new System.Drawing.Size(471, 26);
this.panel3.TabIndex = 35;
//
// browseCanary
//
this.browseCanary.Anchor = System.Windows.Forms.AnchorStyles.None;
this.browseCanary.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.browseCanary.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.browseCanary.Cursor = System.Windows.Forms.Cursors.Hand;
this.browseCanary.FlatAppearance.BorderSize = 0;
this.browseCanary.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.browseCanary.ForeColor = System.Drawing.Color.White;
this.browseCanary.Location = new System.Drawing.Point(573, 78);
this.browseCanary.Location = new System.Drawing.Point(657, 89);
this.browseCanary.Name = "browseCanary";
this.browseCanary.Size = new System.Drawing.Size(75, 23);
this.browseCanary.Size = new System.Drawing.Size(86, 26);
this.browseCanary.TabIndex = 33;
this.browseCanary.Text = "Browse";
this.browseCanary.UseVisualStyleBackColor = false;
@ -107,37 +108,39 @@
//
// tbCanary
//
this.tbCanary.Anchor = System.Windows.Forms.AnchorStyles.None;
this.tbCanary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbCanary.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.tbCanary.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tbCanary.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.tbCanary.ForeColor = System.Drawing.Color.White;
this.tbCanary.Location = new System.Drawing.Point(169, 83);
this.tbCanary.Location = new System.Drawing.Point(194, 95);
this.tbCanary.Name = "tbCanary";
this.tbCanary.ReadOnly = true;
this.tbCanary.Size = new System.Drawing.Size(385, 13);
this.tbCanary.Size = new System.Drawing.Size(441, 15);
this.tbCanary.TabIndex = 31;
//
// panel1
//
this.panel1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.panel1.Location = new System.Drawing.Point(156, 78);
this.panel1.Location = new System.Drawing.Point(179, 89);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(411, 23);
this.panel1.Size = new System.Drawing.Size(471, 26);
this.panel1.TabIndex = 32;
//
// browseStable
//
this.browseStable.Anchor = System.Windows.Forms.AnchorStyles.None;
this.browseStable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.browseStable.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.browseStable.Cursor = System.Windows.Forms.Cursors.Hand;
this.browseStable.FlatAppearance.BorderSize = 0;
this.browseStable.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.browseStable.ForeColor = System.Drawing.Color.White;
this.browseStable.Location = new System.Drawing.Point(573, 37);
this.browseStable.Location = new System.Drawing.Point(657, 42);
this.browseStable.Name = "browseStable";
this.browseStable.Size = new System.Drawing.Size(75, 23);
this.browseStable.Size = new System.Drawing.Size(86, 26);
this.browseStable.TabIndex = 30;
this.browseStable.Text = "Browse";
this.browseStable.UseVisualStyleBackColor = false;
@ -145,35 +148,36 @@
//
// tbStable
//
this.tbStable.Anchor = System.Windows.Forms.AnchorStyles.None;
this.tbStable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbStable.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.tbStable.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tbStable.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.tbStable.ForeColor = System.Drawing.Color.White;
this.tbStable.Location = new System.Drawing.Point(169, 42);
this.tbStable.Location = new System.Drawing.Point(194, 48);
this.tbStable.Name = "tbStable";
this.tbStable.ReadOnly = true;
this.tbStable.Size = new System.Drawing.Size(385, 13);
this.tbStable.Size = new System.Drawing.Size(441, 15);
this.tbStable.TabIndex = 28;
//
// panel2
//
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground;
this.panel2.Location = new System.Drawing.Point(156, 37);
this.panel2.Location = new System.Drawing.Point(179, 42);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(411, 23);
this.panel2.Size = new System.Drawing.Size(471, 26);
this.panel2.TabIndex = 29;
//
// discordPTB
//
this.discordPTB.Anchor = System.Windows.Forms.AnchorStyles.None;
this.discordPTB.AutoSize = true;
this.discordPTB.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.discordPTB.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.discordPTB.Cursor = System.Windows.Forms.Cursors.Hand;
this.discordPTB.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.discordPTB.Location = new System.Drawing.Point(9, 124);
this.discordPTB.Location = new System.Drawing.Point(10, 142);
this.discordPTB.Name = "discordPTB";
this.discordPTB.Size = new System.Drawing.Size(98, 17);
this.discordPTB.TabIndex = 27;
@ -183,13 +187,12 @@
//
// discordCanary
//
this.discordCanary.Anchor = System.Windows.Forms.AnchorStyles.None;
this.discordCanary.AutoSize = true;
this.discordCanary.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.discordCanary.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.discordCanary.Cursor = System.Windows.Forms.Cursors.Hand;
this.discordCanary.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.discordCanary.Location = new System.Drawing.Point(9, 82);
this.discordCanary.Location = new System.Drawing.Point(10, 94);
this.discordCanary.Name = "discordCanary";
this.discordCanary.Size = new System.Drawing.Size(110, 17);
this.discordCanary.TabIndex = 26;
@ -199,13 +202,12 @@
//
// discordStable
//
this.discordStable.Anchor = System.Windows.Forms.AnchorStyles.None;
this.discordStable.AutoSize = true;
this.discordStable.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.discordStable.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.discordStable.Cursor = System.Windows.Forms.Cursors.Hand;
this.discordStable.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.discordStable.Location = new System.Drawing.Point(9, 41);
this.discordStable.Location = new System.Drawing.Point(10, 47);
this.discordStable.Name = "discordStable";
this.discordStable.Size = new System.Drawing.Size(107, 17);
this.discordStable.TabIndex = 25;
@ -215,7 +217,7 @@
//
// DiscordLocator
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleDimensions = new System.Drawing.SizeF(110F, 110F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.titleLabel);
@ -232,7 +234,7 @@
this.Controls.Add(this.discordCanary);
this.Controls.Add(this.discordStable);
this.Name = "DiscordLocator";
this.Size = new System.Drawing.Size(662, 161);
this.Size = new System.Drawing.Size(759, 184);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -86,7 +86,7 @@ namespace BandagedBD {
this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.linkLabel1.LinkColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.linkLabel1.Location = new System.Drawing.Point(132, 471);
this.linkLabel1.Location = new System.Drawing.Point(172, 471);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(95, 13);
this.linkLabel1.TabIndex = 34;
@ -109,6 +109,7 @@ namespace BandagedBD {
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
@ -125,6 +126,7 @@ namespace BandagedBD {
//
// btnNext
//
this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnNext.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.btnNext.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnNext.FlatAppearance.BorderSize = 0;
@ -140,6 +142,7 @@ namespace BandagedBD {
//
// btnBack
//
this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnBack.BackColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.btnBack.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBack.FlatAppearance.BorderSize = 0;
@ -166,11 +169,13 @@ namespace BandagedBD {
this.Controls.Add(this.lblTitle);
this.Controls.Add(this.logo);
this.Controls.Add(this.panelDock);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FormMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "BandagedBD Installer v0.3.2";
this.Load += new System.EventHandler(this.FormMain_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -1,8 +1,9 @@
using BandagedBD.Panels;
using System;
using System.Net;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Threading.Tasks;
namespace BandagedBD {
@ -13,6 +14,9 @@ namespace BandagedBD {
private PanelTypes CurrentPanel = PanelTypes.NONE;
public PanelTypes Action = PanelTypes.NONE;
private string currentTag = "v" + Properties.Resources.Version;
private string remoteTag = "v";
private Dictionary<PanelTypes, IPanel> panelMap = new Dictionary<PanelTypes, IPanel>();
@ -37,6 +41,10 @@ namespace BandagedBD {
if (!Properties.Settings.Default.AgreedToTerms) SwitchPanel(PanelTypes.License);
else SwitchPanel(PanelTypes.Action);
Task.Run(checkForUpdate).ContinueWith(result => {
if (result.Result) showUpdateNotice();
});
}
public void SetTitle(string title) => lblTitle.Text = title;
@ -97,5 +105,52 @@ namespace BandagedBD {
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Utilities.OpenProcess("https://paypal.me/ZackRauen");
}
private async Task<bool> checkForUpdate()
{
string endpoint = "https://api.github.com/repos/rauenzi/BBDInstaller/releases/latest";
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
string tagNameKey = "\"tag_name\":";
using (var wc = new TimedWebClient())
{
try
{
wc.Headers.Set("User-Agent", "BBDInstaller");
string json = wc.DownloadString(endpoint);
int tagNameIndex = json.IndexOf(tagNameKey);
int versionStart = tagNameIndex + tagNameKey.Length + 1;
int versionEnd = json.IndexOf("\"", versionStart);
remoteTag = json.Substring(versionStart, versionEnd - versionStart);
return string.CompareOrdinal(remoteTag, currentTag) > 0;
}
catch
{
return false;
}
}
}
private void showUpdateNotice()
{
DialogResult confirmResult = MessageBox.Show($"There is a newer version of the installer available ({remoteTag}). Would you like to download it now?", "Update Available!", MessageBoxButtons.YesNo);
if (confirmResult == DialogResult.Yes)
{
Utilities.OpenProcess($"https://github.com/rauenzi/BBDInstaller/releases/download/{remoteTag}/BandagedBD.exe");
Application.Exit();
}
else
{
Application.Exit();
}
}
private void FormMain_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -35,7 +35,7 @@
//
// cbShouldRestart
//
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.None;
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbShouldRestart.AutoSize = true;
this.cbShouldRestart.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbShouldRestart.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
@ -44,7 +44,7 @@
this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent;
this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbShouldRestart.Location = new System.Drawing.Point(9, 196);
this.cbShouldRestart.Location = new System.Drawing.Point(10, 212);
this.cbShouldRestart.Name = "cbShouldRestart";
this.cbShouldRestart.Size = new System.Drawing.Size(162, 17);
this.cbShouldRestart.TabIndex = 5;
@ -53,19 +53,21 @@
//
// discordLocator
//
this.discordLocator.Anchor = System.Windows.Forms.AnchorStyles.None;
this.discordLocator.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.discordLocator.BackColor = System.Drawing.Color.Transparent;
this.discordLocator.Location = new System.Drawing.Point(0, 3);
this.discordLocator.Name = "discordLocator";
this.discordLocator.Size = new System.Drawing.Size(662, 161);
this.discordLocator.Size = new System.Drawing.Size(662, 176);
this.discordLocator.TabIndex = 6;
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.label1.AutoSize = true;
this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.label1.Location = new System.Drawing.Point(6, 170);
this.label1.Location = new System.Drawing.Point(7, 186);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(95, 13);
this.label1.TabIndex = 8;
@ -75,12 +77,15 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.label1);
this.Controls.Add(this.cbShouldRestart);
this.Controls.Add(this.discordLocator);
this.Name = "InstallConfigPanel";
this.Size = new System.Drawing.Size(662, 284);
this.Size = new System.Drawing.Size(665, 284);
this.Load += new System.EventHandler(this.InstallConfigPanel_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -37,5 +37,9 @@ namespace BandagedBD.Panels {
if (discordLocator.stable || discordLocator.canary || discordLocator.ptb) Window.btnNext.ShowEnable("Install");
else Window.btnNext.ShowDisable("Install");
}
private void InstallConfigPanel_Load(object sender, EventArgs e) {
}
}
}

View File

@ -19,7 +19,6 @@ namespace BandagedBD.Panels {
private InstallConfigPanel config => (InstallConfigPanel) Window.GetPanel(PanelTypes.InstallConfig);
private WebHeaderCollection Headers = new WebHeaderCollection { ["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" };
private readonly SynchronizationContext _synchronizationContext;
private int progressChunk => 100 / config.paths.Length;
private int iteration = 0;
@ -76,7 +75,7 @@ namespace BandagedBD.Panels {
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
using (var wc = new TimedWebClient { Headers = this.Headers }) {
using (var wc = new TimedWebClient()) {
wc.DownloadProgressChanged += (sender, args) => {
setProgress(args.ProgressPercentage / 2);
};
@ -167,7 +166,7 @@ namespace BandagedBD.Panels {
return 0;
}
var injectorFiles = new[] { "index.js", "config.json", "package.json", "betterdiscord\\index.js", "betterdiscord\\config.json", "betterdiscord\\utils.js" };
var injectorFiles = new[] { "index.js", "package.json", "betterdiscord\\index.js", "betterdiscord\\preload.js", "betterdiscord\\config.json", "betterdiscord\\logger.js" };
foreach (var bdFile in injectorFiles) {
if (File.Exists($"{appFolder}\\{bdFile}")) {

View File

@ -46,7 +46,7 @@
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.label2.Location = new System.Drawing.Point(6, 197);
this.label2.Location = new System.Drawing.Point(6, 212);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(292, 13);
this.label2.TabIndex = 25;
@ -56,9 +56,11 @@
//
this.cbBootLoop.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbBootLoop.AutoSize = true;
this.cbBootLoop.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbBootLoop.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbBootLoop.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbBootLoop.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbBootLoop.Location = new System.Drawing.Point(120, 223);
this.cbBootLoop.Location = new System.Drawing.Point(120, 238);
this.cbBootLoop.Name = "cbBootLoop";
this.cbBootLoop.Size = new System.Drawing.Size(121, 17);
this.cbBootLoop.TabIndex = 26;
@ -69,9 +71,11 @@
//
this.cbInfinite.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbInfinite.AutoSize = true;
this.cbInfinite.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbInfinite.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbInfinite.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbInfinite.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbInfinite.Location = new System.Drawing.Point(120, 257);
this.cbInfinite.Location = new System.Drawing.Point(120, 272);
this.cbInfinite.Name = "cbInfinite";
this.cbInfinite.Size = new System.Drawing.Size(167, 17);
this.cbInfinite.TabIndex = 27;
@ -82,9 +86,11 @@
//
this.cbError.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbError.AutoSize = true;
this.cbError.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbError.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbError.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbError.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbError.Location = new System.Drawing.Point(358, 257);
this.cbError.Location = new System.Drawing.Point(358, 272);
this.cbError.Name = "cbError";
this.cbError.Size = new System.Drawing.Size(176, 17);
this.cbError.TabIndex = 28;
@ -95,9 +101,11 @@
//
this.cbUninjected.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbUninjected.AutoSize = true;
this.cbUninjected.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbUninjected.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbUninjected.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbUninjected.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbUninjected.Location = new System.Drawing.Point(358, 223);
this.cbUninjected.Location = new System.Drawing.Point(358, 238);
this.cbUninjected.Name = "cbUninjected";
this.cbUninjected.Size = new System.Drawing.Size(218, 17);
this.cbUninjected.TabIndex = 29;
@ -106,11 +114,13 @@
//
// discordLocator
//
this.discordLocator.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.discordLocator.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.discordLocator.BackColor = System.Drawing.Color.Transparent;
this.discordLocator.Location = new System.Drawing.Point(0, 2);
this.discordLocator.Name = "discordLocator";
this.discordLocator.Size = new System.Drawing.Size(662, 161);
this.discordLocator.Size = new System.Drawing.Size(662, 175);
this.discordLocator.TabIndex = 30;
//
// label1
@ -119,7 +129,7 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.label1.Location = new System.Drawing.Point(179, 308);
this.label1.Location = new System.Drawing.Point(141, 307);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(144, 13);
this.label1.TabIndex = 31;
@ -134,7 +144,7 @@
this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.linkLabel1.LinkColor = global::BandagedBD.Properties.Settings.Default.Accent;
this.linkLabel1.Location = new System.Drawing.Point(322, 308);
this.linkLabel1.Location = new System.Drawing.Point(328, 307);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(114, 13);
this.linkLabel1.TabIndex = 32;
@ -145,10 +155,10 @@
//
// label3
//
this.label3.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label3.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.label3.AutoSize = true;
this.label3.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.label3.Location = new System.Drawing.Point(6, 169);
this.label3.Location = new System.Drawing.Point(6, 184);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(95, 13);
this.label3.TabIndex = 34;
@ -156,14 +166,16 @@
//
// cbShouldRestart
//
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.None;
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbShouldRestart.AutoSize = true;
this.cbShouldRestart.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbShouldRestart.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbShouldRestart.Checked = true;
this.cbShouldRestart.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent;
this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbShouldRestart.Location = new System.Drawing.Point(120, 168);
this.cbShouldRestart.Location = new System.Drawing.Point(120, 183);
this.cbShouldRestart.Name = "cbShouldRestart";
this.cbShouldRestart.Size = new System.Drawing.Size(162, 17);
this.cbShouldRestart.TabIndex = 33;

View File

@ -52,5 +52,6 @@ namespace BandagedBD.Panels {
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Utilities.OpenProcess("https://0x71.cc/bd/troubleshoot/");
}
}
}

View File

@ -36,12 +36,14 @@
//
// userData
//
this.userData.Anchor = System.Windows.Forms.AnchorStyles.None;
this.userData.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.userData.AutoSize = true;
this.userData.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.userData.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.userData.Cursor = System.Windows.Forms.Cursors.Hand;
this.userData.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent;
this.userData.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.userData.Location = new System.Drawing.Point(9, 196);
this.userData.Location = new System.Drawing.Point(9, 209);
this.userData.Name = "userData";
this.userData.Size = new System.Drawing.Size(170, 17);
this.userData.TabIndex = 5;
@ -50,10 +52,10 @@
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.label1.AutoSize = true;
this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.label1.Location = new System.Drawing.Point(6, 170);
this.label1.Location = new System.Drawing.Point(6, 183);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(95, 13);
this.label1.TabIndex = 7;
@ -61,14 +63,16 @@
//
// cbShouldRestart
//
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.None;
this.cbShouldRestart.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbShouldRestart.AutoSize = true;
this.cbShouldRestart.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.cbShouldRestart.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229)))));
this.cbShouldRestart.Checked = true;
this.cbShouldRestart.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent;
this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor;
this.cbShouldRestart.Location = new System.Drawing.Point(9, 219);
this.cbShouldRestart.Location = new System.Drawing.Point(9, 232);
this.cbShouldRestart.Name = "cbShouldRestart";
this.cbShouldRestart.Size = new System.Drawing.Size(162, 17);
this.cbShouldRestart.TabIndex = 34;
@ -77,11 +81,13 @@
//
// discordLocator
//
this.discordLocator.Anchor = System.Windows.Forms.AnchorStyles.None;
this.discordLocator.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.discordLocator.BackColor = System.Drawing.Color.Transparent;
this.discordLocator.Location = new System.Drawing.Point(0, 3);
this.discordLocator.Name = "discordLocator";
this.discordLocator.Size = new System.Drawing.Size(662, 161);
this.discordLocator.Size = new System.Drawing.Size(662, 177);
this.discordLocator.TabIndex = 6;
//
// UninstallConfigPanel

View File

@ -43,5 +43,6 @@ namespace BandagedBD.Panels {
if (discordLocator.stable || discordLocator.canary || discordLocator.ptb) Window.btnNext.ShowEnable("Uninstall");
else Window.btnNext.ShowDisable("Uninstall");
}
}
}

View File

@ -101,11 +101,11 @@ namespace BandagedBD.Properties {
}
/// <summary>
/// Looks up a localized string similar to Copyright (c) 2015 - Present Jiiks | 2017 - Present Zerebos
/// Looks up a localized string similar to Copyright (c) 2017 - Present Zerebos
///
///Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
///
///The above cop [rest of string was truncated]&quot;;.
///The above copyright notice and this [rest of string was truncated]&quot;;.
/// </summary>
internal static string License {
get {
@ -114,7 +114,7 @@ namespace BandagedBD.Properties {
}
/// <summary>
/// Looks up a localized string similar to 1.0.2.
/// Looks up a localized string similar to 1.0.5.
/// </summary>
internal static string Version {
get {

View File

@ -195,7 +195,7 @@
</value>
</data>
<data name="License" xml:space="preserve">
<value>Copyright (c) 2015 - Present Jiiks | 2017 - Present Zerebos
<value>Copyright (c) 2017 - Present Zerebos
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@ -204,7 +204,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</value>
</data>
<data name="Version" xml:space="preserve">
<value>1.0.2</value>
<value>1.0.5</value>
</data>
<data name="BBDVS" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -15,18 +15,19 @@ namespace BandagedBD {
public static readonly Regex _matcher = new Regex(@"[0-9]+\.[0-9]+\.[0-9]+");
public static string LADPath(string append) => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\{append}";
public static string PDPath(string append) => $"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\{Environment.UserName}\\{append}";
public static string EXEPath(string exe) => exe == string.Empty ? exe : Path.GetFullPath(Path.Combine(exe, "..\\.."));
public static string StablePath => LADPath("Discord");
public static string StablePathPD => PDPath("Discord");
public static string StablePathEXE => GetProcess("Discord");
public static string StablePathEXE => EXEPath(GetProcess("Discord"));
public static string CanaryPath => LADPath("DiscordCanary");
public static string CanaryPathPD => PDPath("DiscordCanary");
public static string CanaryPathEXE => GetProcess("DiscordCanary");
public static string CanaryPathEXE => EXEPath(GetProcess("DiscordCanary"));
public static string PtbPath => LADPath("DiscordPTB");
public static string PtbPathPD => PDPath("DiscordPTB");
public static string PtbPathEXE => GetProcess("DiscordPTB");
public static string PtbPathEXE => EXEPath(GetProcess("DiscordPTB"));
public static string CurrentStablePath = Directory.Exists(StablePathEXE) ? StablePathEXE : Directory.Exists(StablePathPD) ? StablePathPD : Directory.Exists(StablePath) ? StablePath : null;
public static string CurrentCanaryPath = Directory.Exists(CanaryPathEXE) ? CanaryPathEXE : Directory.Exists(CanaryPathPD) ? CanaryPathPD : Directory.Exists(CanaryPath) ? CanaryPath : null;
@ -173,6 +174,10 @@ namespace BandagedBD {
}
public class TimedWebClient : WebClient {
public WebHeaderCollection DefaultHeaders = new WebHeaderCollection { ["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" };
public TimedWebClient() {
Headers = DefaultHeaders;
}
protected override WebRequest GetWebRequest(Uri uri) {
WebRequest w = base.GetWebRequest(uri);
w.Timeout = 5 * 60 * 1000;

View File

@ -1,3 +1,5 @@
# This repo has been archived and is no longer active. If you are looking to install BetterDiscord. Please use the new installers found here: https://github.com/BetterDiscord/Installer
# BandagedBD Installer
This is the source for the Windows installer of [BandagedBD](https://github.com/rauenzi/BetterDiscordApp), a mod for Discord. I decided to put this in a separate repo mainly because it didn't feel quite right to have it in with the actual application itself as the application is JavaScript injection onto an Electron.js platform, and this is an actual executable that only sets ups files for it.
@ -58,4 +60,4 @@ The native checkbox leaves a lot to be desired in terms of extensibility and cus
### FlatProgressBar
Similar to the checkbox the native progressbar has little to no customization options. This paints a flat checkbox using the an offscreen image as adapted from this [StackOverflow answer](https://stackoverflow.com/a/7490884).
Similar to the checkbox the native progressbar has little to no customization options. This paints a flat checkbox using the an offscreen image as adapted from this [StackOverflow answer](https://stackoverflow.com/a/7490884).