将木偶作为扩展安装到FXOS设备上

marionette_extension的Python项目详细描述


木偶延长线

此存储库包含壁虎扩展形式的木偶,用于 使用FXOS设备。它包括一个安装脚本,您可以使用它, 如果您的电话通过ADB连接:

source install_marionette_extension.sh VERSION

如果版本是受支持的版本号,请选择1.3、1.4、2.0、2.1、2.2或2.5。

如果需要安装adb,请参见 https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Installing_ADB

目前支持FirefoxOS 1.3到2.5版。

python包

这也是“木偶扩展”python包。一旦你安装了这个 包,您将有权访问名为 安装您可以像这样使用的木偶:

marionette_extension --help

它将向您显示可用的安装选项。

如果您需要一个示例,这是如何在v1.3设备上安装木偶的方法:

marionette_extension --install 1.3

您还可以将木偶扩展包导入到python脚本中 并使用其安装功能通过脚本安装木偶。示例:

from marionette_extension import install
install(FXOS_VERSION, adb=ADBPATH)# Replace FXOS_VERSION with a supported version, and you may use ADBPATH to specify your adb path. If not specified, it will assume 'adb' is on the $PATH

如何添加新版本?

  1. 创建一个新文件夹,指示您的新壁虎版本

  2. hg clone https://hg.mozilla.org/mozilla-central/
    

从现在开始,请参考以前的木偶扩展版本的文件和文件夹结构

  1. 转到Mozilla Central文件夹并找到/testing/specialpowers(Mozilla Central),然后将它们复制到special-powers@mozilla.org文件夹中

  2. 将/testing/mariotte(mozilla central)中的所有.js文件复制到marionette@mozilla.org/chrome/content

  3. 将chrome.manifest和install.rdf从以前版本的木偶扩展复制到marionette@mozilla.org文件夹

  4. 将testing/mariotte/components/mariottecomponent.js(mozilla central)复制到/marionette@mozilla.org/components,并将其重命名为mariotteextensioncomponent.js

  5. 对Marionettextensioncomponent.js执行此操作:

    1. replace MARIONETTE_CONTRACTID value with “@mozilla.org/marionetteextension;1”
    2. change the profile-after-change listener to always start Marionette and not be dependent on build flags or command lines
    this.enabled = true;
    this.logger.info("marionette enabled via extension");
    // We want to suppress the modal dialog that's shown
    // when starting up in safe-mode to enable testing.
    if(Services.appinfo.inSafeMode){
    this.observerService.addObserver(this, "domwindowopened", false);}
    1. change the component name from MarionetteComponent to MarionetteExtensionComponent
  6. 请求将此设置放在pypi上以加快安装速度

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java ArrayOutOfBoundsException与org。日食swt。图样图像数据。布利特   java为什么Hazelcast CacheLoader类需要对所有客户端可见?   如何在java中迭代xml   java概要文件不是工件名称的一部分   java将多个Spring MVC应用程序映射到根Servlet   java SetContentView参数显示错误   java Cucumber类扩展步骤定义和挂钩   java如何动态添加JFace向导页面   amazon web services使用AWS Java SDK通过AWS API网关从S3下载文本文件   Android上的java软键盘   如何在Java中像在C#中一样创建泛型扩展方法?   使用JPA的java多列类型