[英]nsis - load plugin dll
I maked ASetup.exe file. 我制作了ASetup.exe文件。
The structure of the directory is shown below. 目录的结构如下所示。
I added !addplugindir ".\\plugins"
in the ASetup.nsi file to use the plugin I created(B.dll). 我在ASetup.nsi文件中添加了
!addplugindir ".\\plugins"
,以使用我创建的插件(B.dll)。
The B.dll file will generate a .txt file when run the setup file. 运行安装文件时,B.dll文件将生成一个.txt文件。
On my local pc, the .txt file is created normally. 在我的本地PC上,通常会创建.txt文件。
However, when I run setup file in vm, .txt file is not created. 但是,当我在vm中运行安装文件时,不会创建.txt文件。
I think the plugin (B.dll) file is not working properly. 我认为插件(B.dll)文件无法正常工作。
Do I have to add another command instead of !addplugindir
? 我是否必须添加另一个命令而不是
!addplugindir
?
!addplugindir
is a compile-time command and just adds the specified directory to the list of directories searched by MakeNSIS when you execute a plug-in command. !addplugindir
是一个编译时命令,当您执行插件命令时,只会将指定目录添加到MakeNSIS搜索的目录列表中。
Assuming 假设
Section
!addplugindir ".\plugins"
B::MyPluginFunction
SectionEnd
compiles correctly then the issue is not with NSIS, you have to debug MyPluginFunction
to figure out why it fails on other systems. 编译正确,则问题出在NSIS上,您必须调试
MyPluginFunction
才能弄清楚为什么它在其他系统上失败。
Perhaps CreateFile
fails if the file does not exist? 如果文件不存在,
CreateFile
可能会失败? Invalid file path? 无效的文件路径?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.