mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-24 06:33:52 +01:00
Fix build process for mac
This commit is contained in:
parent
70b8fa732c
commit
d1d536afa7
@ -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/*'])
|
||||
del.sync(['packages/*'])
|
||||
del.sync(['build/*', '!build/icons', '!build/icons/icon.*', '!build/sounds', '!build/sounds/*', '!build/notarize.js'])
|
||||
del.sync(['packages/*', '!packages/universal.js', '!packages/packager.js', "!packages/socialwhalebirdapp_MAS.provisionprofile"])
|
||||
console.log(`\n${doneLog}\n`)
|
||||
process.exit()
|
||||
}
|
||||
|
50
appStore.sh
50
appStore.sh
@ -3,7 +3,7 @@
|
||||
# Name of your app.
|
||||
APP="Whalebird"
|
||||
# The path of your app to sign.
|
||||
APP_PATH="./build/mas-universal/Whalebird.app"
|
||||
APP_PATH="./packages/Whalebird-mas-universal/Whalebird.app"
|
||||
# The path to the location you want to put the signed package.
|
||||
RESULT_PATH="./packages/$APP.pkg"
|
||||
# The name of certificates you requested.
|
||||
@ -16,28 +16,30 @@ LOGINHELPER_PLIST="./plist/loginhelper.plist"
|
||||
|
||||
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
|
||||
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/Contents/MacOS/$APP Helper (GPU)"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/Contents/MacOS/$APP Helper (Plugin)"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/Contents/MacOS/$APP Helper (Renderer)"
|
||||
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/"
|
||||
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"
|
||||
# At first, copy build directory.
|
||||
# Because electron-builder does not store it under app.asar.unpacked directory.
|
||||
# I want to store build files at the same directory as electron-builder.
|
||||
cp -r $APP_PATH/Contents/Resources/app-x64.asar.unpacked/build $APP_PATH/Contents/Resources/build
|
||||
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/Contents/MacOS/$APP Helper (GPU)"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/Contents/MacOS/$APP Helper (Plugin)"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/Contents/MacOS/$APP Helper (Renderer)"
|
||||
# codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/"
|
||||
# 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 "$PARENT_PLIST" "$APP_PATH"
|
||||
|
||||
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
|
||||
|
20
build/notarize.js
Normal file
20
build/notarize.js
Normal file
@ -0,0 +1,20 @@
|
||||
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: 'social.whalebird.app',
|
||||
ascProvider: process.env.ASC_PROVIDER,
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
||||
teamId: process.env.TEAM_ID
|
||||
})
|
||||
}
|
@ -11,9 +11,9 @@
|
||||
],
|
||||
"files": [
|
||||
"dist/electron/**/*",
|
||||
"build/icons/*",
|
||||
"!node_modules/**/*.{mk,a,o,h,forge-meta}"
|
||||
"build/icons/*"
|
||||
],
|
||||
"afterSign": "build/notarize.js",
|
||||
"dmg": {
|
||||
"sign": false,
|
||||
"contents": [
|
||||
@ -52,10 +52,8 @@
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
},
|
||||
"notarize": {
|
||||
"teamId": "HB4N6B2YVM"
|
||||
},
|
||||
"singleArchFiles": "*"
|
||||
"mergeASARs": false,
|
||||
"asarUnpack": "node_modules/**/*.node"
|
||||
},
|
||||
"win": {
|
||||
"icon": "build/icons/icon.ico",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"productName": "Whalebird",
|
||||
"appId": "social.whalebird.app",
|
||||
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
|
||||
"buildVersion": "154",
|
||||
"buildVersion": "161",
|
||||
"directories": {
|
||||
"output": "build"
|
||||
},
|
||||
@ -12,8 +12,7 @@
|
||||
],
|
||||
"files": [
|
||||
"dist/electron/**/*",
|
||||
"build/icons/*",
|
||||
"!node_modules/**/*.{mk,a,o,h,forge-meta}"
|
||||
"build/icons/*"
|
||||
],
|
||||
"mas": {
|
||||
"type": "distribution",
|
||||
@ -24,7 +23,8 @@
|
||||
"gatekeeperAssess": false,
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
}
|
||||
},
|
||||
"provisioningProfile": "./packages/socialwhalebirdapp_MAS.provisionprofile"
|
||||
},
|
||||
"mac": {
|
||||
"icon": "build/icons/icon.icns",
|
||||
@ -43,7 +43,7 @@
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": "false"
|
||||
},
|
||||
"notarize": false,
|
||||
"singleArchFiles": "*"
|
||||
"mergeASARs": false,
|
||||
"asarUnpack": "node_modules/**/*.node"
|
||||
}
|
||||
}
|
||||
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Whalebird",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"author": "AkiraFukushima <h3.poteto@gmail.com>",
|
||||
"description": "An Electron based Mastodon client for Windows, Mac and Linux",
|
||||
"license": "MIT",
|
||||
@ -24,13 +24,14 @@
|
||||
"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",
|
||||
"package:store": "yarn run build:clean && yarn run pack && node packages/packager.js && node packages/universal.js && DEBUG=electron-osx-sign* electron-osx-sign ./packages/Whalebird-mas-universal/Whalebird.app --identity=\"3rd Party Mac Developer Application: Akira Fukushima (HB4N6B2YVM)\" --identityValidation --platform=mas --type=distribution --provisioningProfile=./packages/socialwhalebirdapp_MAS.provisionprofile",
|
||||
"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.1 --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.2.0 --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",
|
||||
@ -121,6 +122,8 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/register": "^7.21.0",
|
||||
"@babel/runtime": "7.21.0",
|
||||
"@electron/universal": "^1.3.4",
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"@types/auto-launch": "^5.0.2",
|
||||
"@types/better-sqlite3": "^7.6.3",
|
||||
"@types/electron-json-storage": "^4.5.0",
|
||||
@ -151,10 +154,11 @@
|
||||
"del": "^6.1.1",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "20.3.12",
|
||||
"electron-builder": "24.0.0",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron-debug": "^3.2.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-mock-ipc": "^0.3.12",
|
||||
"electron-packager": "^17.1.1",
|
||||
"electron-windows-store": "^2.1.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
|
@ -4,8 +4,6 @@
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<string>HB4N6B2YVM.social.whalebird.app</string>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
|
10
plist/team.plist
Normal file
10
plist/team.plist
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ElectronTeamID</key>
|
||||
<string>HB4N6B2YVM</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user