`
shuaigg.babysky
  • 浏览: 552281 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

Chrome和Firefox的xpi与crx加载第三方dll

 
阅读更多

Chrome上两个文件夹:

 

│  manifest.json

└─plugins

        npScreenGrab.dll

 

其中manifest.json如下:

 

 

{

  // Required

  "name": "Weibo Plugin For Chrome",

  "version": "1.0.0.6",

 

  // Recommended

  "description": "Weibo Screen Grab Plugin",

 

  // Add any of these that you need

  "minimum_chrome_version": "6",

  "plugins": [

    { "path": "plugins\\npScreenGrab.dll", "public": true }

  ]

}

 

为扩展打包的步骤:

  1. 访问如下URL进入扩展管理页面:
    chrome://extensions
  2. 如果开发人员模式边上有 + , 点击 + 以展开开发人员模式。
  3. 点击"打包扩展程序"按钮,会出现一个对话框。
  4. 在扩展程序根目录中填入你扩展所在的目录,如: c:myext. (你可以忽略其他项,第一次打包时你无需指定私钥。)
  5. 点击确定按钮。会生成两个文件: a .crx , 是一个真正的扩展文件,可以被安装。另一个 a .pem 文件, 是你的私钥文件



Firefox上的

│  install.rdf
└─plugins
        npScreenGrab.dll

install.rdf


<?xml version="1.0"?>



<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
    
    <em:id>{ba44a371-4848-35c0-864e-6abde8750a7d}</em:id>
    <em:unpack>true</em:unpack>
    <em:version>1.0.0.6</em:version>

    
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>4.0</em:minVersion>
        <em:maxVersion>*.*.*</em:maxVersion>
      </Description>
    </em:targetApplication>

    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>

    <em:name>Weibo ScreenGrab</em:name>
    <em:description>微博截屏助手</em:description>
    <em:creator>Weibo</em:creator>
    <em:homepageURL>http://weibo.com</em:homepageURL>

  </Description>
</RDF>


然后将文件夹压缩成zip,改名为xpi,如果需要进行签名的话,需要参考文档

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics