1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-28 01:32:15 +01:00

Divide electron-builder configuration file

This commit is contained in:
AkiraFukushima 2021-09-05 23:57:05 +09:00
parent 9314fc7700
commit d83db0a1c0
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
3 changed files with 112 additions and 113 deletions

107
electron-builder.json Normal file
View File

@ -0,0 +1,107 @@
{
"productName": "Whalebird",
"appId": "org.whalebird.desktop",
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"directories": {
"output": "build"
},
"extraResources": [
"build/sounds/*",
"build/icons/*"
],
"files": [
"dist/electron/**/*",
"build/icons/*"
],
"afterSign": "build/notarize.js",
"dmg": {
"sign": false,
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"mac": {
"icon": "build/icons/icon.icns",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64",
"universal"
]
}
],
"category": "public.app-category.social-networking",
"entitlements": "plist/entitlements.mac.plist",
"entitlementsInherit": "plist/entitlements.mac.plist",
"hardenedRuntime": true,
"gatekeeperAssess": false
},
"win": {
"icon": "build/icons/icon.ico",
"target": "nsis"
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
"linux": {
"icon": "build/icons",
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
},
{
"target": "deb",
"arch": [
"x64",
"ia32"
]
},
{
"target": "rpm",
"arch": [
"x64",
"ia32"
]
},
{
"target": "tar.bz2",
"arch": [
"x64",
"ia32",
"armv7l",
"arm64"
]
},
{
"target": "pacman",
"arch": [
"x64",
"ia32"
]
},
{
"target": "snap",
"arch": [
"x64"
]
}
],
"category": "Network"
}
}

View File

@ -32,123 +32,16 @@
"build:win32": "yarn run build && yarn run package:win32",
"build:win64": "yarn run build && yarn run package:win64",
"build:mas": "yarn run build:clean && yarn run pack && electron-packager ./ 'Whalebird' --platform=mas --arch=x64 --arch=arm64 --electron-version=13.2.2 --asar.unpackDir='build/sounds' --out=packages --ignore='^/src' --ignore='^/.electron-vue' --ignore='^/.envrc' --ignore='^/packages' --ignore='^/plist' --ignore='^/static' --ignore='^/whalebird.db' --ignore='^/screenshot.png' --prune=true --icon=./build/icons/icon.icns --overwrite --app-bundle-id=org.whalebird.desktop --app-version=$npm_package_config_appVersion --build-version=$npm_package_config_buildVersion --extend-info='./plist/team.plist' --app-category-type=public.app-category.social-networking && node ./packages/universal.js",
"package:mac": "electron-builder --mac",
"package:linux": "electron-builder --linux",
"package:win32": "electron-builder --win --ia32",
"package:win64": "electron-builder --win --x64",
"package:mac": "electron-builder --mac --config electron-builder.json",
"package:linux": "electron-builder --linux --config electron-builder.json",
"package:win32": "electron-builder --win --ia32 --config electron-builder.json",
"package:win64": "electron-builder --win --x64 --config electron-builder.json",
"pack": "yarn run pack:main && yarn run pack:renderer",
"pack:main": "webpack --node-env=production --mode production --progress --config .electron-vue/webpack.main.config.js",
"pack:renderer": "webpack --node-env=production --mode production --progress --config .electron-vue/webpack.renderer.config.js",
"postinstall": "yarn run lint:fix",
"spec": "NODE_ENV=test jest -u --maxWorkers=3"
},
"build": {
"productName": "Whalebird",
"appId": "org.whalebird.desktop",
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"directories": {
"output": "build"
},
"extraResources": [
"build/sounds/*",
"build/icons/*"
],
"files": [
"dist/electron/**/*",
"build/icons/*"
],
"afterSign": "build/notarize.js",
"dmg": {
"sign": false,
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"mac": {
"icon": "build/icons/icon.icns",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64",
"universal"
]
}
],
"category": "public.app-category.social-networking",
"entitlements": "plist/entitlements.mac.plist",
"entitlementsInherit": "plist/entitlements.mac.plist",
"hardenedRuntime": true,
"gatekeeperAssess": false
},
"win": {
"icon": "build/icons/icon.ico",
"target": "nsis"
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
"linux": {
"icon": "build/icons",
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
},
{
"target": "deb",
"arch": [
"x64",
"ia32"
]
},
{
"target": "rpm",
"arch": [
"x64",
"ia32"
]
},
{
"target": "tar.bz2",
"arch": [
"x64",
"ia32",
"armv7l",
"arm64"
]
},
{
"target": "pacman",
"arch": [
"x64",
"ia32"
]
},
{
"target": "snap",
"arch": [
"x64"
]
}
],
"category": "Network"
}
},
"jest": {
"moduleFileExtensions": [
"ts",

View File

@ -30,7 +30,6 @@ import sanitizeHtml from 'sanitize-html'
import AutoLaunch from 'auto-launch'
import minimist from 'minimist'
import pkg from '~/package.json'
import Authentication from './auth'
import Account from './account'
import { StreamingURL, UserStreaming, DirectStreaming, LocalStreaming, PublicStreaming, ListStreaming, TagStreaming } from './websocket'
@ -111,7 +110,7 @@ if (process.platform !== 'darwin') {
}
}
const appId = pkg.build.appId
const appId = 'org.whalebird.desktop'
const splashURL =
process.env.NODE_ENV === 'development'