Skip to content

Commit 5bba294

Browse files
committed
v2.0.4 RC1
1 parent 1f2ecef commit 5bba294

File tree

2 files changed

+56
-35
lines changed

2 files changed

+56
-35
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ You can download the latest version of the patcher from the [Releases Page](http
1515
>`/usr/sbin/softwareupdate --install-rosetta --agree-to-license`
1616
1717
### Features
18-
* Works with **Wii Room**, **Digicam Print Channel**, **Food Channel**, and more!
18+
* Patches WiiConnect24-based channels to work with WiiLink!
19+
* Works with **Wii Room**, **Photo Prints Channel**, **Food Channel**, and more!
1920
* The patcher will automatically download the required files.
20-
* Copying patched files to an SD Card that is already connected to the PC.
21-
* Downloads **Wii Mod Lite** and putting it on SD Card along with the WADs.
21+
* Copies patched files to an SD Card that is already connected to the PC.
22+
* Downloads **YAWM ModMii Edition (yawmME)** and puts it on the SD Card along with the WADs.
2223
* You can get **Food Channel (Domino's)**, along with the **Get Console ID** homebrew app for easy console ID registration on our [Discord server](https://discord.gg/wiilink), for ***free***!
2324

2425
>(**Food Channel (Domino's)** is only available in the US and Canada!)

WiiLink-Patcher-CLI/WiiLink_Patcher.cs

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class WiiLink_Patcher
1616
//// Build Info ////
1717
static readonly string version = "v2.0.4";
1818
static readonly string copyrightYear = DateTime.Now.Year.ToString();
19-
static readonly string buildDate = "October 11th, 2024";
20-
static readonly string buildTime = "3:24 PM";
19+
static readonly string buildDate = "November 25th, 2024";
20+
static readonly string buildTime = "4:45 PM";
2121
static string? sdcard = DetectRemovableDrive;
2222
static readonly string wiiLinkPatcherUrl = "https://patcher.wiilink24.com";
2323
////////////////////
@@ -61,7 +61,7 @@ enum Platform : int { Wii, vWii, Dolphin }
6161
static int console_height = 0;
6262

6363
// HttpClient
64-
static readonly HttpClient httpClient = new() { Timeout = TimeSpan.FromSeconds(30) };
64+
static readonly HttpClient httpClient = new() { Timeout = TimeSpan.FromMinutes(1) };
6565
////////////////////
6666

6767
static void PrintHeader()
@@ -364,10 +364,12 @@ static public void DownloadOSCApp(string appName)
364364
/// </summary>
365365
static public void DownloadAGC()
366366
{
367-
if (platformType != Platform.Dolphin) {
367+
if (platformType != Platform.Dolphin)
368+
{
368369
DownloadOSCApp("AnyGlobe_Changer");
369370
}
370-
else if (!Directory.Exists("./apps/AnyGlobe Changer")) {
371+
else if (!Directory.Exists("./apps/AnyGlobe Changer"))
372+
{
371373
task = $"Downloading AnyGlobe_Changer";
372374
string appPath = Path.Join(tempDir, "AGC");
373375
Directory.CreateDirectory(appPath);
@@ -388,6 +390,7 @@ static void DownloadFile(string URL, string dest, string name, bool noError = fa
388390
{
389391
task = $"Downloading {name}";
390392
curCmd = $"DownloadFile({URL}, {dest}, {name})";
393+
391394
if (DEBUG_MODE)
392395
AnsiConsole.MarkupLine($"[springgreen2_1]Downloading [bold]{name}[/] from [bold]{URL}[/] to [bold]{dest}[/][/]...");
393396

@@ -409,19 +412,25 @@ static void DownloadFile(string URL, string dest, string name, bool noError = fa
409412
ErrorScreen(statusCode, $"Failed to download [bold]{name}[/] from [bold]{URL}[/] to [bold]{dest}[/]");
410413
}
411414
}
412-
catch (Exception e)
415+
// Timeout exception
416+
catch (TaskCanceledException)
417+
{
418+
if (!noError)
419+
{
420+
AnsiConsole.MarkupLine($"[bold red]ERROR:[/] Failed to download [bold]{name}[/] from [bold]{URL}[/] to [bold]{dest}[/]: Request timed out (1 minute)");
421+
AnsiConsole.MarkupLine("Press any key to try again...");
422+
Console.ReadKey(true);
423+
DownloadFile(URL, dest, name);
424+
}
425+
}
426+
catch (HttpRequestException e)
413427
{
414428
if (!noError)
415429
{
416430
AnsiConsole.MarkupLine($"[bold red]ERROR:[/] {e.Message}");
417-
// If the exception is a WebException, display the status code of the response.
418-
if (e is WebException we && we.Response is HttpWebResponse response)
419-
{
420-
int statusCode = (int)response.StatusCode;
421-
AnsiConsole.MarkupLine($"Status code: {statusCode}");
422-
}
423431
AnsiConsole.MarkupLine("Press any key to try again...");
424432
Console.ReadKey(true);
433+
DownloadFile(URL, dest, name);
425434
}
426435
}
427436
}
@@ -1234,8 +1243,8 @@ static void ChoosePlatform()
12341243
break;
12351244
case 3:
12361245
platformType = Platform.Dolphin;
1237-
sdcard = null;
1238-
WADFolderCheck(false);
1246+
sdcard = null;
1247+
WADFolderCheck(false);
12391248
break;
12401249
case 4: // Go back to main menu
12411250
MainMenu();
@@ -2091,12 +2100,14 @@ static void DownloadAllPatches()
20912100
DownloadPatch("ktv", $"ktv_2.delta", "KirbyTV_2.delta", "Kirby TV Channel");
20922101
}
20932102

2094-
if (platformType != Platform.Dolphin) {
2103+
if (platformType != Platform.Dolphin)
2104+
{
20952105
// Download yawmME from OSC for installing WADs on the Wii
20962106
DownloadOSCApp("yawmME");
20972107
}
20982108

2099-
if (platformType == Platform.Wii) {
2109+
if (platformType == Platform.Wii)
2110+
{
21002111
// Download sntp from OSC for Syncing the Clock on the Wii
21012112
DownloadOSCApp("sntp");
21022113
}
@@ -2123,7 +2134,8 @@ static void DownloadAllPatches()
21232134
DownloadPatch("cmoc", $"CMOC_1_{wc24_reg}.delta", $"CMOC_1_{wc24_reg}.delta", "Check Mii Out Channel");
21242135

21252136
// Download ww-43db-patcher for vWii if applicable
2126-
if (platformType == Platform.vWii) {
2137+
if (platformType == Platform.vWii)
2138+
{
21272139
// DownloadOSCApp("ww-43db-patcher");
21282140

21292141
// Also download EULA for each region for vWii users
@@ -2139,8 +2151,9 @@ static void DownloadAllPatches()
21392151

21402152
}
21412153

2142-
if (platformType != Platform.Dolphin) {
2143-
// Install the RC24 Mail Patcher
2154+
if (platformType != Platform.Dolphin)
2155+
{
2156+
// Install the RC24 Mail Patcher
21442157
DownloadOSCApp("Mail-Patcher");
21452158
}
21462159

@@ -2568,11 +2581,11 @@ static void CustomInstall_SummaryScreen(bool showSPD = false)
25682581
grid.AddRow($"[bold deepskyblue1]{wiiConnect24Channels}[/]", $"[bold springgreen2_1]{regionalChannels}[/]", $"[bold]{consoleVersion}[/]");
25692582

25702583
if (platformType_custom == Platform.Wii)
2571-
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels),"● [bold]Wii[/]");
2584+
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels), "● [bold]Wii[/]");
25722585
else if (platformType_custom == Platform.vWii)
2573-
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels),"● [bold]vWii (Wii U)[/]");
2586+
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels), "● [bold]vWii (Wii U)[/]");
25742587
else
2575-
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels),"● [bold]Dolphin Emulator[/]");
2588+
grid.AddRow(string.Join("\n", selectedWiiConnect24Channels), string.Join("\n", selectedRegionalChannels), "● [bold]Dolphin Emulator[/]");
25762589

25772590
AnsiConsole.Write(grid);
25782591

@@ -2623,11 +2636,13 @@ static void CustomInstall_SummaryScreen(bool showSPD = false)
26232636
switch (choice)
26242637
{
26252638
case 1: // Yes
2626-
if (platformType_custom != Platform.Dolphin){
2639+
if (platformType_custom != Platform.Dolphin)
2640+
{
26272641
SDSetup(isCustomSetup: true);
26282642
break;
26292643
}
2630-
else {
2644+
else
2645+
{
26312646
sdcard = null;
26322647
WADFolderCheck(true);
26332648
break;
@@ -2838,15 +2853,16 @@ static void DownloadCustomPatches(List<string> channelSelection)
28382853
}
28392854
}
28402855

2841-
if (platformType_custom != Platform.Dolphin) {
2842-
// Downloading yawmME from OSC
2856+
if (platformType_custom != Platform.Dolphin)
2857+
{
2858+
// Downloading yawmME from OSC
28432859
DownloadOSCApp("yawmME");
2844-
// Install the RC24 Mail Patcher
2860+
// Install the RC24 Mail Patcher
28452861
DownloadOSCApp("Mail-Patcher");
28462862
}
28472863

28482864
if (platformType_custom == Platform.Wii)
2849-
// Downloading sntp from OSC
2865+
// Downloading sntp from OSC
28502866
DownloadOSCApp("sntp");
28512867
}
28522868

@@ -3217,7 +3233,8 @@ static void Finished()
32173233
}
32183234
else
32193235
{
3220-
if (platformType != Platform.Dolphin) {
3236+
if (platformType != Platform.Dolphin)
3237+
{
32213238
// Please connect text
32223239
string connectDrive = patcherLang == PatcherLanguage.en
32233240
? "Please connect your Wii SD Card / USB Drive and copy the [u]WAD[/] and [u]apps[/] folders to the root (main folder) of your SD Card / USB Drive."
@@ -3234,19 +3251,22 @@ static void Finished()
32343251
}
32353252

32363253
// Please proceed text
3237-
if ( platformType == Platform.Wii ) {
3254+
if (platformType == Platform.Wii)
3255+
{
32383256
string pleaseProceed = patcherLang == PatcherLanguage.en
32393257
? "Please proceed with the tutorial that you can find on [bold springgreen2_1 link]https://www.wiilink24.com/guide/wii/#section-ii---installing-wads-and-patching-wii-mail[/]"
32403258
: $"{localizedText?["Finished"]?["pleaseProceed"]}";
32413259
AnsiConsole.MarkupLine($"{pleaseProceed}\n");
32423260
}
3243-
else if ( platformType == Platform.vWii ) {
3261+
else if (platformType == Platform.vWii)
3262+
{
32443263
string pleaseProceed = patcherLang == PatcherLanguage.en
32453264
? "Please proceed with the tutorial that you can find on [bold springgreen2_1 link]https://www.wiilink24.com/guide/vwii/#section-iii---installing-wads-and-patching-wii-mail[/]"
32463265
: $"{localizedText?["Finished"]?["pleaseProceed"]}";
32473266
AnsiConsole.MarkupLine($"{pleaseProceed}\n");
32483267
}
3249-
else {
3268+
else
3269+
{
32503270
string pleaseProceed = patcherLang == PatcherLanguage.en
32513271
? "Please proceed with the tutorial that you can find on [bold springgreen2_1 link]https://www.wiilink24.com/guide/dolphin/#section-ii---installing-wads[/]"
32523272
: $"{localizedText?["Finished"]?["pleaseProceed"]}";

0 commit comments

Comments
 (0)