Skip to content

Commit

Permalink
Move EDDI Upgrader into its own namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkael committed Aug 4, 2024
1 parent 5643e51 commit d9ca2ac
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions EDDI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ Global
{7D25AF37-6EF2-4210-B079-14672BECDBB0} = {DBAE065B-DD96-4349-9189-D0935280BB0B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28C2EDB6-0FA0-409F-987C-7A24F542D0CF}
RESX_ShowErrorsInErrorList = False
RESX_AutoCreateNewLanguageFiles = True
RESX_TaskErrorCategory = Message
RESX_AutoCreateNewLanguageFiles = True
RESX_ShowErrorsInErrorList = False
SolutionGuid = {28C2EDB6-0FA0-409F-987C-7A24F542D0CF}
EndGlobalSection
EndGlobal
5 changes: 3 additions & 2 deletions EDDI/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using EddiConfigService;
using EddiConfigService.Configurations;
using EddiCore;
using EddiCore.Upgrader;
using System;
using System.Diagnostics;
using System.Globalization;
Expand Down Expand Up @@ -43,7 +44,7 @@ public static void Main()

// Start by fetching information from the update server, and handling appropriately
EddiUpgrader.CheckUpgrade();
if (EddiUpgrader.UpgradeRequired)
if ( EddiUpgrader.UpgradeRequired)
{
// We are too old to continue; initialize in a "safe mode".
EDDI.Init(true);
Expand Down Expand Up @@ -127,7 +128,7 @@ private static void StartTelemetryService()
{
CrashLogger(args.Exception);
};
App.Current.DispatcherUnhandledException += (sender, args) =>
Current.DispatcherUnhandledException += (sender, args) =>
{
CrashLogger(args.Exception);
};
Expand Down
1 change: 1 addition & 0 deletions EDDI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using EddiConfigService;
using EddiConfigService.Configurations;
using EddiCore;
using EddiCore.Upgrader;
using EddiDataDefinitions;
using EddiDataProviderService;
using EddiSpeechService;
Expand Down
8 changes: 4 additions & 4 deletions EDDI/EddiUpgrader.cs → EDDI/Upgrader/EddiUpgrader.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using EddiConfigService;
using EddiCore;
using Eddi;
using EddiConfigService;
using EddiSpeechService;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using Utilities;

namespace Eddi
namespace EddiCore.Upgrader
{
public class EddiUpgrader
{
Expand Down Expand Up @@ -89,7 +89,7 @@ public static async void Upgrade()
{
Logging.Info( $"Downloading upgrade from {UpgradeLocation}" );
SpeechService.Instance.Say(null, Eddi.Properties.EddiResources.downloading_upgrade, 0);
var updateFile = await Net.DownloadFileAsync(UpgradeLocation, @"EDDI-update.exe");
var updateFile = await Utilities.Net.DownloadFileAsync(UpgradeLocation, @"EDDI-update.exe");
if (updateFile == null)
{
SpeechService.Instance.Say(null, Eddi.Properties.EddiResources.download_failed, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Utilities
namespace EddiCore.Upgrader
{
/// <summary>
/// Information obtained from the update server
Expand Down
4 changes: 2 additions & 2 deletions Utilities/ServerInfo.cs → EDDI/Upgrader/ServerInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Utilities
namespace EddiCore.Upgrader
{
/// <summary>
/// Information obtained from the update server
Expand All @@ -28,7 +28,7 @@ public class ServerInfo
/// </summary>
public static ServerInfo FromServer(string baseUri)
{
string data = Net.DownloadString(baseUri + "info.json");
string data = Utilities.Net.DownloadString(baseUri + "info.json");
return data == null ? null : JsonConvert.DeserializeObject<ServerInfo>(data);
}
}
Expand Down
1 change: 1 addition & 0 deletions VoiceAttackResponder/VoiceAttackPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Eddi;
using EddiCore.Upgrader;
using EddiCargoMonitor;
using EddiCompanionAppService;
using EddiCore;
Expand Down

0 comments on commit d9ca2ac

Please sign in to comment.