summaryrefslogtreecommitdiffhomepage
path: root/gui/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'gui/tasks')
-rw-r--r--gui/tasks/distribution.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/tasks/distribution.js b/gui/tasks/distribution.js
index 3eb26cb876..fa27093e93 100644
--- a/gui/tasks/distribution.js
+++ b/gui/tasks/distribution.js
@@ -57,6 +57,7 @@ const config = {
'node_modules/',
'!node_modules/grpc-tools',
'!node_modules/@types',
+ '!node_modules/nseventmonitor/build/Release',
],
// Make sure that all files declared in "extraResources" exists and abort if they don't.
@@ -284,6 +285,16 @@ function packMac() {
return true;
},
+ beforePack: async (context) => {
+ try {
+ // `@electron/universal` tries to lipo together libraries built for the same architecture
+ // if they're present for both targets. So make sure we remove libraries for other archs.
+ // Remove the workaround once the issue has been fixed:
+ // https://github.com/electron/universal/issues/41#issuecomment-1496288834
+ await fs.promises.rm('node_modules/nseventmonitor/lib/binding/Release', { recursive: true });
+ } catch {}
+ config.beforePack?.(context);
+ },
afterPack: (context) => {
config.afterPack?.(context);