将木偶作为扩展安装到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第三方库


热门话题
雅加达。木卫一。WriteAbortedException:写入中止;JAVA木卫一。NotSerializableException   如果没有互联网连接,java“重启”应用程序   ant将我的Mac更新为最新的Java JDK时遇到的困难   java从边的文本文件创建网络   java多个枚举与一个枚举   使用XML进行JavaBean验证:字段上的多个相同约束   java Eclipse报告HTML警告以获得正确的(正如我假设的)代码   java使用Jackson从POJO数组生成JSON模式   在JTextPane java swing中填充行的rectange后无法与视图同步   如何编写Java字符串。格式化为ruby代码?   java如何使Hibernate标准只包含所需字段   在java中拆分字符串,更改字母和分组   mysql Java 1.8.0_60,MariaDB v10。0和mariadbjavaclient 1.2.2,“未找到合适的驱动程序”   java试图做一个简单的计算,结果不正确   javatomcat远程访问   java我安装了安卓 studio,创建了我的第一个项目,面对这个错误。。。我点击了所有链接,但什么都没发生   JavaSpring3。0注释   SwingJavaJLabel。setText()方法重载时不使用字符串