Skip to content

Commit a5b5e62

Browse files
committed
Migrated update servers to Big Endian 32 repository
1 parent 1f984fe commit a5b5e62

5 files changed

Lines changed: 38 additions & 89 deletions

File tree

Sonic-06-Mod-Manager/Properties/Resources.Designer.cs

Lines changed: 3 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sonic-06-Mod-Manager/Properties/Resources.resx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@
125125
<value>..\res\Images\Cancel_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126126
</data>
127127
<data name="ChangelogsURI_GitHub" xml:space="preserve">
128-
<value>https://raw.githubusercontent.com/HyperBE32/Unify-Networking/master/Sonic_06_Mod_Manager/rush/changelogs.txt</value>
129-
</data>
130-
<data name="ChangelogsURI_SEGACarnival" xml:space="preserve">
131-
<value>https://www.segacarnival.com/hyper/updates/sonic-06-mod-manager/rush/changelogs.txt</value>
128+
<value>https://raw.githubusercontent.com/Big-Endian-32/Networking/main/Sonic%20'06%20Mod%20Manager/Changelogs.txt</value>
132129
</data>
133130
<data name="CheckBox_16x_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
134131
<value>..\res\images\checkbox_16x_24.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -149,10 +146,7 @@
149146
<value>..\res\images\corner_logo_colour.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
150147
</data>
151148
<data name="DataURI_GitHub" xml:space="preserve">
152-
<value>https://raw.githubusercontent.com/HyperBE32/Unify-Networking/master/Sonic_06_Mod_Manager/rush/latest.zip</value>
153-
</data>
154-
<data name="DataURI_SEGACarnival" xml:space="preserve">
155-
<value>https://www.segacarnival.com/hyper/updates/sonic-06-mod-manager/rush/latest.zip</value>
149+
<value>https://raw.githubusercontent.com/Big-Endian-32/Networking/main/Sonic%20'06%20Mod%20Manager/Release.zip</value>
156150
</data>
157151
<data name="debug_6" type="System.Resources.ResXFileRef, System.Windows.Forms">
158152
<value>..\res\images\debug 6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -253,10 +247,7 @@ Please whitelist the following directory in your antivirus software and restart
253247
<value>..\res\images\update 4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
254248
</data>
255249
<data name="VersionURI_GitHub" xml:space="preserve">
256-
<value>https://raw.githubusercontent.com/HyperBE32/Unify-Networking/master/Sonic_06_Mod_Manager/rush/latest.txt</value>
257-
</data>
258-
<data name="VersionURI_SEGACarnival" xml:space="preserve">
259-
<value>https://www.segacarnival.com/hyper/updates/sonic-06-mod-manager/rush/latest.txt</value>
250+
<value>https://raw.githubusercontent.com/Big-Endian-32/Networking/main/Sonic%20'06%20Mod%20Manager/Version.txt</value>
260251
</data>
261252
<data name="vsh_curves" type="System.Resources.ResXFileRef, System.Windows.Forms">
262253
<value>..\res\applications\data\vsh_curves;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>

