chrome 扩展从本地服务器自动更新
我为我工作的公司创建了一个 chrome 扩展,并希望将更新发布到办公网络内的本地服务器。 我已阅读http://code.google.com/chrome/extensions/autoupdate.html< /a>,但无济于事。
manifest.json
{
"name": "My Helper",
"version": "1.0",
"description": "desc",
"omnibox": { "keyword" : "bla" },
"update_url": "\\\\serverName\\Dir\\updates.xml",
"background_page" : "background.html",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"permissions":
["tabs"]
}
updates.xml
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='abpjmfcmljpfhjpalecklgnndibgnjmp'>
<updatecheck codebase='\\serverName\Dir\my_helper.crx' version='1.0' />
</app>
</gupdate>
现在,在进行一些更改后,我执行以下操作:
- 将 manifest.json 中的版本更新为 1.1
- 更新updates.xml 中的版本为 1.1
- 打包扩展,指定保存源文件和 pem 文件的目录。
- 将新的 crx 文件和新的 updates.xml 文件发布到
\\serverName\Dir\
- 转到网络上的另一台计算机,然后单击立即在 Chrome 的扩展程序窗口中更新扩展程序。
->什么也没发生。
问题是 - 如何从本地网络上的共享服务器自动更新扩展?
PS 我很确定这不是权限问题。我已确保可以从此网络上的所有客户端访问 \\serverName\Dir\
。
I have created a chrome extension for the company I work for, and want to post updates to a local server within the office network.
I have read http://code.google.com/chrome/extensions/autoupdate.html, but to no avail.
manifest.json
{
"name": "My Helper",
"version": "1.0",
"description": "desc",
"omnibox": { "keyword" : "bla" },
"update_url": "\\\\serverName\\Dir\\updates.xml",
"background_page" : "background.html",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"permissions":
["tabs"]
}
updates.xml
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='abpjmfcmljpfhjpalecklgnndibgnjmp'>
<updatecheck codebase='\\serverName\Dir\my_helper.crx' version='1.0' />
</app>
</gupdate>
Now, after I make some changes, I do the following:
- Update the version in manifest.json to 1.1
- Update the version in updates.xml to 1.1
- Pack the extension, specifying the directory which holds the source files and the pem file.
- Post the new crx file and the new updates.xml file to
\\serverName\Dir\
- Go to another computer on the network, and click update extensions now in the Chrome's extensions window.
-> Nothing happens.
Question is - how to make an extension auto-update from a shared server on the local network?
P.S. I am pretty sure this is not a permissions issue. I have made sure I can access \\serverName\Dir\
from all clients on this network.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AFAIK 不支持网络 URL。托管一个简单的 HTTP 服务器(有很多),然后直接链接到该服务器。
AFAIK Network URL's are not supported. Host a simple HTTP server (there are many out there), and link directly to that instead.
是的,您可以将更新放在一个实时但私有的服务器上,并带有一些可笑的子域或域名,如果您担心它公开,甚至可以进一步添加一个或两个随机目录名称
yep you could put the update on a live but private server with some ridiculous sub-domain or domain name and even further add a random dir name or two if your worried about it going public