Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (32 loc) · 1.44 KB
/
Copy pathProgram.cs
File metadata and controls
38 lines (32 loc) · 1.44 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
36
37
38
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 Baba0bab — Vibe SSH Monitoring
using Velopack;
using VibeSSHMonitoring.Core;
namespace VibeSSHMonitoring;
public static class Program
{
[STAThread]
public static void Main()
{
#if DEBUG
// The demos never use the real configuration, even when no folder was given
if (UI.DemoServers.Enabled)
UI.DemoServers.Prepare();
else if (UI.UpgradeDemo.Enabled && string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VIBESSHMONITORING_HOME")))
Environment.SetEnvironmentVariable("VIBESSHMONITORING_HOME", System.IO.Path.Combine(System.IO.Path.GetTempPath(), "VibeSSHMonitoring.Demo"));
#endif
var config = AppConfig.Load();
// First of all: the installer and the updater restart the exe with their own arguments
// (install, update, uninstall), which are handled here before exiting.
VelopackApp.Build()
.OnBeforeUninstallFastCallback(_ => AppUpdater.CleanupBeforeUninstall())
// A downloaded update is installed at the next startup, unless the user turned it off
.SetAutoApplyOnStartup(config.AppUpdateAutoInstall)
.Run();
// Language before any window: the interface reads its texts when it is built
Loc.Initialize(config.Language, config.ConciseLabels);
var app = new App();
app.InitializeComponent();
app.Run();
}
}