NSIS 从卸载程序调用插件函数

NSIS Calling Plugin functions from uninstaller

在我的 NSIS 安装程序中,我有 !include StrFunc.nsh 以及其他的,并在需要时调用 ${StrCase} 函数。

但我现在需要在我的卸载程序中调用 ${StrCase} 函数,但每次我尝试调用它时,它都无法编译。

问题是如何将插件导入我的卸载程序以便我可以引用它们的功能?

我试过 ${un.StrCase} 我也试过 !include un.StrFunc.nsh

但还是没有运气。

是否有人可以向我展示一个工作示例,以便我理解这些示例是如何工作的。

TIA 安迪

The documentation for StrFunc.nsh

3.2 How To Use Commands In Uninstall Sections and Functions


Commands with Uninstall Sections and Functions support have "Un" before the words inside curly brackets "{}".

Example:


${UnStrStr}

A complete example with both Install and Uninstall Commands: ------------------------------------------------------------

!include "StrFunc.nsh"

${StrStr} # Supportable for Install Sections and Functions

${UnStrStr} # Supportable for Uninstall Sections and Functions

Section

${StrStr} [=10=] "OK! Now what?" "wh"

SectionEnd

Section Uninstall

${UnStrStr} [=10=] "OK! Now what?" "wh"

SectionEnd