fgv2.0 平台 electron 打包桌面应用
whychw
2026-03-21 29b048064ae92d5d8d9737477f4375f724deeb08
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
66
67
68
69
{
  "name": "electron-fg",
  "version": "1.0.0",
  "description": "electron-fg",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "electron:build": "electron-builder --win --ia32",
    "electron:build-linux": "electron-builder --linux",
    "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/**",
      "!dependent_linux/**",
      "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",
      "artifactName": "${productName}-${version}-linux.${ext}",
      "target": ["dir", "tar.gz"]
    },
    "extraResources": [
      {
        "from": "./dependent_linux/",
        "to": "../"
      },
      {
        "from": "./build/",
        "to": "build"
      }
    ]
  },
  "author": "whychw, Inc <858544502@qq.com>",
  "license": "ISC",
  "devDependencies": {
    "electron": "^34.1.1",
    "electron-builder": "^26.8.1"
  },
  "dependencies": {
    "electron-log": "^5.4.3",
    "minimal-request-promise": "^1.5.0"
  }
}