From 49dc5ddefa8e85ca68303ce0c2eda40257849392 Mon Sep 17 00:00:00 2001
From: Niklas Wenzel <dev@nikwen.de>
Date: Thu, 28 Nov 2024 21:43:47 +0100
Subject: [PATCH 1/2] docs: explain how to handle spaces in app name

---
 config/makers/squirrel.windows.md | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/config/makers/squirrel.windows.md b/config/makers/squirrel.windows.md
index 2d9f224..fe1a678 100644
--- a/config/makers/squirrel.windows.md
+++ b/config/makers/squirrel.windows.md
@@ -102,6 +102,41 @@ if (require('electron-squirrel-startup')) app.quit();
 ```
 {% endcode %}
 
+### Spaces in the app name
+
+Squirrel.Windows can behave unexpectedly when application names contain spaces. You can use the following setup in this case, which works well:
+
+{% code title="package.json" %}
+```json5
+{
+  // Hyphenated version
+  "name": "app-name",
+  // The app name with spaces (will be shown to your users)
+  "productName": "App Name",
+  // ...
+}
+```
+{% endcode %}
+
+{% code title="forge.config.ts" %}
+```typescript
+const config: ForgeConfig = {
+  makers: [
+    new MakerSquirrel({
+      // CamelCase version without spaces
+      name: "AppName",
+      // ...
+    }),
+  ],
+  // ...
+}
+```
+{% endcode %}
+
+Squirrel.Windows will use the `productName` from your `package.json` for any user-facing strings and for the name of your `Setup.exe`.
+
+It will use the camel-cased `name` from the `MakerSquirrel` config for the NuGet package name. NuGet package names cannot contain spaces.
+
 ## Debugging
 
 For advanced debug logging for this maker, add the `DEBUG=electron-windows-installer*` environment variable.

From 1143ada16a9a14f24b634a0f236cac9fcd04bcd4 Mon Sep 17 00:00:00 2001
From: Niklas Wenzel <dev@nikwen.de>
Date: Thu, 28 Nov 2024 21:58:02 +0100
Subject: [PATCH 2/2] docs: explain how to set App User Model ID

---
 config/makers/squirrel.windows.md | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/config/makers/squirrel.windows.md b/config/makers/squirrel.windows.md
index fe1a678..e82f2c1 100644
--- a/config/makers/squirrel.windows.md
+++ b/config/makers/squirrel.windows.md
@@ -133,6 +133,14 @@ const config: ForgeConfig = {
 ```
 {% endcode %}
 
+Additionally, you'll need to set the App User Model ID from your main process like this:
+
+{% code title="main.ts" %}
+```typescript
+app.setAppUserModelId("com.squirrel.AppName.AppName");
+```
+{% endcode %}
+
 Squirrel.Windows will use the `productName` from your `package.json` for any user-facing strings and for the name of your `Setup.exe`.
 
 It will use the camel-cased `name` from the `MakerSquirrel` config for the NuGet package name. NuGet package names cannot contain spaces.