gpt4 book ai didi

android - mercurial如何在android上运行?

转载 作者:行者123 更新时间:2023-11-29 19:21:50 25 4
gpt4 key购买 nike

page文档运行旧版本 (1.8.4) 的 mercurial 但说

"(later versions need an unavaliable python module named grp)"

最佳答案

这是我使用 Ubuntu 16.04 机器和在 Windows 7 上运行的英特尔 64 位安卓模拟器,使用 mercurial 3.7.3

  1. 使用 Ubuntu 系统,遵循这些 instructions用于创建能够运行 hg 的 2.7 版 python。

  2. 将 python 复制到 android 设备到应用程序文件目录中(以便它可以执行)

    在 windows 主机上

    adb push python279.x86_64/sdcard

    adb -e 外壳

    在安卓设备上

    cd/data/user/0/$SOMEAPPDIR/文件

    cp -Rav/scard/python279.x86_64 .

    使python可执行

    chmod +x python279.x86_64/bin/python2.7

    设置一些env vars需要让python在android上运行

    导出 LD_LIBRARY_PATH=/data/user/0/$SOMEAPPDIR/files/python279.x86_64/lib

    导出 LD_PRELOAD=libffi.so:libbz2.so

    export PATH=$PATH:/data/user/0/$SOMEAPPDIR/files/python279.x86_64/bin

Python 现在应该可以在 python2.7 上运行了

enter image description here

  1. 在 Ubuntu 主机上构建 mercurial。

    download Mercurial 3.7.3

    uz mercurial-3.7.3.tar.gz

    cd mercurial-3.7.3 && make all

    HOME=$PWD/dist 进行安装

  2. 稍作修改

    cd dist/mercurial-3.7.3/dist/lib/python/mercurial

    rm *.so

    cp 纯/*.py .

    编辑 posix.py 并删除“import grp”行。

  3. 将mercurial复制到android设备上

    在 windows 主机上

    adb push dist/sdcard

    adb -e 外壳

    在安卓设备上

    cd/data/user/0/$SOMEAPPDIR/文件

    cp/sdcard/dist .

    别名 hg 以使其易于使用

    alias hg='python2.7/data/user/0/$SOMEAPPDIR/files/dist/bin/hg'

Hg 现在应该可以在 Android 设备上使用了。

甚至可以克隆远程存储库,但我还必须传递 --insecure 标志以绕过 ssl 错误。

enter image description here

关于android - mercurial如何在android上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42260876/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com