diff --git a/gui/electron-builder.yml b/gui/electron-builder.yml index 0f2452621..c1259fa15 100644 --- a/gui/electron-builder.yml +++ b/gui/electron-builder.yml @@ -62,6 +62,10 @@ win: mac: target: dmg + hardenedRuntime: true + gatekeeperAssess: false + entitlements: "build/entitlements.mac.plist" + entitlementsInherit: build/entitlements.mac.plist artifactName: "SlimeVR-mac.${ext}" x64ArchFiles: "**/register-protocol-handler.node" icon: "./electron/resources/icons/icon.icns" diff --git a/gui/package.json b/gui/package.json index 1657a509c..32fb58c9a 100644 --- a/gui/package.json +++ b/gui/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@dword-design/eslint-plugin-import-alias": "^4.0.9", "@electron/asar": "^4.0.1", + "@electron/notarize": "^3.1.1", "@fluent/bundle": "^0.18.0", "@fluent/react": "^0.15.2", "@fontsource/poppins": "^5.1.0", diff --git a/gui/scripts/notarize.js b/gui/scripts/notarize.js new file mode 100644 index 000000000..32ee1ef7d --- /dev/null +++ b/gui/scripts/notarize.js @@ -0,0 +1,22 @@ +#!/usr/bin/env node +/* eslint-env node */ +require('dotenv').config(); +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', + teamId: process.env.APPLETEAMID, + appBundleId: 'com.yourcompany.yourAppId', + appPath: `${appOutDir}/${appName}.app`, + appleId: process.env.APPLEID, + appleIdPassword: process.env.APPLEIDPASS, + }); +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48926911a..a6518585a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,6 +51,9 @@ importers: '@electron/asar': specifier: ^4.0.1 version: 4.0.1 + '@electron/notarize': + specifier: ^3.1.1 + version: 3.1.1 '@fluent/bundle': specifier: ^0.18.0 version: 0.18.0 @@ -621,6 +624,10 @@ packages: resolution: {integrity: sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==} engines: {node: '>= 10.0.0'} + '@electron/notarize@3.1.1': + resolution: {integrity: sha512-uQQSlOiJnqRkTL1wlEBAxe90nVN/Fc/hEmk0bqpKk8nKjV1if/tXLHKUPePtv9Xsx90PtZU8aidx5lAiOpjkQQ==} + engines: {node: '>= 22.12.0'} + '@electron/osx-sign@1.3.3': resolution: {integrity: sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==} engines: {node: '>=12.0.0'} @@ -1877,6 +1884,7 @@ packages: '@xmldom/xmldom@0.8.11': resolution: {integrity: sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==} engines: {node: '>=10.0.0'} + deprecated: this version has critical issues, please update to the latest version abbrev@3.0.1: resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==} @@ -2454,15 +2462,6 @@ packages: supports-color: optional: true - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -4106,9 +4105,6 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -5702,7 +5698,7 @@ snapshots: '@babel/traverse': 7.24.7 '@babel/types': 7.24.7 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -5722,7 +5718,7 @@ snapshots: '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -5989,7 +5985,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.24.7 '@babel/types': 7.24.7 - debug: 4.3.5 + debug: 4.4.3 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6001,7 +5997,7 @@ snapshots: '@babel/parser': 7.25.8 '@babel/template': 7.25.7 '@babel/types': 7.25.8 - debug: 4.3.5 + debug: 4.4.3 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6150,6 +6146,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@electron/notarize@3.1.1': + dependencies: + debug: 4.4.3 + promise-retry: 2.0.1 + transitivePeerDependencies: + - supports-color + '@electron/osx-sign@1.3.3': dependencies: compare-version: 0.1.2 @@ -7116,7 +7119,7 @@ snapshots: '@typescript-eslint/types': 8.46.4 '@typescript-eslint/typescript-estree': 8.46.4(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.46.4 - debug: 4.3.7 + debug: 4.4.3 eslint: 9.39.1(jiti@2.6.1) typescript: 5.6.3 transitivePeerDependencies: @@ -7138,7 +7141,7 @@ snapshots: dependencies: '@typescript-eslint/tsconfig-utils': 8.46.4(typescript@5.6.3) '@typescript-eslint/types': 8.46.4 - debug: 4.3.7 + debug: 4.4.3 typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -7175,7 +7178,7 @@ snapshots: '@typescript-eslint/types': 8.46.4 '@typescript-eslint/typescript-estree': 8.46.4(typescript@5.6.3) '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.6.3) - debug: 4.3.7 + debug: 4.4.3 eslint: 9.39.1(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.6.3) typescript: 5.6.3 @@ -7204,7 +7207,7 @@ snapshots: '@typescript-eslint/tsconfig-utils': 8.46.4(typescript@5.6.3) '@typescript-eslint/types': 8.46.4 '@typescript-eslint/visitor-keys': 8.46.4 - debug: 4.3.7 + debug: 4.4.3 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.4 @@ -8017,10 +8020,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.5: - dependencies: - ms: 2.1.2 - debug@4.3.7: dependencies: ms: 2.1.3 @@ -10186,8 +10185,6 @@ snapshots: dependencies: minimist: 1.2.8 - ms@2.1.2: {} - ms@2.1.3: {} mz@2.7.0: