diff --git a/.gitignore b/.gitignore
index 4e4f384a..2e047d48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
bin/
obj/
-build/
+/Releases
+/publish
+/publish.sh
/packages/
riderModule.iml
/_ReSharper.Caches/
diff --git a/VRCOSC.Desktop/Program.cs b/VRCOSC.Desktop/Program.cs
index 684d6927..9af58bb2 100644
--- a/VRCOSC.Desktop/Program.cs
+++ b/VRCOSC.Desktop/Program.cs
@@ -1,8 +1,10 @@
// Copyright (c) VolcanicArts. Licensed under the GPL-3.0 License.
// See the LICENSE file in the repository root for full license text.
+using System.Runtime.Versioning;
using osu.Framework;
using osu.Framework.Platform;
+using Squirrel;
using VRCOSC.Game;
namespace VRCOSC.Desktop;
@@ -11,8 +13,31 @@ public static class Program
{
public static void Main()
{
+ initSquirrel();
+
using GameHost host = Host.GetSuitableDesktopHost(@"VRCOSC");
using osu.Framework.Game game = new VRCOSCGame();
host.Run(game);
}
+
+ [SupportedOSPlatform("windows")]
+ private static void initSquirrel()
+ {
+ SquirrelAwareApp.HandleEvents(onInitialInstall: OnAppInstall, onAppUninstall: OnAppUninstall, onEveryRun: OnAppRun);
+ }
+
+ private static void OnAppInstall(SemanticVersion version, IAppTools tools)
+ {
+ tools.CreateShortcutForThisExe();
+ }
+
+ private static void OnAppUninstall(SemanticVersion version, IAppTools tools)
+ {
+ tools.RemoveShortcutForThisExe();
+ }
+
+ private static void OnAppRun(SemanticVersion version, IAppTools tools, bool firstRun)
+ {
+ tools.SetProcessAppUserModelId();
+ }
}
diff --git a/VRCOSC.Desktop/VRCOSC.Desktop.csproj b/VRCOSC.Desktop/VRCOSC.Desktop.csproj
index 60bdabb4..0cac0e9f 100644
--- a/VRCOSC.Desktop/VRCOSC.Desktop.csproj
+++ b/VRCOSC.Desktop/VRCOSC.Desktop.csproj
@@ -17,4 +17,7 @@
+
+
+