Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674

Daniel657d6ee08cbe
diff --git a/app/nsis/installer.nsh b/app/nsis/installer.nsh
index 2f85fb3c7d..5265bc98ec 100644
--- a/app/nsis/installer.nsh
+++ b/app/nsis/installer.nsh
@@ -32,6 +32,7 @@ Caption "${PRODUCT_NAME} ${VERSION}"
!macro customInstall
RMDir /r "$PROFILE\AppData\Local\siyuan-updater"
+ nsExec::ExecToLog 'setx PATH "$INSTDIR;%PATH%"'
!macroend
!macro customUnInstall
diff --git a/scripts/darwin-build.sh b/scripts/darwin-build.sh
index 4577a4920e..eade268e3e 100755
--- a/scripts/darwin-build.sh
+++ b/scripts/darwin-build.sh
@@ -71,12 +71,14 @@ if [[ "$TARGET" == 'amd64' || "$TARGET" == 'all' ]]; then
echo 'Building Kernel amd64'
export GOARCH=amd64
go build -tags fts5 -o "../app/kernel-darwin/SiYuan-Kernel" -ldflags "-s -w" .
+ ln -f "../app/kernel-darwin/siyuan" "../app/kernel-darwin/SiYuan-Kernel"
fi
if [[ "$TARGET" == 'arm64' || "$TARGET" == 'all' ]]; then
echo
echo 'Building Kernel arm64'
export GOARCH=arm64
go build -tags fts5 -o "../app/kernel-darwin-arm64/SiYuan-Kernel" -ldflags "-s -w" .
+ ln -f "../app/kernel-darwin-arm64/siyuan" "../app/kernel-darwin-arm64/SiYuan-Kernel"
fi
echo
diff --git a/scripts/linux-build.sh b/scripts/linux-build.sh
index 94327f08e9..93898528e7 100755
--- a/scripts/linux-build.sh
+++ b/scripts/linux-build.sh
@@ -106,6 +106,7 @@ if [[ "$TARGET" == 'amd64' || "$TARGET" == 'all' ]]; then
export GOARCH=amd64
setup_cc amd64
go build -buildmode=pie -tags fts5 -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .
+ ln -f "../app/kernel-linux/siyuan" "../app/kernel-linux/SiYuan-Kernel"
fi
if [[ "$TARGET" == 'arm64' || "$TARGET" == 'all' ]]; then
echo
@@ -113,6 +114,7 @@ if [[ "$TARGET" == 'arm64' || "$TARGET" == 'all' ]]; then
export GOARCH=arm64
setup_cc arm64
go build -buildmode=pie -tags fts5 -o "../app/kernel-linux-arm64/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" .
+ ln -f "../app/kernel-linux-arm64/siyuan" "../app/kernel-linux-arm64/SiYuan-Kernel"
fi
echo
diff --git a/scripts/win-build.bat b/scripts/win-build.bat
index c05c3dcad4..d7780e1e9f 100755
--- a/scripts/win-build.bat
+++ b/scripts/win-build.bat
@@ -105,6 +105,7 @@ if defined BUILD_AMD64 (
if errorlevel 1 (
exit /b %errorlevel%
)
+ mklink /H "%PROJECT_ROOT%\app\kernel\siyuan.exe" "%PROJECT_ROOT%\app\kernel\SiYuan-Kernel.exe"
)
if defined BUILD_ARM64 (
echo.
@@ -116,6 +117,7 @@ if defined BUILD_ARM64 (
if errorlevel 1 (
exit /b %errorlevel%
)
+ mklink /H "%PROJECT_ROOT%\app\kernel-arm64\siyuan.exe" "%PROJECT_ROOT%\app\kernel-arm64\SiYuan-Kernel.exe"
)
if defined BUILD_AMD64 goto electron