Skip to content

Commit 9b96d92

Browse files
committed
Function to download WiiLink Account Linker
1 parent dc55824 commit 9b96d92

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

WiiLink-Patcher-CLI/WiiLink_Patcher.cs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,22 @@ static public void DownloadOSCApp(string appName)
365365
DownloadFile($"https://hbb1.oscwii.org/api/v3/contents/{appName}/icon.png", Path.Join(appPath, "icon.png"), appName);
366366
}
367367

368+
// <summary>
369+
/// Downloads WiiLink Account Linker from Patcher Server
370+
/// </summary>
371+
static public void DownloadLinker()
372+
{
373+
task = "Downloading WiiLink Account Linker";
374+
string appPath = Path.Join("apps", "WiiLinkAccountLinker");
375+
376+
if (!Directory.Exists(appPath))
377+
Directory.CreateDirectory(appPath);
378+
379+
DownloadFile($"{wiiLinkPatcherUrl}/linker/boot.dol", Path.Join(appPath, "boot.dol"), "WiiLink Account Linker");
380+
DownloadFile($"{wiiLinkPatcherUrl}/linker/meta.xml", Path.Join(appPath, "meta.xml"), "WiiLink Account Linker");
381+
DownloadFile($"{wiiLinkPatcherUrl}/linker/icon.png", Path.Join(appPath, "icon.png"), "WiiLink Account Linker");
382+
}
383+
368384
/// <summary>
369385
/// Downloads AnyGlobe Changer from OSC or GitHub, depending on platform, as the latest OSC release doesn't work with Dolphin.
370386
/// </summary>
@@ -2147,11 +2163,11 @@ static void DownloadAllPatches()
21472163
DownloadPatch("Dominos", $"Dominos_0.delta", "Dominos_0.delta", "Food Channel (Dominos)");
21482164
DownloadPatch("Dominos", $"Dominos_1.delta", "Dominos_1.delta", "Food Channel (Dominos)");
21492165
DownloadPatch("Dominos", $"Dominos_2.delta", "Dominos_2.delta", "Food Channel (Dominos)");
2150-
DownloadOSCApp("WiiLink_Account_Linker");
2166+
DownloadLinker();
21512167
break;
21522168
}
21532169

2154-
// Kirby TV Channel (only if user chose to install it)
2170+
// Kirby TV Channel
21552171
DownloadPatch("ktv", $"ktv_2.delta", "KirbyTV_2.delta", "Kirby TV Channel");
21562172
}
21572173

@@ -2167,7 +2183,7 @@ static void DownloadAllPatches()
21672183
DownloadOSCApp("sntp");
21682184
}
21692185

2170-
// Download WC24 patches if applicable
2186+
// Download WC24 patches
21712187
// Nintendo Channel
21722188
DownloadPatch("nc", $"NC_1_{wc24_reg}.delta", $"NC_1_{wc24_reg}.delta", "Nintendo Channel");
21732189

@@ -3254,7 +3270,7 @@ static void DownloadCustomPatches(List<string> channelSelection)
32543270
DownloadPatch("Dominos", $"Dominos_0.delta", "Dominos_0.delta", "Food Channel (Domino's)");
32553271
DownloadPatch("Dominos", $"Dominos_1.delta", "Dominos_1.delta", "Food Channel (Domino's)");
32563272
DownloadPatch("Dominos", $"Dominos_2.delta", "Dominos_2.delta", "Food Channel (Domino's)");
3257-
DownloadOSCApp("WiiLink_Account_Linker");
3273+
DownloadLinker();
32583274
break;
32593275
case "nc_us":
32603276
task = "Downloading Nintendo Channel (USA)";

0 commit comments

Comments
 (0)