From 86659552ee41f92fe1b5b17b21106665d56ded6c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 17 Jul 2024 21:42:50 +0300 Subject: [PATCH] build: Fix ".node is not a valid Win32 application" See https://github.com/electron/packager/issues/740. --- bin/build-win-x64.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/build-win-x64.sh b/bin/build-win-x64.sh index 33f3b06be..c7b1bdc40 100755 --- a/bin/build-win-x64.sh +++ b/bin/build-win-x64.sh @@ -16,7 +16,14 @@ rm -r $SRC_DIR/src/public/app-dist/*.mobile.* echo "Packaging windows x64 electron build" -./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=win32 --arch=x64 --overwrite --icon=images/app-icons/win/icon.ico +./node_modules/.bin/electron-packager $SRC_DIR \ + --out=dist \ + --asar.unpack="*.{node,dll}" \ + --executable-name=trilium \ + --platform=win32 \ + --arch=x64 \ + --overwrite \ + --icon=images/app-icons/win/icon.ico BUILD_DIR=./dist/trilium-windows-x64 rm -rf $BUILD_DIR