trilium/bin/build-win-x64.sh

38 lines
1,009 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2019-10-12 03:22:59 +08:00
SRC_DIR=./dist/trilium-windows-x64-src
if [ "$1" != "DONTCOPY" ]
then
./bin/copy-trilium.sh $SRC_DIR
fi
2019-01-13 02:48:45 +08:00
echo "Copying required windows binaries"
cp -r bin/better-sqlite3/win-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
2020-04-16 03:49:36 +08:00
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
2020-04-12 20:22:51 +08:00
2020-09-16 23:34:48 +08:00
echo "Packaging windows x64 electron build"
2019-10-12 03:22:59 +08:00
./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
BUILD_DIR=./dist/trilium-windows-x64
rm -rf $BUILD_DIR
2019-01-13 02:48:45 +08:00
mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
rm -rf $BUILD_DIR/dump-db/node_modules
2022-12-12 01:24:29 +08:00
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
2019-01-13 02:48:45 +08:00
echo "Zipping windows x64 electron distribution..."
VERSION=`jq -r ".version" package.json`
2019-01-13 02:48:45 +08:00
cd dist
zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64