diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 272e6ae..7530c14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,4 +43,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd electron - npm run publish \ No newline at end of file + npm run publish diff --git a/electron/buildResources/notarize.js b/electron/buildResources/notarize.js deleted file mode 100644 index c4c9089..0000000 --- a/electron/buildResources/notarize.js +++ /dev/null @@ -1,30 +0,0 @@ -const { notarize } = require('@electron/notarize') -const path = require('path') - -exports.default = async function notarizing (context) { - if (context.electronPlatformName !== 'darwin' || process.env.CSC_IDENTITY_AUTO_DISCOVERY === 'false') { - console.log('Skipping notarization') - return - } - console.log('Notarizing...') - - const appBundleId = context.packager.appInfo.info._configuration.appId - const appName = context.packager.appInfo.productFilename - const appPath = path.normalize(path.join(context.appOutDir, `${appName}.app`)) - const appleId = process.env.APPLE_ID - const appleIdPassword = process.env.APPLE_ID_PASSWORD - if (!appleId) { - console.warn('Not notarizing: Missing APPLE_ID environment variable') - return - } - if (!appleIdPassword) { - console.warn('Not notarizing: Missing APPLE_ID_PASSWORD environment variable') - return - } - return notarize({ - appBundleId, - appPath, - appleId, - appleIdPassword - }) -} diff --git a/electron/package.json b/electron/package.json index 4ea8cc2..5131d4b 100644 --- a/electron/package.json +++ b/electron/package.json @@ -20,9 +20,9 @@ "discord-rpc": "4.0.1", "electron": "^31.3.1", "electron-builder": "^24.13.3", - "electron-log": "^5.1.5", + "electron-log": "^5.1.7", "electron-updater": "^6.2.1", - "webpack-merge": "^5.10.0" + "webpack-merge": "^6.0.1" }, "dependencies": { "@paymoapp/electron-shutdown-handler": "^1.1.2", @@ -56,7 +56,6 @@ "repo": "migu" } ], - "afterSign": "./buildResources/notarize.js", "appId": "com.github.nocrypt.migu", "productName": "Migu", "files": [ @@ -68,8 +67,10 @@ "defaultArch": "universal", "singleArchFiles": "node_modules/+(register-scheme|utp-native|fs-native-extensions)/**", "category": "public.app-category.video", + "darkModeSupport": true, "icon": "buildResources/icon.icns", "hardenedRuntime": true, + "notarize": false, "entitlements": "buildResources/entitlements.mac.plist", "target": [ { diff --git a/electron/src/main/updater.js b/electron/src/main/updater.js index fc54ef1..f97b06f 100644 --- a/electron/src/main/updater.js +++ b/electron/src/main/updater.js @@ -1,6 +1,6 @@ import log from 'electron-log' import { autoUpdater } from 'electron-updater' -import { ipcMain } from 'electron' +import { ipcMain, shell } from 'electron' log.initialize({ spyRendererConsole: true }) log.transports.file.level = 'info' @@ -37,6 +37,7 @@ export default class Updater { this.torrentWindow.close() autoUpdater.quitAndInstall(true, forceRunAfter) }) + if (process.platform === 'darwin') shell.openExternal('https://miru.watch/download') this.hasUpdate = false return true } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d581fd..4679d64 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,14 +228,14 @@ importers: specifier: ^24.13.3 version: 24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)) electron-log: - specifier: ^5.1.5 - version: 5.1.5 + specifier: ^5.1.7 + version: 5.1.7 electron-updater: specifier: ^6.2.1 version: 6.2.1 webpack-merge: - specifier: ^5.10.0 - version: 5.10.0 + specifier: ^6.0.1 + version: 6.0.1 web: dependencies: @@ -2260,8 +2260,8 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - electron-log@5.1.5: - resolution: {integrity: sha512-vuq10faUAxRbILgQx7yHoMObKZDEfj7hMSZrJPsVrDNeCpV/HN11dU7QuY4UDUe055pzBxhSCB3m0+6D3Aktjw==} + electron-log@5.1.7: + resolution: {integrity: sha512-/PjrS9zGkrZCDTHt6IgNE3FeciBbi4wd7U76NG9jAoNXF99E9IJdvBkqvaUJ1NjLojYDKs0kTvn9YhKy1/Zi+Q==} engines: {node: '>= 14'} electron-publish@24.13.1: @@ -5435,6 +5435,10 @@ packages: resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} engines: {node: '>=10.0.0'} + webpack-merge@6.0.1: + resolution: {integrity: sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==} + engines: {node: '>=18.0.0'} + webpack-sources@3.2.3: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} @@ -8107,7 +8111,7 @@ snapshots: - electron-builder-squirrel-windows - supports-color - electron-log@5.1.5: {} + electron-log@5.1.7: {} electron-publish@24.13.1: dependencies: @@ -11637,6 +11641,12 @@ snapshots: flat: 5.0.2 wildcard: 2.0.1 + webpack-merge@6.0.1: + dependencies: + clone-deep: 4.0.1 + flat: 5.0.2 + wildcard: 2.0.1 + webpack-sources@3.2.3: {} webpack@5.91.0(webpack-cli@5.1.4):