Skip to content

Commit

Permalink
feat: windows setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 30, 2024
1 parent 56b6974 commit c673323
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ const config: ForgeConfig = {
},
],
}),
new MakerSquirrel({}),
new MakerSquirrel({
name: "Follow",
setupIcon: "resources/icon.png",
}),
new MakerAppImage({
options: {
icon: "resources/icon.png",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"dnum": "^2.13.1",
"dotenv": "16.4.5",
"electron-log": "5.1.7",
"electron-squirrel-startup": "1.0.1",
"electron-updater": "^6.2.1",
"font-list": "1.5.1",
"foxact": "0.2.36",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { electronApp, optimizer } from "@electron-toolkit/utils"
import { APP_PROTOCOL, DEEPLINK_SCHEME } from "@shared/constants"
import { extractElectronWindowOptions } from "@shared/electron"
import { app, BrowserWindow, session } from "electron"
import squirrelStartup from "electron-squirrel-startup"

import { env } from "../env"
import { isDev } from "./env"
Expand All @@ -14,6 +15,10 @@ import { createMainWindow, createWindow } from "./window"

if (isDev) console.info("[main] env loaded:", env)

if (squirrelStartup) {
app.quit()
}

function bootsharp() {
const gotTheLock = app.requestSingleInstanceLock()

Expand Down

0 comments on commit c673323

Please sign in to comment.