summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-10-09 06:42:07 +0200
committerRory& <root@rory.gay>2024-10-09 06:42:07 +0200
commitd78897fe62a26bec189771b0d41b3fbc34ba5994 (patch)
tree9b74fda6aee7a8b8c6664c2abdcbfb265be40b69
parentInitial commit (diff)
downloadSpacebarDiscordDesktopLauncher-master.tar.xz
Use less env, make more reliable HEAD master
-rw-r--r--SpacebarDiscordDesktopLauncher/Program.cs23
1 files changed, 20 insertions, 3 deletions
diff --git a/SpacebarDiscordDesktopLauncher/Program.cs b/SpacebarDiscordDesktopLauncher/Program.cs
index e72a641..9ab2af0 100644
--- a/SpacebarDiscordDesktopLauncher/Program.cs
+++ b/SpacebarDiscordDesktopLauncher/Program.cs
@@ -1,4 +1,4 @@
-// See https://aka.ms/new-console-template for more information
+// See https://aka.ms/new-console-template for more information
 
 using System.Diagnostics;
 using System.Text.Json;
@@ -41,17 +41,34 @@ internal class Program
             if (File.Exists(settingsJsonPath))
                 discordSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(settingsJsonPath));
 
+            // skip updates
             discordSettings!["SKIP_HOST_UPDATE"] = true;
+            discordSettings!["SKIP_MODULE_UPDATE"] = true;
+            //discordSettings!["ALWAYS_ALLOW_UPDATES"] = false;
+            //discordSettings!["ALWAYS_BOOTSTRAP_MODULES"] = false;
+            discordSettings!["USE_LOCAL_MODULE_VERSIONS"] = true;
+
+            // enable devtools
+            discordSettings!["DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING"] = true;
+
+            // various behavior changes
+            discordSettings!["WEBAPP_ENDPOINT"] = "https://dev.app.spacebar.chat";
+            discordSettings!["trayBalloonShown"] = true; // We don't need to be re-introduced to how system trays work
+            discordSettings!["MIN_WIDTH"] = 1;
+            discordSettings!["MIN_HEIGHT"] = 1;
+            discordSettings!["BACKGROUND_COLOR"] = "#0000FF";
+
+
             File.WriteAllText(settingsJsonPath, JsonSerializer.Serialize(discordSettings));
             Console.WriteLine($"Wrote settings.json... Contents: {discordSettings}");
             Console.WriteLine($"Full path: {settingsJsonPath}");
         }
 
-        var psi = new ProcessStartInfo(discordClientPath)
+        var psi = new ProcessStartInfo(discordClientPath, ["--allow-insecure-localhost", "--disable-features=OutOfBlinkCors"])
         {
             Environment =
             {
-                { "DISCORD_WEBAPP_ENDPOINT", "https://app.spacebar.chat" },
+                // { "DISCORD_WEBAPP_ENDPOINT", "http://discord.localhost" },
                 { "DISCORD_USER_DATA_DIR", userDataPath },
             }
         };