mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-07 23:03:38 +00:00
@@ -31,8 +31,10 @@ jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
CSC_LINK: ${{ secrets.MACOS_CSC_LINK }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.MACOS_CSC_KEY_PASSWORD }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { app, BrowserWindow, Menu, ipcMain, nativeTheme, dialog, shell } = require('electron');
|
||||
const { app, BrowserWindow, Menu, ipcMain, nativeTheme, dialog } = require('electron');
|
||||
const { autoUpdater } = require('electron-updater');
|
||||
const path = require('path');
|
||||
|
||||
@@ -257,7 +257,7 @@ autoUpdater.on('update-available', (updateInfo) => {
|
||||
buttons: ['Download', 'Cancel'],
|
||||
title: 'Update Available',
|
||||
message: title,
|
||||
detail: `Auto updating is not yet automatic on MacOS. Please manually download and install version ${updateInfo.version}.`
|
||||
detail: msg
|
||||
}
|
||||
}else{
|
||||
dialogOpts = {
|
||||
@@ -271,14 +271,7 @@ autoUpdater.on('update-available', (updateInfo) => {
|
||||
dialog.showMessageBox(mainWindow,dialogOpts).then((returnValue) => {
|
||||
// download was clicked
|
||||
if (returnValue.response === 0){
|
||||
if(!isMac){
|
||||
autoUpdater.downloadUpdate();
|
||||
}else{
|
||||
// TODO: get code signing working
|
||||
// temp solution to direct user to download
|
||||
shell.openExternal("https://github.com/stagehacks/Cue-View/releases/")
|
||||
}
|
||||
|
||||
autoUpdater.downloadUpdate();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
const notarize = require('@electron/notarize');
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = async function (params) {
|
||||
if (process.platform !== 'darwin') {
|
||||
console.log('Only need to notarize MacOS, skipping')
|
||||
return
|
||||
}
|
||||
|
||||
const appId = 'com.stagehacks.cueview'
|
||||
|
||||
const appPath = path.join(
|
||||
params.appOutDir,
|
||||
`${params.packager.appInfo.productFilename}.app`
|
||||
)
|
||||
|
||||
if (!fs.existsSync(appPath)) {
|
||||
console.error('App file not found skipping notarization.');
|
||||
return;
|
||||
}
|
||||
|
||||
if(process.env.APPLE_ID === undefined || process.env.APPLE_ID_PASSWORD === undefined){
|
||||
console.log('Apple ID and Password must be set in order to notarize.')
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(`Notarizing ${appId} found at ${appPath}`)
|
||||
await notarize.notarize({
|
||||
appBundleId: appId,
|
||||
appPath,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_ID_PASSWORD,
|
||||
})
|
||||
console.log(`Done notarizing ${appId}`)
|
||||
} catch (error) {
|
||||
console.log('There was an error notarizing.')
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
Generated
+41
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cue-view",
|
||||
"version": "0.9.6-pre",
|
||||
"version": "0.9.8-pre",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -37,6 +37,46 @@
|
||||
"sumchecker": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"@electron/notarize": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.3.tgz",
|
||||
"integrity": "sha512-9oRzT56rKh5bspk3KpAVF8lPKHYQrBnRwcgiOeR0hdilVEQmszDaAu0IPCPrwwzJN0ugNs0rRboTreHMt/6mBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
"fs-extra": "^9.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@electron/universal": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.2.1.tgz",
|
||||
|
||||
+4
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cue-view",
|
||||
"productName": "Cue View",
|
||||
"version": "0.9.7-pre",
|
||||
"version": "0.9.8-pre",
|
||||
"description": "A dashboard for everything in your show",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -19,6 +19,7 @@
|
||||
"homepage": "https://github.com/stagehacks/Cue-View",
|
||||
"repository": "https://github.com/stagehacks/Cue-View",
|
||||
"devDependencies": {
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"electron": "^21.3.0",
|
||||
"electron-builder": "^23.6.0",
|
||||
"eslint": "^8.27.0",
|
||||
@@ -40,9 +41,11 @@
|
||||
"appId": "com.stagehacks.cueview",
|
||||
"icon": "./src/img/",
|
||||
"artifactName": "${name}.${os}.v${version}.${ext}",
|
||||
"afterSign": "notarize.js",
|
||||
"mac": {
|
||||
"category": "Utilities",
|
||||
"icon": "./src/img/icon.icns",
|
||||
"hardenedRuntime": true,
|
||||
"electronLanguages": [
|
||||
"en"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user