Skip to content

Commit 77199b3

Browse files
committed
Make it possible for updater to parse update mirrors from a file
1 parent 12bde20 commit 77199b3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/MapEditorLauncher/UpdaterLink.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,19 @@ public class UpdaterLink
1212
{
1313
public UpdaterLink()
1414
{
15-
buildHandler = new BuildHandler(Environment.CurrentDirectory,
16-
"SecondStageUpdater/SecondStageUpdater.exe");
17-
buildHandler.AddUpdateMirror("https://rampastring.cnc-comm.com/DTAScenarioEditorUpdates/", "CnCNet (cnc-comm.com)");
15+
buildHandler = new BuildHandler(Environment.CurrentDirectory, "SecondStageUpdater/SecondStageUpdater.exe");
16+
17+
string filePath = Path.Combine(Environment.CurrentDirectory, "UpdateMirrors.ini");
18+
19+
if (File.Exists(filePath))
20+
{
21+
buildHandler.ParseUpdateMirrors(filePath);
22+
}
23+
else
24+
{
25+
buildHandler.AddUpdateMirror("https://rampastring.cnc-comm.com/DTAScenarioEditorUpdates/", "CnCNet (cnc-comm.com)");
26+
}
27+
1828
buildHandler.ReadLocalBuildInfo();
1929
buildHandler.UpdateCheckFailed += BuildHandler_UpdateCheckFailed;
2030
buildHandler.BuildUpToDate += BuildHandler_BuildUpToDate;

0 commit comments

Comments
 (0)