Merge pull request #4180 from h3poteto/fix/darwin-build
Fix darwin build
This commit is contained in:
commit
b6c62e14e5
@ -21,8 +21,8 @@ if (process.env.BUILD_TARGET === 'clean') clean()
|
||||
else build()
|
||||
|
||||
function clean() {
|
||||
del.sync(['build/*', '!build/icons', '!build/icons/icon.*', '!build/sounds', '!build/sounds/*', '!build/notarize.js'])
|
||||
del.sync(['packages/*', '!packages/universal.js'])
|
||||
del.sync(['build/*', '!build/icons', '!build/icons/icon.*', '!build/sounds', '!build/sounds/*'])
|
||||
del.sync(['packages/*'])
|
||||
console.log(`\n${doneLog}\n`)
|
||||
process.exit()
|
||||
}
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -94,7 +94,7 @@ jobs:
|
||||
release-darwin:
|
||||
name: Release for MacOS
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -116,7 +116,7 @@ jobs:
|
||||
env:
|
||||
VERSION: ${{ github.event.release.name }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||
ASC_PROVIDER: ${{ secrets.ASC_PROVIDER }}
|
||||
TEAM_ID: ${{ secrets.ASC_PROVIDER }}
|
||||
run: |
|
||||
|
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ mac:
|
||||
|
||||
mas:
|
||||
yarn run build:clean
|
||||
yarn run build:mas
|
||||
yarn run package:mas
|
||||
./appStore.sh
|
||||
|
||||
linux:
|
||||
|
@ -35,6 +35,9 @@ codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP H
|
||||
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v{napi_build_version}-darwin-unknown-x64/node_sqlite3.node"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v{napi_build_version}-darwin-unknown-arm64/node_sqlite3.node"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
|
||||
|
||||
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
|
||||
|
@ -1,20 +0,0 @@
|
||||
const { notarize } = require('electron-notarize')
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir } = context
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return
|
||||
}
|
||||
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
|
||||
return await notarize({
|
||||
tool: 'notarytool',
|
||||
appBundleId: 'org.whalebird.desktop',
|
||||
ascProvider: process.env.ASC_PROVIDER,
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_PASSWORD,
|
||||
teamId: process.env.TEAM_ID
|
||||
})
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
"productName": "Whalebird",
|
||||
"appId": "social.whalebird.app",
|
||||
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
|
||||
"buildVersion": "152",
|
||||
"directories": {
|
||||
"output": "build"
|
||||
},
|
||||
@ -12,9 +11,9 @@
|
||||
],
|
||||
"files": [
|
||||
"dist/electron/**/*",
|
||||
"build/icons/*"
|
||||
"build/icons/*",
|
||||
"!node_modules/**/*.{mk,a,o,h,forge-meta}"
|
||||
],
|
||||
"afterSign": "build/notarize.js",
|
||||
"dmg": {
|
||||
"sign": false,
|
||||
"contents": [
|
||||
@ -31,16 +30,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"mas": {
|
||||
"type": "distribution",
|
||||
"entitlements": "plist/parent.plist",
|
||||
"entitlementsInherit": "plist/child.plist",
|
||||
"entitlementsLoginHelper": "plist/loginhelper.plist",
|
||||
"hardenedRuntime": false,
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
}
|
||||
},
|
||||
"mac": {
|
||||
"icon": "build/icons/icon.icns",
|
||||
"target": [
|
||||
@ -60,10 +49,13 @@
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false,
|
||||
"darkModeSupport": true,
|
||||
"singleArchFiles": "*/binding/napi-v6-darwin-unknown-*",
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
}
|
||||
},
|
||||
"notarize": {
|
||||
"teamId": "HB4N6B2YVM"
|
||||
},
|
||||
"singleArchFiles": "*"
|
||||
},
|
||||
"win": {
|
||||
"icon": "build/icons/icon.ico",
|
||||
|
49
electron-builder.mas.json
Normal file
49
electron-builder.mas.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"productName": "Whalebird",
|
||||
"appId": "social.whalebird.app",
|
||||
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
|
||||
"buildVersion": "154",
|
||||
"directories": {
|
||||
"output": "build"
|
||||
},
|
||||
"extraResources": [
|
||||
"build/sounds/*",
|
||||
"build/icons/*"
|
||||
],
|
||||
"files": [
|
||||
"dist/electron/**/*",
|
||||
"build/icons/*",
|
||||
"!node_modules/**/*.{mk,a,o,h,forge-meta}"
|
||||
],
|
||||
"mas": {
|
||||
"type": "distribution",
|
||||
"entitlements": "plist/parent.plist",
|
||||
"entitlementsInherit": "plist/child.plist",
|
||||
"entitlementsLoginHelper": "plist/loginhelper.plist",
|
||||
"hardenedRuntime": false,
|
||||
"gatekeeperAssess": false,
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
}
|
||||
},
|
||||
"mac": {
|
||||
"icon": "build/icons/icon.icns",
|
||||
"target": [
|
||||
{
|
||||
"target": "mas",
|
||||
"arch": [
|
||||
"universal"
|
||||
]
|
||||
}
|
||||
],
|
||||
"category": "public.app-category.social-networking",
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false,
|
||||
"darkModeSupport": true,
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
},
|
||||
"notarize": false,
|
||||
"singleArchFiles": "*"
|
||||
}
|
||||
}
|
@ -24,13 +24,13 @@
|
||||
"build": "node .electron-vue/build.js",
|
||||
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
||||
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
|
||||
"build:mas": "electron-builder --mac mas --universal --config electron-builder.json",
|
||||
"package:mas": "electron-builder --mac --publish never --config electron-builder.mas.json",
|
||||
"package:mac": "electron-builder --mac --publish never --config electron-builder.json",
|
||||
"package:linux": "electron-builder --linux --publish never --config electron-builder.json",
|
||||
"package:win32": "electron-builder --win --ia32 --publish never --config electron-builder.json",
|
||||
"package:win64": "electron-builder --win --x64 --publish never --config electron-builder.json",
|
||||
"package:pacman": "electron-builder --linux pacman --publish never --config electron-builder.json",
|
||||
"package:appx2": "electron-builder --win --x64 --config electron-builder.json && electron-windows-store --assets .\\build\\icons --input-directory .\\build\\win-unpacked --output-directory .\\build\\appx --package-name Whalebird --package-display-name Whalebird --package-version 5.0.1.0 --publisher-display-name h3poteto --identity-name 45610h3poteto.Whalebird",
|
||||
"package:appx2": "electron-builder --win --x64 --config electron-builder.json && electron-windows-store --assets .\\build\\icons --input-directory .\\build\\win-unpacked --output-directory .\\build\\appx --package-name Whalebird --package-display-name Whalebird --package-version 5.0.1.1 --publisher-display-name h3poteto --identity-name 45610h3poteto.Whalebird",
|
||||
"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",
|
||||
@ -120,7 +120,6 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/register": "^7.21.0",
|
||||
"@babel/runtime": "7.21.0",
|
||||
"@electron/universal": "^1.3.4",
|
||||
"@types/auto-launch": "^5.0.2",
|
||||
"@types/electron-json-storage": "^4.5.0",
|
||||
"@types/jest": "27.4.1",
|
||||
@ -150,12 +149,10 @@
|
||||
"del": "^6.1.1",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "20.3.12",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron-builder": "24.0.0",
|
||||
"electron-debug": "^3.2.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-mock-ipc": "^0.3.12",
|
||||
"electron-notarize": "^1.2.2",
|
||||
"electron-packager": "^17.1.1",
|
||||
"electron-windows-store": "^2.1.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
|
@ -1,14 +0,0 @@
|
||||
const { makeUniversalApp } = require('@electron/universal')
|
||||
const path = require('path')
|
||||
|
||||
const x64AppPath = path.resolve(__dirname, './Whalebird-mas-x64/Whalebird.app')
|
||||
const arm64AppPath = path.resolve(__dirname, './Whalebird-mas-arm64/Whalebird.app')
|
||||
const universalAppPath = path.resolve(__dirname, './Whalebird-mas-universal/Whalebird.app')
|
||||
|
||||
;(async () => {
|
||||
await makeUniversalApp({
|
||||
x64AppPath: x64AppPath,
|
||||
arm64AppPath: arm64AppPath,
|
||||
outAppPath: universalAppPath
|
||||
})
|
||||
})()
|
Loading…
x
Reference in New Issue
Block a user