fgv2.0 平台 electron 打包桌面应用
he wei
2026-03-16 886fa105718a4aca7ffa1e6ed5fe0238e04328c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  "name": "electron-fg",
  "version": "1.0.0",
  "description": "electron-fg",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "electron:build": "electron-builder --win --ia32",
    "electron:serve": "electron:serve --mode development",
    "electron:generate-icons": "electron-icon-builder --input=./icon.png --output=build --flatten",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "build": {
    "productName": "electron-fg",
    "appId": "com.whyc.fg",
    "asar": true,
    "files": [
      "!dependent/**",
      "getConfig.js",
      "config.json",
      "main.js",
      "preload.js",
      "loading.html"
    ],
    "directories": {
      "output": "./release"
    },
    "win": {
      "target": ["dir"],
      "icon": "build/icons/icon.ico"
    },
    "nsis": {
      "script": "setup.nsi",
      "oneClick": false,
      "perMachine": true,
      "allowToChangeInstallationDirectory": true,
      "createDesktopShortcut": true,
      "createStartMenuShortcut": true,
      "shortcutName": "electronFg"
    },
    "linux": {
      "icon": "build/icons"
    },
    "extraResources": [
      {
        "from": "./dependent",
        "to": "../"
      },
      {
        "from": "./dependent/elevate.exe",
        "to": "../resources/elevate.exe"
      }
    ]
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "electron": "^34.1.1",
    "electron-builder": "^26.8.1"
  },
  "dependencies": {
    "electron-log": "^5.4.3",
    "minimal-request-promise": "^1.5.0"
  }
}