Sonic-06-Mod-Manager/src/Environment3/RushInterface.Designer.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sonic-06-Mod-Manager/src/Environment3/RushInterface.cs

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public partial class RushInterface : UserControl
4949
{
5050
private bool _isPathInvalid = false;
5151
private static string protocol = "sonic06mm";
52-
private bool _useBackupServer = false;
5352

5453
public RushInterface() {
5554
InitializeComponent(); // Designer support
@@ -238,7 +237,7 @@ private void LoadSettings()
238237

239238
if (CheckBox_CheckUpdatesOnLaunch.Checked = Properties.Settings.Default.General_CheckUpdatesOnLaunch) {
240239
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
241-
CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub);
240+
CheckForUpdates();
242241
}
243242

244243
if (CheckBox_SaveFileRedirection.Checked = Properties.Settings.Default.General_SaveFileRedirection) {
@@ -448,14 +447,14 @@ private void SectionButton_DeselectAll() {
448447
/// <summary>
449448
/// Pings the update servers to check for a new version.
450449
/// </summary>
451-
private async void CheckForUpdates(string versionURI, string changelogsURI) {
450+
private async void CheckForUpdates() {
452451
// Block controls
453452
SectionButton_CheckForSoftwareUpdates.Enabled = false;
454453

455454
try {
456455
if (Client.CheckNetworkConnection().Result) {
457-
string latestVersion = await Client.RequestString(versionURI), // Request version number
458-
changelogs = await Client.RequestString(changelogsURI); // Request changelogs
456+
string latestVersion = await Client.RequestString(Properties.Resources.VersionURI_GitHub), // Request version number
457+
changelogs = await Client.RequestString(Properties.Resources.ChangelogsURI_GitHub); // Request changelogs
459458

460459
// New update available!
461460
if (Program.VersionNumber != latestVersion && latestVersion.StartsWith("Version"))
@@ -469,27 +468,17 @@ private async void CheckForUpdates(string versionURI, string changelogsURI) {
469468
throw new WebException("Invalid version number - server might be down...");
470469
} else
471470
throw new WebException("Could not establish a connection...");
472-
} catch {
473-
try {
474-
// Check for updates via SEGA Carnival
475-
if (Client.CheckNetworkConnection().Result) {
476-
CheckForUpdates(Properties.Resources.VersionURI_SEGACarnival, Properties.Resources.ChangelogsURI_SEGACarnival);
477-
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
478-
_useBackupServer = true;
479-
} else
480-
throw new WebException("Could not establish a connection...");
481-
} catch (Exception ex) {
482-
Label_UpdaterStatus.Text = "Connection error";
483-
PictureBox_UpdaterIcon.BackgroundImage = Properties.Resources.Exception_Logo;
471+
} catch (Exception ex) {
472+
Label_UpdaterStatus.Text = "Connection error";
473+
PictureBox_UpdaterIcon.BackgroundImage = Properties.Resources.Exception_Logo;
484474

485-
// Reset update button for future checking
486-
SectionButton_CheckForSoftwareUpdates.SectionText = "Check for software updates";
487-
SectionButton_CheckForSoftwareUpdates.Refresh();
475+
// Reset update button for future checking
476+
SectionButton_CheckForSoftwareUpdates.SectionText = "Check for software updates";
477+
SectionButton_CheckForSoftwareUpdates.Refresh();
488478

489-
// Write exception to logs
490-
RichTextBox_Changelogs.Text = $"Failed to request changelogs...\n\n{ex}";
491-
Console.WriteLine($"[{DateTime.Now:HH:mm:ss tt}] [Error] Failed to request changelogs...\n{ex}");
492-
}
479+
// Write exception to logs
480+
RichTextBox_Changelogs.Text = $"Failed to request changelogs...\n\n{ex}";
481+
Console.WriteLine($"[{DateTime.Now:HH:mm:ss tt}] [Error] Failed to request changelogs...\n{ex}");
493482
}
494483

495484
// Feedback
@@ -1325,7 +1314,7 @@ private void LinkLabel_Reset_LinkClicked(object sender, LinkLabelLinkClickedEven
13251314
/// <summary>
13261315
/// Update Sonic '06 Mod Manager via requested server.
13271316
/// </summary>
1328-
private void UpdateVersion(bool useBackupServer) {
1317+
private void UpdateVersion() {
13291318
// Set controls enabled and visibility state
13301319
SectionButton_CheckForSoftwareUpdates.Visible = CheckBox_CheckUpdatesOnLaunch.Enabled = false;
13311320
TabControl_Rush.SelectedTab.VerticalScroll.Value = 0;
@@ -1334,7 +1323,6 @@ private void UpdateVersion(bool useBackupServer) {
13341323
try {
13351324
// If SEGA Carnival is offline, use GitHub
13361325
Uri serverUri = new Uri(Properties.Resources.DataURI_GitHub);
1337-
if (useBackupServer) serverUri = new Uri(Properties.Resources.DataURI_SEGACarnival);
13381326

13391327
using (WebClient client = new WebClient()) {
13401328
client.DownloadProgressChanged += (s, clientEventArgs) => { ProgressBar_SoftwareUpdate.Value = clientEventArgs.ProgressPercentage; };
@@ -1431,9 +1419,9 @@ private async void SectionButton_Updates_Click(object sender, EventArgs e) {
14311419
// Check for software updates is clicked
14321420
if (sender == SectionButton_CheckForSoftwareUpdates) {
14331421
// Check for updates via GitHub
1434-
CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub);
1422+
CheckForUpdates();
14351423
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
1436-
if (((SectionButton)sender).SectionText == "Fetch the latest version") UpdateVersion(_useBackupServer); // Update if prompted
1424+
if (((SectionButton)sender).SectionText == "Fetch the latest version") UpdateVersion(); // Update if prompted
14371425
Properties.Settings.Default.Save();
14381426

14391427
// Check for mod updates is clicked
@@ -1645,7 +1633,7 @@ private void LinkLabel_1ClickURLHandler_LinkClicked(object sender, LinkLabelLink
16451633
sonic06mmKey = Registry.CurrentUser.OpenSubKey($"Software\\Classes\\{protocol}", true);
16461634
if (sonic06mmKey == null)
16471635
sonic06mmKey = Registry.CurrentUser.CreateSubKey($"Software\\Classes\\{protocol}");
1648-
sonic06mmKey.SetValue(string.Empty, "URL:Sonic '06 Mod Manager");
1636+
sonic06mmKey.SetValue(string.Empty, "Sonic '06 Mod Manager");
16491637
sonic06mmKey.SetValue("URL Protocol", string.Empty);
16501638
RegistryKey prevkey = sonic06mmKey;
16511639
sonic06mmKey = sonic06mmKey.OpenSubKey("shell", true);

Sonic-06-Mod-Manager/src/Environment3/RushInterface.resx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,19 @@
123123
<metadata name="ToolTip_Information.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124124
<value>444, 17</value>
125125
</metadata>
126-
<metadata name="ToolTip_Information.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127-
<value>444, 17</value>
128-
</metadata>
129126
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
127+
<data name="SectionButton_RefreshMods.SectionImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
128+
<value>
129+
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
130+
xAAADsQBlSsOGwAAAX9JREFUOE+Fkk9qwkAUxtMDVLoptSfoCVwUunIREjyCSW8QvYogbixdFEIpWbjw
131+
AOLWS0QaEjeudZHN9P3GN6loSh98OPP9m0mMdzwezT+483Rkfa/L38HU7/dbsd/vmwL57QgKwZfg1oYZ
132+
2bSGwUXB23K5NIvFAm7TlFCAMcuyPwsE/m63M4PBwPJa8ukKgrIsTRiGVpzNZm0FL4fDoXBaEAQmz3O0
133+
Zwrep9OpFUajkRHjVYEe1BWtTJLEapPJBO0DIY/j2JKr1QqytYCR9SsetOFwiFZAGt/3LVlVlS0gCLjN
134+
RcEjHncAXsjaFfCiZP9E6Aw3msfbxYOXjOxryG0URZZcr9eQsfqvBg0PXjJkIefuJY7HY679LdyDZpqB
135+
Q8ODlwxZhF5RFPavcYKWxIKuIoZzB+ElQ9a1p3xliO4mXJXnBazdyQAvGRtmZMN3vkFwN2kDmob5lDsa
136+
P42WpFyNq/KSeNOANZxeO70Kn4+IPcFcsBXUCtZwp2duxvN+AFwMV+KqpemtAAAAAElFTkSuQmCC
137+
</value>
138+
</data>
130139
<data name="Button_Open_SaveData.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
131140
<value>
132141
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1
@@ -265,18 +274,6 @@
265274
RcEjHncAXsjaFfCiZP9E6Aw3msfbxYOXjOxryG0URZZcr9eQsfqvBg0PXjJkIefuJY7HY679LdyDZpqB
266275
Q8ODlwxZhF5RFPavcYKWxIKuIoZzB+ElQ9a1p3xliO4mXJXnBazdyQAvGRtmZMN3vkFwN2kDmob5lDsa
267276
P42WpFyNq/KSeNOANZxeO70Kn4+IPcFcsBXUCtZwp2duxvN+AFwMV+KqpemtAAAAAElFTkSuQmCC
268-
</value>
269-
</data>
270-
<data name="SectionButton_RefreshMods.SectionImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
271-
<value>
272-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
273-
xAAADsQBlSsOGwAAAX9JREFUOE+Fkk9qwkAUxtMDVLoptSfoCVwUunIREjyCSW8QvYogbixdFEIpWbjw
274-
AOLWS0QaEjeudZHN9P3GN6loSh98OPP9m0mMdzwezT+483Rkfa/L38HU7/dbsd/vmwL57QgKwZfg1oYZ
275-
2bSGwUXB23K5NIvFAm7TlFCAMcuyPwsE/m63M4PBwPJa8ukKgrIsTRiGVpzNZm0FL4fDoXBaEAQmz3O0
276-
Zwrep9OpFUajkRHjVYEe1BWtTJLEapPJBO0DIY/j2JKr1QqytYCR9SsetOFwiFZAGt/3LVlVlS0gCLjN
277-
RcEjHncAXsjaFfCiZP9E6Aw3msfbxYOXjOxryG0URZZcr9eQsfqvBg0PXjJkIefuJY7HY679LdyDZpqB
278-
Q8ODlwxZhF5RFPavcYKWxIKuIoZzB+ElQ9a1p3xliO4mXJXnBazdyQAvGRtmZMN3vkFwN2kDmob5lDsa
279-
P42WpFyNq/KSeNOANZxeO70Kn4+IPcFcsBXUCtZwp2duxvN+AFwMV+KqpemtAAAAAElFTkSuQmCC
280277
</value>
281278
</data>
282279
<data name="SectionButton_ClearLog.SectionImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

0 commit comments

Comments
 (0)