summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-05-24 18:25:04 +0200
committerDavid Lönnhager <david.l@mullvad.net>2023-05-29 10:54:46 +0200
commit417583b750f94f23acbd3013dc8ece17c2432476 (patch)
tree94e28ef060c27e3394a2f5db73e6ff312dd5af6b /gui
parentc9a4ba7f723fdaadcdb124e5db2723295c4066cd (diff)
downloadmullvadvpn-417583b750f94f23acbd3013dc8ece17c2432476.tar.xz
mullvadvpn-417583b750f94f23acbd3013dc8ece17c2432476.zip
Delete platform-irrelevant libraries
Diffstat (limited to 'gui')
-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);