From 8460251090e2fa5c95ba805031e8466eac557908 Mon Sep 17 00:00:00 2001 From: zyj <18107291228@163.com> Date: Wed, 26 Nov 2025 18:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/windows/Taskfile.yml | 2 +- build/windows/nsis/project.nsi | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/build/windows/Taskfile.yml b/build/windows/Taskfile.yml index 36ff667..efdec3c 100644 --- a/build/windows/Taskfile.yml +++ b/build/windows/Taskfile.yml @@ -55,7 +55,7 @@ tasks: cmds: # Create the Microsoft WebView2 bootstrapper if it doesn't exist - wails3 generate webview2bootstrapper -dir "{{.ROOT_DIR}}/build/windows/nsis" - - makensis -DARG_WAILS_{{.ARG_FLAG}}_BINARY="{{.ROOT_DIR}}/{{.BIN_DIR}}/{{.APP_NAME}}.exe" project.nsi + - makensis -DARG_WAILS_{{.ARG_FLAG}}_BINARY="{{.ROOT_DIR}}\{{.BIN_DIR}}\{{.APP_NAME}}.exe" project.nsi vars: ARCH: '{{.ARCH | default ARCH}}' ARG_FLAG: '{{if eq .ARCH "amd64"}}AMD64{{else}}ARM64{{end}}' diff --git a/build/windows/nsis/project.nsi b/build/windows/nsis/project.nsi index 894881c..3efecc1 100644 --- a/build/windows/nsis/project.nsi +++ b/build/windows/nsis/project.nsi @@ -88,6 +88,27 @@ Section !insertmacro wails.files + ; Copy config file + File "..\..\..\config.yaml" + + ; Copy folders + SetOutPath $INSTDIR\data + File /r /x .gitkeep "..\..\..\data\*.*" + + SetOutPath $INSTDIR\install + File /r "..\..\..\install\*.*" + + SetOutPath $INSTDIR\plugin + File /r "..\..\..\plugin\*.*" + + SetOutPath $INSTDIR\site-dist + File /r /x .gitkeep "..\..\..\site-dist\*.*" + + SetOutPath $INSTDIR\user-data + File /r "..\..\..\user-data\*.*" + + SetOutPath $INSTDIR + CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}" CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"