mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
NET 8 Upgrade (#687)
* Initial .NET8 Upgrade * Initial GitHub Actions Cleanup * Fix Desktop Notifications * Fix throw warning * Upgrade vunerable transative nuget packages * Fix warnings with registry overflow * Adjust async/await usage for configRepository * Fix TTS voice name and app auto start * Install .NET 8 with setup I regret NSIS * Remove no longer needed System/MS references (included in dotnet sdk) * Surpress stackalloc in loop warning, that code scares me. * Removed unused SharpDX packages * Ignore WebClient warning, hopefully this project doesn't move past NET 8 * Fixed terrifying code * GenerateAssemblyInfo * Trimmed editor config to only silence warning. * Fix open webpage * Fix updater --------- Co-authored-by: DubyaDude <ushafiq141@gmail.com> Co-authored-by: Natsumi <cmcooper123@hotmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Timers;
|
||||
using NLog;
|
||||
|
||||
namespace VRCX
|
||||
{
|
||||
@@ -14,6 +15,7 @@ namespace VRCX
|
||||
public class AutoAppLaunchManager
|
||||
{
|
||||
public static AutoAppLaunchManager Instance { get; private set; }
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
public static readonly string VRChatProcessName = "VRChat";
|
||||
|
||||
public bool Enabled = false;
|
||||
@@ -215,14 +217,23 @@ namespace VRCX
|
||||
/// Starts a new child process.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
internal void StartChildProcess(string path)
|
||||
private void StartChildProcess(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var process = Process.Start(path))
|
||||
if (process != null)
|
||||
startedProcesses.Add(path, new HashSet<int>() { process.Id });
|
||||
} catch { }
|
||||
var process = new Process();
|
||||
process.StartInfo = new ProcessStartInfo(path)
|
||||
{
|
||||
UseShellExecute = true
|
||||
};
|
||||
process.Start();
|
||||
if (process.Id != 0)
|
||||
startedProcesses.Add(path, new HashSet<int>() { process.Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user