siyuan-unlock/scripts/darwin-build.sh
appdev 2ad3e8f705 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	README.md
#	app/appx/AppxManifest.xml
#	app/package.json
#	kernel/util/working.go
2024-12-17 14:13:40 +08:00

38 lines
757 B
Bash
Executable File

#!/bin/bash
echo 'Building UI'
cd app
npm install && npm run build
cd ..
echo 'Cleaning Builds'
rm -rf app/build
rm -rf app/kernel-darwin
rm -rf app/kernel-darwin-arm64
echo 'Building Kernel'
cd kernel
go version
export GO111MODULE=on
export GOPROXY=https://mirrors.aliyun.com/goproxy/
export CGO_ENABLED=1
echo 'Building Kernel amd64'
export GOOS=darwin
export GOARCH=amd64
go build --tags fts5 -v -o "../app/kernel-darwin/SiYuan-Kernel" -ldflags "-s -w" .
echo 'Building Kernel arm64'
export GOOS=darwin
export GOARCH=arm64
go build --tags fts5 -v -o "../app/kernel-darwin-arm64/SiYuan-Kernel" -ldflags "-s -w" .
cd ..
echo 'Building Electron App amd64'
cd app
npm run dist-darwin
echo 'Building Electron App arm64'
npm run dist-darwin-arm64
cd ..