achille-martin / pyqt-crom

Create cross-platform apps (Android for now) using only Python and the Qt Framework (PyQt5 for now).
MIT License
25 stars 2 forks source link

Research: advertise the project #22

Open achille-martin opened 8 months ago

achille-martin commented 8 months ago

This issue focuses on researching ways to advertise the project and eventually get feedback to improve it.

The obvious ways to share the project:

Advanced ways to share the project:

Ways to get rewarded for the project:

Ways to improve shareability:

achille-martin commented 7 months ago

Show HN displayed below for memory:

Title: Show HN: create cross-platform apps from PyQt5 using pyqtdeploy

URL: https://github.com/achille-martin/simple-pyqt5-android-app

Text: Hi everyone,

I am the developer who started the "simple-pyqt5-android-app" repo.

The main reason for starting this repo is so that I can create cross-platform apps (i.e. including mobile apps), only using Python (and especially PyQt5). I have been dealing with Qt a bit and I found that it was the most suited tool to create multi-platform applications and GUI {Graphical User Interface} programs thanks to its versatily and great support.

After researching existing tools, I realised that there was no tool that would help me generate cross-platform apps from a single python source code (written with PyQt5). I would often get redirected to Pyside and its PyInstaller (https://doc.qt.io/qtforpython-5/deployment-pyinstaller.html#), but it didn't seem to support all mobile platforms well and its compilation process looked rather daunting. I would also get redirected to Kivy and Beeware, but they are not relying on the Qt framework so I moved away from these. Eventually, I found pyqtdeploy (https://pypi.org/project/pyqtdeploy/) which is a tool to deploy PyQt applications (as explained here: https://riverbankcomputing.com/software/pyqtdeploy/intro).

After experimenting with pyqtdeploy, I realised that the public support for this tool was almost inexistant. Even blogs and github repos do not explain how to use this tool. One reason might be that pyqtdeploy is more aimed at commercial applications, but I think it is a great tool to develop prototype apps and share them freely as open-source projects (under the GPL {General Public License} restrictions). Anyway, I decided to start the creation of a repo that would show people how to use pyqtdeploy (which I have not developed), and here I am.

The title of the repo feels like it is targeting android apps only, but the aim is to be able to also create iOS apps and Win / Linux apps from the same python source code.

Currently, I have created/found examples on how to add the following capabilities to your prototype apps:

If you wish to setup your Linux machine (or your Virtual Machine environment) to give a try with the repo, I can only recommend you to follow the README.

Feedback on the topic is also very welcomed :)

Publication: https://news.ycombinator.com/item?id=38042045

achille-martin commented 5 months ago

StackOverflow answer for memory:

Link:

https://stackoverflow.com/questions/68231530/pyqtdeploy-issue-with-how-to-proceed/77715214#77715214

Question:

I'm trying to be able to deploy a project that I made with pyqt5 using pyqtdeploy, I read the whole documentation, which sucks (sorry for the language), I even read the 1.3.2 version, and I still don't know how to make it work. I installed all the packages (using pip and the downloadable files for the demo) and run the setup, but I don't see the executable pyqtdeploy mentinned in the documentation, and the build-demo.py does not work.

I'm on Windows by the way,

Answer:

I have decided to create a github repo containing a tutorial to create a simple PyQt5 cross-platform app. The main toold used in the repo is pyqtdeploy.

Here is the link to the Github repo: https://github.com/achille-martin/pyqt-crom.

At the moment I can create a VM inside of Windows to setup an Ubuntu machine and generate an Android app from a simple PyQt5 script.

achille-martin commented 3 months ago

Qt forum for memory:

Link:

https://forum.qt.io/topic/130800/build-pyside6-application-for-android

Question:

G GuillaumeLandry 3 Oct 2021, 15:58

Hi !

I know this is a hard topic, some ideas have already been covered in the past, but maybe an update is necessary ?

I've built a PySide6 application using Qt/QML, Python, OpenCV and some other Python libraries. I am exploring the possibilities to build the current working application on Android. Here are some options that I've already seen, tried, but didn't go so deep yet:

Buildozer (only for Kivy apps?)
Python-for-Android (p4a)
Pydroid
Building everything independantly and packaging it in any way?
Using Android Studio and/or Qt Quick Designer to automate some processes and then build directly for Android?

Most of the ways to build on Android need to go through a Linux environment, I'm using Windows Subsystem fo Linux (WSL) with a Ubuntu distribution to do so.

The heart of this post is: I'm lost in all of that, can someone clear up the process or give some cues to help unravel the ideas ?

Thanks a lot !

Answer:

Hi,

To complement WikiManiac's answer, I have recently re-discovered pyqtdeploy.

Although there is documentation online about pyqtdeploy, it is hard to figure out specific steps to set up the tool.

I have decided to update the documentation and upgrade a bit the tool on my side first.

If you wish to convert your PyQt5 apps into Android apps, follow the in-depth tutorial on https://github.com/achille-martin/pyqt-crom.

There is no official support for PyQt6 in my repo yet though. So please start with PyQt5 to build prototypes and I am expected to add support for PyQt6 later.