Skip to content

Commit

Permalink
docs: explain how to handle spaces in app name
Browse files Browse the repository at this point in the history
  • Loading branch information
nikwen committed Nov 28, 2024
1 parent 2f23fda commit 49dc5dd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions config/makers/squirrel.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 49dc5dd

Please sign in to comment.