Skip to content

Commit

Permalink
Windows cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jun 19, 2024
1 parent 79cebfd commit d3b26ef
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 98 deletions.
32 changes: 0 additions & 32 deletions platforms/windows/lib/JSON.cs

This file was deleted.

32 changes: 0 additions & 32 deletions platforms/windows/lib/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,6 @@ public Settings() {
}
}

[Obsolete("Deprecated, remove when desktop is removed")]
public void GetSettings() {
var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

// check if Cores folder exists
if (!File.Exists(Path.Join(appData, "Cores"))) {
Directory.CreateDirectory(Path.Join(appData, "Cores"));
}

// check if settings.json exists
if (!File.Exists(Path.Join(appData, "Cores", "settings.json"))) {
// create settings.json
File.WriteAllText(Path.Join(appData, "Cores", "settings.json"), JsonSerializer.Serialize(this));
}

// read settings.json
try {
var settings = JsonSerializer.Deserialize<Settings>(File.ReadAllText(Path.Join(appData, "Cores", "settings.json")));

interval = settings.interval;
minimizeToTray = settings.minimizeToTray;
launchOnStartup = settings.launchOnStartup;
remoteConnections = settings.remoteConnections;
optionalAnalytics = settings.optionalAnalytics;
connectionCode = settings.connectionCode;
version = settings.version;
}
catch (Exception e) {
SentrySdk.CaptureException(e);
}
}

public void SetSettings() {
var programData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);

Expand Down
32 changes: 0 additions & 32 deletions platforms/windows/service/RTCServer.cs

This file was deleted.

1 change: 0 additions & 1 deletion platforms/windows/service/WindowsBackgroundService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public sealed class WindowsBackgroundService : BackgroundService {
internal static HardwareInfo HardwareInfo = new();
internal static HTTPServer HTTPServer = new();
internal static WSServer WSServer = new();
internal static RTCServer RTCServer = new();

public WindowsBackgroundService(ILogger<WindowsBackgroundService> logger) {
this.logger = logger;
Expand Down
1 change: 0 additions & 1 deletion platforms/windows/service/service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ezrtc" Version="0.6.0" />
<PackageReference Include="H.NotifyIcon" Version="2.0.131" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
Expand Down

0 comments on commit d3b26ef

Please sign in to comment.