mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Support one-click addition of Microsoft Defender exclusions https://github.com/siyuan-note/siyuan/issues/13650
This commit is contained in:
parent
3d7baaba5f
commit
8ad7d6aae2
5 changed files with 8 additions and 7 deletions
|
|
@ -70,5 +70,3 @@ extraResources:
|
||||||
- from: "src/assets/fonts"
|
- from: "src/assets/fonts"
|
||||||
to: "appearance/fonts"
|
to: "appearance/fonts"
|
||||||
filter: "!**/{.DS_Store}"
|
filter: "!**/{.DS_Store}"
|
||||||
- from: "elevator/elevator-arm64.exe"
|
|
||||||
to: "elevator.exe"
|
|
||||||
|
|
@ -71,5 +71,3 @@ extraResources:
|
||||||
filter: "!**/{.DS_Store}"
|
filter: "!**/{.DS_Store}"
|
||||||
- from: "pandoc/pandoc-windows-amd64.zip"
|
- from: "pandoc/pandoc-windows-amd64.zip"
|
||||||
to: "pandoc.zip"
|
to: "pandoc.zip"
|
||||||
- from: "elevator/elevator-amd64.exe"
|
|
||||||
to: "elevator.exe"
|
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,6 @@
|
||||||
|
|
||||||
package model
|
package model
|
||||||
|
|
||||||
func AutoProcessMicrosoftDefender() {
|
func AddMicrosoftDefenderExclusion() (err error) {}
|
||||||
}
|
|
||||||
|
func AutoProcessMicrosoftDefender() {}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ func AddMicrosoftDefenderExclusion() (err error) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logging.LogInfof("current user is not admin, use elevator to add Windows Defender exclusion path [%s, %s]", installPath, util.WorkspaceDir)
|
logging.LogInfof("current user is not admin, use elevator to add Windows Defender exclusion path [%s, %s]", installPath, util.WorkspaceDir)
|
||||||
elevator := filepath.Join(util.WorkingDir, "elevator.exe")
|
elevator := filepath.Join(util.WorkingDir, "kernel", "elevator.exe")
|
||||||
if "dev" == util.Mode || !gulu.File.IsExist(elevator) {
|
if "dev" == util.Mode || !gulu.File.IsExist(elevator) {
|
||||||
elevator = filepath.Join(util.WorkingDir, "elevator", "elevator-"+runtime.GOARCH+".exe")
|
elevator = filepath.Join(util.WorkingDir, "elevator", "elevator-"+runtime.GOARCH+".exe")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@ cd ..
|
||||||
|
|
||||||
echo 'Building Electron App amd64'
|
echo 'Building Electron App amd64'
|
||||||
cd app
|
cd app
|
||||||
|
|
||||||
|
copy "elevator\elevator-amd64.exe" "kernel\elevator.exe"
|
||||||
|
copy "elevator\elevator-arm64.exe" "kernel-arm64\elevator.exe"
|
||||||
|
|
||||||
call pnpm run dist
|
call pnpm run dist
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue