trilium/bin/build-linux-x64.sh

25 lines
703 B
Bash
Raw Normal View History

#!/usr/bin/env bash
BUILD_DIR=./dist/trilium-linux-x64
rm -rf $BUILD_DIR
2019-01-13 02:48:45 +08:00
rm -r node_modules/sqlite3/lib/binding/*
cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR
cp src/public/images/app-icons/png/128x128.png $BUILD_DIR/icon.png
# removing software WebGL binaries because they are pretty huge and not necessary
rm -r $BUILD_DIR/swiftshader
echo "Packaging linux x64 electron distribution..."
VERSION=`jq -r ".version" package.json`
2019-01-13 02:48:45 +08:00
2019-01-17 06:57:09 +08:00
cd dist
tar cJf trilium-linux-x64-${VERSION}.tar.xz trilium-linux-x64