mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
support compiling native arm64 macos builds
This commit is contained in:
parent
25b49e1ca2
commit
d142d3261d
BIN
bin/better-sqlite3/mac-arm64-better_sqlite3.node
Normal file
BIN
bin/better-sqlite3/mac-arm64-better_sqlite3.node
Normal file
Binary file not shown.
38
bin/build-mac-arm64.sh
Executable file
38
bin/build-mac-arm64.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SRC_DIR=./dist/trilium-mac-arm64-src
|
||||||
|
|
||||||
|
if [ "$1" != "DONTCOPY" ]
|
||||||
|
then
|
||||||
|
./bin/copy-trilium.sh $SRC_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Copying required mac arm64 binaries"
|
||||||
|
|
||||||
|
cp -r bin/better-sqlite3/mac-arm64-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 mac arm64 electron build"
|
||||||
|
|
||||||
|
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=darwin --arch=arm64 --overwrite --icon=images/app-icons/mac/icon.icns
|
||||||
|
|
||||||
|
BUILD_DIR=./dist/trilium-mac-arm64
|
||||||
|
rm -rf $BUILD_DIR
|
||||||
|
|
||||||
|
# Mac build has by default useless directory level
|
||||||
|
mv "./dist/Trilium Notes-darwin-arm64" $BUILD_DIR
|
||||||
|
|
||||||
|
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||||
|
|
||||||
|
cp -r dump-db $BUILD_DIR/
|
||||||
|
rm -rf $BUILD_DIR/dump-db/node_modules
|
||||||
|
|
||||||
|
echo "Zipping mac arm64 electron distribution..."
|
||||||
|
|
||||||
|
VERSION=`jq -r ".version" package.json`
|
||||||
|
|
||||||
|
cd dist
|
||||||
|
|
||||||
|
rm trilium-mac-arm64-${VERSION}.zip
|
||||||
|
zip -r9 --symlinks trilium-mac-arm64-${VERSION}.zip trilium-mac-arm64
|
@ -7,9 +7,9 @@ then
|
|||||||
./bin/copy-trilium.sh $SRC_DIR
|
./bin/copy-trilium.sh $SRC_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Copying required mac binaries"
|
echo "Copying required mac x64 binaries"
|
||||||
|
|
||||||
cp -r bin/better-sqlite3/mac-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
cp -r bin/better-sqlite3/mac-x64-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
||||||
|
|
||||||
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
|
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
|
||||||
|
|
||||||
|
@ -13,11 +13,14 @@ cp -r $SRC_DIR ./dist/trilium-linux-x64-src
|
|||||||
cp -r $SRC_DIR ./dist/trilium-linux-x64-server
|
cp -r $SRC_DIR ./dist/trilium-linux-x64-server
|
||||||
cp -r $SRC_DIR ./dist/trilium-windows-x64-src
|
cp -r $SRC_DIR ./dist/trilium-windows-x64-src
|
||||||
cp -r $SRC_DIR ./dist/trilium-mac-x64-src
|
cp -r $SRC_DIR ./dist/trilium-mac-x64-src
|
||||||
|
cp -r $SRC_DIR ./dist/trilium-mac-arm64-src
|
||||||
|
|
||||||
bin/build-win-x64.sh DONTCOPY
|
bin/build-win-x64.sh DONTCOPY
|
||||||
|
|
||||||
bin/build-mac-x64.sh DONTCOPY
|
bin/build-mac-x64.sh DONTCOPY
|
||||||
|
|
||||||
|
bin/build-mac-arm64.sh DONTCOPY
|
||||||
|
|
||||||
bin/build-linux-x64.sh DONTCOPY
|
bin/build-linux-x64.sh DONTCOPY
|
||||||
|
|
||||||
bin/build-server.sh DONTCOPY
|
bin/build-server.sh DONTCOPY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user