-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (30 loc) · 1.29 KB
/
Copy pathProgram.cs
File metadata and controls
35 lines (30 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Avalonia;
using System;
using SDRIQStreamer.CWSkimmer;
namespace SDRIQStreamer.App;
class Program
{
[STAThread]
public static void Main(string[] args)
{
// Must run before any AppSettingsStore load or log file open so the
// legacy %APPDATA%\SDRIQStreamer\ folder is renamed to
// %APPDATA%\SmartStreamer4\ atomically (issue #34) while no file
// handles are held by this process.
AppDataPaths.EnsureMigrated();
// Hand the resolved root to the CWSkimmer module so its INIs and logs
// land in the same folder the root app uses. Matters in the locked-
// fallback path where AppDataPaths.Root is the legacy folder for the
// session — without this, the CWSkimmer module would write to the new
// (empty) folder and split-brain against the root app (issue #34).
// Must come before any code touches CwSkimmerLauncher, whose static
// IniDir field initializer calls RuntimePathResolver.
RuntimePathResolver.AppDataRootOverride = AppDataPaths.Root;
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
}