mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 19:51:57 +08:00
780b520506
* Add powershell equivalents to existing windows scripts Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior previous to this commit. Should help fix bugs with accents and non-ASCII characters (issue #2327). * Add powershell equivalents to existing windows scripts Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior previous to this commit. Should help fix bugs with accents and non-ASCII characters (issue #2327). Co-authored-by: zadam <zadam.apps@gmail.com>
37 lines
1 KiB
Bash
Executable file
37 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
SRC_DIR=./dist/trilium-windows-x64-src
|
|
|
|
if [ "$1" != "DONTCOPY" ]
|
|
then
|
|
./bin/copy-trilium.sh $SRC_DIR
|
|
fi
|
|
|
|
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
|
|
|
|
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
|
|
|
|
BUILD_DIR=./dist/trilium-windows-x64
|
|
rm -rf $BUILD_DIR
|
|
|
|
mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR
|
|
|
|
# removing software WebGL binaries because they are pretty huge and not necessary
|
|
rm -r $BUILD_DIR/swiftshader
|
|
|
|
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
|
|
|
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
|
|
|
|
echo "Zipping windows x64 electron distribution..."
|
|
VERSION=`jq -r ".version" package.json`
|
|
|
|
cd dist
|
|
|
|
zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64
|