-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(bundler/nsis): use uninstallstring to find wix installation #7326
Conversation
could you please rebase your PR and target |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will also need to sign your commits, otherwise I won't be able to merge the PR
ClearErrors | ||
ReadRegStr $2 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" "UninstallString" | ||
Push $2 | ||
Call GetFirstStrPart | ||
Pop "$R0" | ||
StrCmp $R0 "MsiExec.exe" 0 wix_done | ||
StrCpy $R7 "wix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a custom function, there is built-in functions https://nsis.sourceforge.io/StrFunc to manipulate strings
So add at the top
!include "StrFunc.nsh"
${StrCase}
${StrLoc}
and then
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" "UninstallString"
${StrCase} $R1 $R0 "L"
${StrLoc} $R0 $R1 "msiexec" ">"
StrCmp $R0 0 0 wix_done
StrCpy $5 "wix"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unicode true
SetCompressor /SOLID lzma
I need to move these two lines to the head of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why so?
Signed-off-by: luofei <luoffei@outlook.com>
Signed-off-by: luofei <luoffei@outlook.com>
Thank you |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information