diff --git a/app/nsis/installer.nsh b/app/nsis/installer.nsh index 2f85fb3c7..5265bc98e 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 4577a4920..eade268e3 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 94327f08e..93898528e 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 c05c3dcad..d7780e1e9 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