olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.7k stars 226 forks source link

How to run manuskript from source code on android #1280

Open kingsuper195 opened 5 months ago

kingsuper195 commented 5 months ago

You will need to run on Termux and use a VNC Client to access:

  1. Install termux https://github.com/termux/termux-app?tab=readme-ov-file#installation
  2. Open termux and run:
    pkg install python3 pyqt5 clang libxml2 libxslt x11-repo tigervnc git xfce4
    pip install cython
    pip install lxml
    git clone https://github.com/olivierkes/manuskript.git
  3. MDEditView uses QNetworkAccessManager in the ImageToolTip class, which hangs on my phone. So I chose to stub it out:

    nano ./manuskript/ui/views/MDEditView.py

    In class ImageToolTip, comment out the line: manager = QNetworkAccessManager() and then in ImageToolTip.fromUrl, add, as the first statement: return

  4. Press Ctrl+X, then type Y and press Enter to save and exit
  5. Run vncserver
  6. Install a vnc client such as rvnc viewer
  7. Open the vnc client and connect to localhost:1 or localhost:2, depending on what vncserver reports
  8. Now, you should be able to open a terminal and run cd manuskript && ./bin/manuskript

More details on running Termux and a graphical environment can be found at https://wiki.termux.com/wiki/Graphical_Environment

kingsuper195 commented 5 months ago

Also, while researching pyqt on android I found two other methods. I have not been able to try them because they take up too much space. They are pyqtdeploy and pyodide with pyqt. Pyodide actually builds for web, but could then be packaged as a web app.

kingsuper195 commented 4 months ago

Also after much more research, I discovered termux-x11 which provides screen size fixes and touch emulation. It can be used in stead of vnc viewer.