An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:hammer: Update kernel building script
Danielf2e658712073
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex 8eacb004f6..2ff13fd19e 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -41,8 +41,8 @@ Note: In the development environment, the kernel process will not be automatical### Desktop* `cd kernel`-* Windows: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`-* Linux/macOS: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel"`+* Windows: `go build -tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`+* Linux/macOS: `go build -tags "fts5" -o "../app/kernel/SiYuan-Kernel"`* `cd ../app/kernel`* Windows: `./SiYuan-Kernel.exe --wd=.. --mode=dev`* Linux/macOS: `./SiYuan-Kernel --wd=.. --mode=dev`@@ -50,14 +50,14 @@ Note: In the development environment, the kernel process will not be automatical### iOS* `cd kernel`-* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/`+* `gomobile bind -tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/`* https://github.com/siyuan-note/siyuan-ios### Android* `cd kernel`* `set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8`-* `gomobile bind --tags fts5 -ldflags "-s -w" -v -o kernel.aar -target=android/arm64 -androidapi 26 ./mobile/`+* `gomobile bind -tags fts5 -ldflags "-s -w" -v -o kernel.aar -target=android/arm64 -androidapi 26 ./mobile/`* https://github.com/siyuan-note/siyuan-android### Harmonydiff --git a/.github/CONTRIBUTING_zh_CN.md b/.github/CONTRIBUTING_zh_CN.mdindex 34723b473b..e4b189f809 100644--- a/.github/CONTRIBUTING_zh_CN.md+++ b/.github/CONTRIBUTING_zh_CN.md@@ -41,8 +41,8 @@ NPM 镜像:### 桌面端* `cd kernel`-* Windows: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`-* Linux/macOS: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel"`+* Windows: `go build -tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`+* Linux/macOS: `go build -tags "fts5" -o "../app/kernel/SiYuan-Kernel"`* `cd ../app/kernel`* Windows: `./SiYuan-Kernel.exe --wd=.. --mode=dev`* Linux/macOS: `./SiYuan-Kernel --wd=.. --mode=dev`@@ -50,14 +50,14 @@ NPM 镜像:### iOS* `cd kernel`-* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/`+* `gomobile bind -tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/`* https://github.com/siyuan-note/siyuan-ios### Android* `cd kernel`* `set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8`-* `gomobile bind --tags fts5 -ldflags "-s -w" -v -o kernel.aar -target=android/arm64 -androidapi 26 ./mobile/`+* `gomobile bind -tags fts5 -ldflags "-s -w" -v -o kernel.aar -target=android/arm64 -androidapi 26 ./mobile/`* https://github.com/siyuan-note/siyuan-android### Harmonydiff --git a/.github/workflows/cd.yml b/.github/workflows/cd.ymlindex 8219f46837..242b0634bb 100644--- a/.github/workflows/cd.yml+++ b/.github/workflows/cd.yml@@ -213,7 +213,7 @@ jobs:working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}/kernel- name: Building Kernel- run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args_prefix }} github.com/${{ github.repository }}/kernel/util.${{ matrix.config.build_args_suffix }}"+ run: go build -tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args_prefix }} github.com/${{ github.repository }}/kernel/util.${{ matrix.config.build_args_suffix }}"working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}/kernelenv:GO111MODULE: ondiff --git a/Dockerfile b/Dockerfileindex fad8d13899..6b176f34da 100644--- a/Dockerfile+++ b/Dockerfile@@ -37,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/gADD kernel/ .RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg \- go build --tags fts5 -v -ldflags "-s -w"+ go build -tags fts5 -v -ldflags "-s -w"FROM alpine:latestLABEL maintainer="Liang Ding<[email protected]>"diff --git a/kernel/harmony/build-win.sh b/kernel/harmony/build-win.shindex d8846b954c..d8b9683589 100755--- a/kernel/harmony/build-win.sh+++ b/kernel/harmony/build-win.sh@@ -24,4 +24,4 @@ export GOARCH=amd64export CGO_CFLAGS="-I${LOG_ADAPTOR_HOME}/include -g -O2 `$LLVMCONFIG --cflags` --target=x86_64-linux-ohos --sysroot=$OHOS_NDK_HOME/native/sysroot"export CGO_LDFLAGS="--target=x86_64-linux-ohos -fuse-ld=lld -L${LOG_ADAPTOR_HOME}/dist/x86_64"-go build --tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so .+go build -tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so .diff --git a/kernel/harmony/build.sh b/kernel/harmony/build.shindex 290c2998d8..c4b26c2e87 100755--- a/kernel/harmony/build.sh+++ b/kernel/harmony/build.sh@@ -24,5 +24,5 @@ export GOARCH=arm64export CGO_CFLAGS="-I${LOG_ADAPTOR_HOME}/include -g -O2 `$LLVMCONFIG --cflags` --target=aarch64-linux-ohos --sysroot=$OHOS_NDK_HOME/native/sysroot"export CGO_LDFLAGS="--target=aarch64-linux-ohos -fuse-ld=lld -L${LOG_ADAPTOR_HOME}/dist/arm64-v8a"-go build --tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so .-#go build --tags fts5 -buildmode=c-shared -v -o libkernel.so .+go build -tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so .+#go build -tags fts5 -buildmode=c-shared -v -o libkernel.so .diff --git a/scripts/darwin-build.sh b/scripts/darwin-build.shindex fd59c1237d..1de95e9e1e 100755--- a/scripts/darwin-build.sh+++ b/scripts/darwin-build.sh@@ -70,13 +70,13 @@ if [[ "$TARGET" == 'amd64' || "$TARGET" == 'all' ]]; thenechoecho 'Building Kernel 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" .fiif [[ "$TARGET" == 'arm64' || "$TARGET" == 'all' ]]; thenechoecho 'Building Kernel 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" .fiechodiff --git a/scripts/linux-build.sh b/scripts/linux-build.shindex d0d85aa6a6..6f514a4ee2 100755--- a/scripts/linux-build.sh+++ b/scripts/linux-build.sh@@ -71,14 +71,14 @@ if [[ "$TARGET" == 'amd64' || "$TARGET" == 'all' ]]; thenecho 'Building Kernel amd64'export GOARCH=amd64export CC=~/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc- go build -buildmode=pie --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .+ go build -buildmode=pie -tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .fiif [[ "$TARGET" == 'arm64' || "$TARGET" == 'all' ]]; thenechoecho 'Building Kernel arm64'export GOARCH=arm64export CC=~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc- go build -buildmode=pie --tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .+ go build -buildmode=pie -tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .fiechodiff --git a/scripts/win-build.bat b/scripts/win-build.batindex 5fde82d189..402ce86983 100755--- a/scripts/win-build.bat+++ b/scripts/win-build.bat@@ -101,7 +101,7 @@ if defined BUILD_AMD64 (echo.echo Building Kernel amd64set GOARCH=amd64- go build --tags fts5 -v -o "%PROJECT_ROOT%\app\kernel\SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .+ go build -tags fts5 -v -o "%PROJECT_ROOT%\app\kernel\SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .if errorlevel 1 (exit /b %errorlevel%)@@ -112,7 +112,7 @@ if defined BUILD_ARM64 (set GOARCH=arm64@REM if you want to build arm64, you need to install aarch64-w64-mingw32-gccset CC="D:/Program Files/llvm-mingw-20240518-ucrt-x86_64/bin/aarch64-w64-mingw32-gcc.exe"- go build --tags fts5 -v -o "%PROJECT_ROOT%\app\kernel-arm64\SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .+ go build -tags fts5 -v -o "%PROJECT_ROOT%\app\kernel-arm64\SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .if errorlevel 1 (exit /b %errorlevel%)