【问题标题】:NSIS loading an NPAPI pluginNSIS 加载一个 NPAPI 插件
【发布时间】:2011-07-27 15:12:05
【问题描述】:

我有一个 NPAPI 插件!

如何使用 NSIS 安装程序注册 dll?我试过了,编译器给出了错误:

 # define the name of the installer
 outfile "simple installer.exe"

 RegDLL plugin.dll

 sectionEnd

错误是:

错误:命令 RegDLL 在节或函数之外无效 第 4 行的脚本“C:\Program Files\NSIS\test01.nsi”出错——正在中止创建过程

【问题讨论】:

    标签: nsis


    【解决方案1】:

    RegDLL 用于导出 DllRegisterServer 函数的 DLL。它通常由 COM DLL 使用。

    您可以使用 NSIS registry functions 向 firefox 注册插件:

    !define pluginid "@example.com/myplugin"
    Outfile "setup.exe"
    InstallDir "$programfiles\myplugin"
    
    Page Instfiles
    
    Section
    SetOutPath $InstDir
    File "myplugin.dll"
    
    WriteRegStr HKLM "SOFTWARE\MozillaPlugins\${pluginid}" "Path" "$InstDir\myplugin.dll"
    WriteRegStr HKLM "SOFTWARE\MozillaPlugins\${pluginid}" "ProductName" "my plugin"
    WriteRegStr HKLM "SOFTWARE\MozillaPlugins\${pluginid}" "Description" "my useless plugin"
    ;Add Vendor,Version etc...
    SectionEnd
    

    ..但如果您的 NPAPI 插件实际上有一个 DllRegisterServer 导出,您可以使用 RegDLL...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多