|
I tried to cross compile my Qt project from Linux to Windows. It started, but then it crashed. So I gave up on that, and let someone compile it directly on Windows. Then there are no issues. I did not try Android there. Then I have another app that runs on Linux, Windows and Android using FreePascal/Lazarus rather than Qt. FreePascal is really great for building. You only need to set the search path, and then it finds all the files it needs (just sometimes it crashes when serializing the dependency graph, then you need to delete all object files and restart). Cross compiling from Linux to Windows works perfectly. FreePascal has an internal linker, so you do not need any other software for Windows. You do not need to deal with proprietary libraries, because there basically are no FreePascal libraries, especially no proprietary. Linux-Linux cross compilation is more complicated. I just got a new computer and my 32-bit build failed silently because I did not have 32-bit gtk dev files and crtbegin from gcc installed. Yesterday I tried to install them with apt, but the installation failed, because they were conflicting with the 64-bit gtk dev gir files. Then I set force override in apt, and the installation worked, and then FreePascal cross compiled correctly. However, today I noticed, apt had uninstalled Python, Mercurial, Tortoise-Hg and most TeXlive packages. There must be something very wrong with Ubuntu's multiarch support. There are three ways to run a Lazarus GUI on Android. First LAMW which has created a lot of FreePascal JNI wrappers around Android Views (and is far too complex for my liking); secondly Lazarus Customdrawn which draws all controls directly in FreePascal (and looks like it was designed to be Windows 98 compatible and crashed) and thirdly Qt, because Lazarus supports Qt as GUI backend (which probably works on Desktop, but I do not know anyone using it on Android). Hence, I compile my app as .so, export the data through JNI, and wrote a completely new GUI in Android Studio without using anything of Lazarus. Gradle does not need to know anything about FreePascal, it just copies the .so to the apk. But theoretically Lazarus is all you need. (Then I tried to submit my app to F-Droid, but they cannot include FreePascal/Lazarus apps, too complex build process) |