0

我的 NSIS 脚本有问题,我尝试在其中用户通过使用文本框插入 ClientId 的自定义页面。

到目前为止我遇到的问题是我的编译器给了我这个错误:

无效命令:nsDialogs::Create Error in script "C:*Directory*\Installer.nsi" on line 35 -- 中止创建过程

我在脚本中包含了 nsDialogs.nsh 和 LogicLib.nsh。

!include nsDialogs.nsh
!include LogicLib.nsh

Var Dialog
Var Label
Var Text

Name "Installer"

OutFile "Installer.exe"

InstallDir $PROGRAMFILES\MyProject

RequestExecutionLevel admin

Page directory
Page custom nsDialogsPage nsDialogsPageLeave
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

Section Installer

SetOutPath $INSTDIR
File /r "*Release Folder*"
WriteUninstaller "uninstall.exe"

Call InstallService

SectionEnd

Function nsDialogsPage

    nsDialogs::Create 1018
    Pop $Dialog

    ${If} $Dialog == error
        Abort
    ${EndIf}

    ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
    Pop $Label

    ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
    Pop $Text

    nsDialogs::Show

FunctionEnd

当我尝试编译在 Examples/NSIS 中找到的示例脚本时,我得到了完全相同的错误。

包含文件确实存在,并且与编译器从中读取它们位于同一文件夹中。是否需要一个未包含在 NSIS 安装中的库文件?

谢谢

4

1 回答 1

1

在我看来,插件丢失了。确保插件目录中有一个 nsDialogs.dll ......

于 2014-05-06T16:22:22.817 回答