chentianyu_hit
小狐狸
小狐狸
  • UID27745
  • 注册日期2009-01-12
  • 最后登录2009-04-17
  • 发帖数12
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:2041回复:2

疯了,HelloWorld也无法运行[已解决]

楼主#
更多 发布于:2009-01-13 19:40
报告无法找到脚本:
Firefox could not install the file at
file:///C:/Documents%20and%20Settings/Ranger_Chen/%E6%A1%8C%E9%9D%A2/te.xpi
because: Install script not found
为什么呢?、、是版本问题吗?。我看了好几个可以运行的扩展,它们的格式好像都和这差不多、、请高手指点

另外 http://ted.mielczarek.org/code/mozilla/extensionwiz/生成的扩展也是这个错误,
我的FF:3.0.5的版本
目录树如下:
<ext path>\
 install.rdf
 chrome.manifest
 chrome\
  content\
    sample.xul

文件内容如下:
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>sample@example.net</em:id>
    <em:version>1.0</em:version>
    <em:type>2</em:type>
  
    <!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.5</em:minVersion>
        <em:maxVersion>3.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
  
    <!-- Front End MetaData -->
    <em:name>sample</em:name>
    <em:description>A test extension</em:description>
    <em:creator>Your Name Here</em:creator>
    <em:homepageURL>http://www.example.com/</em:homepageURL>
  </Description>      
</RDF>

chrome.manifest
content     sample    chrome/content/
overlay chrome://browser/content/browser.xul chrome://sample/content/sample.xul

sample.xul
<?xml version="1.0"?>
<overlay id="sample"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <statusbar id="status-bar">
  <statusbarpanel id="my-panel" label="Hello, World"  />
 </statusbar>
</overlay>
附件名称/大小 下载次数 最后更新
ab_test.xpi (2KB)  216 2009-01-13 19:40
marffin
火狐狸
火狐狸
  • UID26524
  • 注册日期2008-10-04
  • 最后登录2012-10-17
  • 发帖数188
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2009-01-13 19:40
当然打不开装不上,你的xpi压缩包里面直接就是ab_test目录……

去掉这一层目录就可以了
chentianyu_hit
小狐狸
小狐狸
  • UID27745
  • 注册日期2009-01-12
  • 最后登录2009-04-17
  • 发帖数12
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2009-01-13 19:40
marffin:当然打不开装不上,你的xpi压缩包里面直接就是ab_test目录……

去掉这一层目录就可以了
回到原帖

谢谢、谢谢、、原来就这么一个小问题啊、、烦扰了我一个下午了
 
游客

返回顶部