chore(suite-desktop): fix macOS ad-hoc signing for local build

This commit is contained in:
Jiri Zbytovsky
2026-01-04 14:27:23 +01:00
parent bd4c692456
commit 33faaad0bb
4 changed files with 28 additions and 10 deletions

View File

@@ -16,13 +16,8 @@ const binaryExtensionByPlaformNameMap = {
const afterPackHookSetElectronFuses = async context => {
const { electronPlatformName, appOutDir } = context;
/*
As of Electron 34.1.0, ASAR integrity:
- is not supported on Linux at all
- is supported on macOS, but does not work. TODO investigate & reenable
So we only set the appropriate fuses for Windows
*/
if (electronPlatformName !== 'win32') {
// As of Electron 39, ASAR integrity is not supported on Linux, so we set the appropriate fuses for Windows and macOS
if (electronPlatformName !== 'win32' && electronPlatformName !== 'darwin') {
// eslint-disable-next-line no-console
console.log('Skipping electron fuses ');

View File

@@ -5,11 +5,11 @@ const isCodesignBuild = process.env.IS_CODESIGN_BUILD === 'true';
// to be able to use patterns like ${author} and ${arch}
module.exports = {
// distingush between dev and prod builds
// distinguish between dev and prod builds
appId: `io.trezor.TrezorSuite${isCodesignBuild ? '' : '.dev'}`,
extraMetadata: {
version: suiteVersion,
// distingush between dev and prod builds so different userDataDir is used
// distinguish between dev and prod builds so different userDataDir is used
name: `@trezor/suite-desktop${isCodesignBuild ? '' : '-dev'}`,
},
productName: 'Trezor Suite',
@@ -99,7 +99,7 @@ module.exports = {
],
icon: 'build/static/images/desktop/512x512.icns',
artifactName: 'Trezor-Suite-${version}-mac-${arch}.${ext}',
hardenedRuntime: true,
hardenedRuntime: isCodesignBuild,
gatekeeperAssess: false,
darkModeSupport: true,
entitlements: 'entitlements.mac.inherit.plist',

View File

@@ -1,6 +1,15 @@
# Patches
## app-builder-lib
Fixes problem with generating `Info.plist` when building for macOS.
Remove this patch after when this is fixed upstream in [electron-builder PR](https://github.com/electron-userland/electron-builder/pull/9481).
## expo-modules-core
Gets rid of `The global process.env.EXPO_OS is not defined. This should be inlined by babel-preset-expo during transformation.`
warning while running unit tests. Probably caused by an issue reported [here](https://github.com/expo/expo/issues/26513) or [here](https://github.com/expo/expo/issues/25452).
## blakejs
May be outdated, TODO investigate

View File

@@ -0,0 +1,14 @@
diff --git a/node_modules/app-builder-lib/out/macPackager.js b/node_modules/app-builder-lib/out/macPackager.js
index a52a853..216a77d 100644
--- a/node_modules/app-builder-lib/out/macPackager.js
+++ b/node_modules/app-builder-lib/out/macPackager.js
@@ -474,6 +474,9 @@ class MacPackager extends platformPackager_1.PlatformPackager {
const extendInfo = this.platformSpecificBuildOptions.extendInfo;
if (extendInfo != null) {
Object.assign(appPlist, extendInfo);
+ for(const [k,v] of Object.entries(appPlist)) {
+ if(v === null || v === undefined) delete appPlist[k]
+ }
}
}
async signApp(packContext, isAsar) {