summaryrefslogtreecommitdiff
path: root/xmake/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-17 22:53:23 +0800
committerruki <[email protected]>2023-11-17 22:53:23 +0800
commit65d2bc2cad967c0de7304e00500d99ff13307d21 (patch)
tree8b28cd6f380c0df8d53068e2c335db8daecf37dd /xmake/scripts
parentcf3afe37b546efb93079fd6314c0769884ca0fb1 (diff)
fix makensis
Diffstat (limited to 'xmake/scripts')
-rw-r--r--xmake/scripts/xpack/nsis/makensis.nsi8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/scripts/xpack/nsis/makensis.nsi b/xmake/scripts/xpack/nsis/makensis.nsi
index ffcb39c7c..a1827f348 100644
--- a/xmake/scripts/xpack/nsis/makensis.nsi
+++ b/xmake/scripts/xpack/nsis/makensis.nsi
@@ -167,8 +167,8 @@ Function RMDirIfExists
fileDoesNotExist:
FunctionEnd
-Function unRMDirIfExists
-!define unRMDirIfExists '!insertmacro un.RMDirIfExistsCall'
+Function un.RMDirIfExists
+!define unRMDirIfExists '!insertmacro unRMDirIfExistsCall'
!macro unRMDirIfExistsCall _PATH
push '${_PATH}'
Call un.RMDirIfExists
@@ -297,7 +297,9 @@ Section "${PACKAGE_NAME} (required)" InstallExeutable
!macro AddReg RootKey
WriteRegStr ${RootKey} ${RegUninstall} "NoAdmin" "$NoAdmin"
WriteRegStr ${RootKey} ${RegUninstall} "DisplayName" "${PACKAGE_NSIS_DISPLAY_NAME}"
- WriteRegStr ${RootKey} ${RegUninstall} "DisplayIcon" '"$InstDir\${PACKAGE_BINDIR}\${PACKAGE_FILENAME}"' ; TODO
+ !if "${PACKAGE_NSIS_DISPLAY_ICON}" != ""
+ WriteRegStr ${RootKey} ${RegUninstall} "DisplayIcon" '"$InstDir\${PACKAGE_NSIS_DISPLAY_ICON}"'
+ !endif
WriteRegStr ${RootKey} ${RegUninstall} "Comments" "${PACKAGE_DESCRIPTION}"
WriteRegStr ${RootKey} ${RegUninstall} "Publisher" "${PACKAGE_COPYRIGHT}"
WriteRegStr ${RootKey} ${RegUninstall} "UninstallString" '"$InstDir\uninstall.exe"'