mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Update build scripts
This commit is contained in:
parent
6f50032795
commit
5ec27681f9
3 changed files with 6 additions and 0 deletions
|
|
@ -18,10 +18,12 @@ export GO111MODULE=on
|
||||||
export GOPROXY=https://goproxy.io
|
export GOPROXY=https://goproxy.io
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
|
||||||
|
echo 'Building Kernel amd64'
|
||||||
export GOOS=darwin
|
export GOOS=darwin
|
||||||
export GOARCH=amd64
|
export GOARCH=amd64
|
||||||
go build --tags fts5 -v -o "../app/kernel-darwin/SiYuan-Kernel" -ldflags "-s -w" .
|
go build --tags fts5 -v -o "../app/kernel-darwin/SiYuan-Kernel" -ldflags "-s -w" .
|
||||||
|
|
||||||
|
echo 'Building Kernel arm64'
|
||||||
export GOOS=darwin
|
export GOOS=darwin
|
||||||
export GOARCH=arm64
|
export GOARCH=arm64
|
||||||
go build --tags fts5 -v -o "../app/kernel-darwin-arm64/SiYuan-Kernel" -ldflags "-s -w" .
|
go build --tags fts5 -v -o "../app/kernel-darwin-arm64/SiYuan-Kernel" -ldflags "-s -w" .
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,12 @@ export GO111MODULE=on
|
||||||
export GOPROXY=https://goproxy.io
|
export GOPROXY=https://goproxy.io
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
|
||||||
|
echo 'Building Kernel amd64'
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
export GOARCH=amd64
|
export GOARCH=amd64
|
||||||
go build --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" .
|
go build --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" .
|
||||||
|
|
||||||
|
echo 'Building Kernel arm64'
|
||||||
export GOARCH=arm64
|
export GOARCH=arm64
|
||||||
export CC=~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
|
export CC=~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
|
||||||
go build --tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel-arm64" -ldflags "-s -w" .
|
go build --tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel-arm64" -ldflags "-s -w" .
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ cd kernel
|
||||||
@REM you can use `go generate` instead (need add something in main.go)
|
@REM you can use `go generate` instead (need add something in main.go)
|
||||||
goversioninfo -platform-specific=true -icon=resource/icon.ico -manifest=resource/goversioninfo.exe.manifest
|
goversioninfo -platform-specific=true -icon=resource/icon.ico -manifest=resource/goversioninfo.exe.manifest
|
||||||
|
|
||||||
|
echo 'Building Kernel amd64'
|
||||||
set GOOS=windows
|
set GOOS=windows
|
||||||
set GOARCH=amd64
|
set GOARCH=amd64
|
||||||
go build --tags fts5 -v -o "../app/kernel/SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
|
go build --tags fts5 -v -o "../app/kernel/SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
|
||||||
|
|
@ -34,6 +35,7 @@ if errorlevel 1 (
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
|
||||||
|
echo 'Building Kernel arm64'
|
||||||
set GOARCH=arm64
|
set GOARCH=arm64
|
||||||
@REM if you want to build arm64, you need to install aarch64-w64-mingw32-gcc
|
@REM if you want to build arm64, you need to install aarch64-w64-mingw32-gcc
|
||||||
set CC="D:/Program Files/llvm-mingw-20240518-ucrt-x86_64/bin/aarch64-w64-mingw32-gcc.exe"
|
set CC="D:/Program Files/llvm-mingw-20240518-ucrt-x86_64/bin/aarch64-w64-mingw32-gcc.exe"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue