【问题标题】:Preserve executable bit for script in google chrome extension在 google chrome 扩展程序中保留脚本的可执行位
【发布时间】:2013-09-27 14:10:29
【问题描述】:

我正在开发一个 chrome 扩展。该扩展包含一个 NPAPI 插件。该插件使用 popen C++ 函数执行一个打包在扩展中的 python 脚本。在开发过程中一切运行良好。一旦我打包了扩展并安装了 crx 文件,就没有任何工作正常。我发现它是因为在安装过程中由 chrome 创建的解压扩展目录中的 python 脚本没有设置可执行位。一旦我继续设置它(chmod a+x script.py),一切都会按预期工作。

所以,我的问题是。如何在 chrome 扩展包中保留脚本文件的可执行位?

顺便说一句,我正在使用 OSX,这个 python 脚本只需要在扩展的 Mac/Linux 版本上运行,而不是 Windows。

【问题讨论】:

  • 为什么不python script.py
  • 好吧哇,不敢相信我没想到。谢谢。

标签: c++ python google-chrome google-chrome-extension posix


【解决方案1】:

为什么不做python script.py?

感谢 rsanchez:Preserve executable bit for script in google chrome extension

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-18
    • 1970-01-01
    • 2012-05-09
    • 2021-12-15
    • 2011-03-28
    • 1970-01-01
    • 2017-03-30
    • 2016-04-17
    相关资源
    最近更新 更多