Replies: 3 comments 1 reply
-
While this is a very interesting approach to deployment, I believe it comes with significant downsides. I will try to elaborate on what I mean. I see 2 major challenges with this approach: resource usage and support/usability. Resource usageLet's quickly sum up a few items: So, in order to install one app, the user would have to download upwards of 1Gb, install all these unneeded files, set them up and understand how to use them. This would be a very tough pill to swallow for most. And it doesn't stop there, which leads to the next point. Usability / SupportWhile for you as a seasoned IT specialist compiling a program might seem benign, think back to the last time you helped your parents to install a printer. Downloading and installing qt, a framework aimed at developers, using git, a tool for developers, and last but not least, compiling a program is outside of the scope of an end user. We cannot expect users to carry out this task. Users need to download an installer and call it a day. Don't underestimate the complexity of compiling a program for someone not involved in programming. Apart from that, imagine the complexity of designing an installer that installs and configures a complete development toolchain, as well as builds an application. For each of these applications there are hour long guides explaining how to set up each single one of them, let alone make them work together. The combination of these two factors lead to almost all software distribution happening based on binary packages. Think of downloading a windows Distributing binaries has some key advantages:
I completely agree with you there. But I believe it is very important to make one key distinction End user != DeveloperWe need to seperate these two domains. Git, cmake, Qt, compiling code, debugging, testing - these are developer responsibilites, our responsibilities. So what's the big idea then?We don't have the capacities to support all platforms. Luckily we can reach around 93 % of potential users by providing packages for Windows and MacOS. I am personally a big fan of Linux, so I would like to include a release for that as well. Which means we need 3 builds. Luckily, we are not the first ones who want to deploy a Qt application to these 3 environments, so we can use well-established tools: The idea behind these three different tools is fundamentally the same:
Step 2 can be very complex in the linux world, since every distribution has different versions of libraries, sometimes in different folders and sometimes under different names. For this reason, there have been a couple of projects aimed at making linux apps more I am currently leaning towards appimage as a suitable format. Please have a look at linuxdeployqt, which does a great job at explaining the process in not too many words. TL;DRThe target audience for this program is normal people. Managing a development toolchain and compiling the program themselves would hopelessly overwhelm them. Distributing binaries is the standard for software distribution and has many key benefits. While there is a lot to be said about how to get there, I believe a binary package should be the end goal. |
Beta Was this translation helpful? Give feedback.
-
While being a great concept there is a problem with this. When installing several pieces of software you are dealing with several licenses, each of which have to be accepted by the user. Qt itself for example has a rather complicated licensing structure, with LGPL, GPL and commercial options. I am not even sure about the legalities of distributing all these programs.
Let me emphasise again. I agree with this point. But I believe we need to separate the responsibilities here. Going back to your original proposal, this is how we should look at it: The users responsibility is clicking a button. That's it.
Python is an interpreted language, which means the user has to install it first as well, this would add even more complexity to the process. We would have to write a script to:
At any of these steps, errors can occur, which would then be ours to troubleshoot. This seems like a much taller order than learning how to create an application bundle.
This is because you are only compiling the program itself, the libraries it uses are already installed on your computer. Running the script as you are imagining it, installing python, git, cmake, a compiler, the qt framework, then compiling the app would take at least 10 minutes, probably longer. Significantly longer if you're not behind a fibre connection. Installing an app shouldn't take longer than installing an operating system. I could get a full desktop up and running in a VM before a script like that would finish. Reinventing the wheelIf everybody is doing something one way, it does not automatically mean it's the right way. But it normally is that way for a reason. Almost all software is distributed in binary packages. In the Linux world, software is distributed as source sometimes. However, always under the prerogative 'Here's the code. You do the compiling', making it the users responsibility to get the toolchain working. And even then, there is almost always a binary available as well (if the program is directed at an audience of normal users). On Windows I have not once seen a program even being distributed as source, on MacOs I have too little experience to say. Let me go out on a limb and rephrase this: All software not aimed at developers is distributed in binary packages. Allow me to challenge you to this: Name one cross-platform application that is being distributed the way you are suggesting.If you manage to find an example, I would be more than happy to take a look at it. Otherwise I feel like trying to reinvent the wheel is more trouble than going out and learning how to drive a car. |
Beta Was this translation helpful? Give feedback.
-
Proof of ConceptI created a package for windows and Linux as a proof-of-concept. I used windeployqt and tools provided by appimage for the Linux release. While the process is certainly not trivial, it is also nothing too daunting. I tested the packages on a clean install of windows and on live environments for Ubuntu 14.04, Xubuntu 1604, Ubuntu 18.04, Manjaro 20.01, openSuse Leap 15.2 and Fedora 33. None of these had any additional libraries, tools or other dependencies installed. They all worked effortlessly and out of the box in different distributions and desktop environments, even different OS's (with MacOs still to be tested), so I am confident that this would be a viable option for distribution. The only problem I encountered was on Ubuntu 14.04, but it has been end-of-life for almost a year at this point so I am not too concerned about that. The total archive is around 90Mb for the App Image and around 30Mb for the Windows package. While that's pretty OK I am sure this can still be trimmed. |
Beta Was this translation helpful? Give feedback.
-
Distribution Proposal
Due to inexperience with development and distribution of cross platform applications it is important to use as many widely-used, universal tools available. Inherently C++ is not a machine independent language. This means that to be sure that the program will work on all machines every user should build the program from source when they acquire it. This document will propose a way to ensure that the program will require as little architecture/os specific steps in order to work. The distribution environment can later evolve and become more "sophisticated" if needed. Primarily, git will be used as the main means of distribution.
Overview
All users will acquire an installer/wizard from the openPilotLog site which will perform all the necessary checks and operations in order for the program to work. The program acquisition has as a whole two phases. Building and Maintaining. A graphical representation of the distribution is as follows:
Building
For a Qt application the minimum requirements are:
The installer will clone the stable branch of the openPilotLog repository on the user's computer. After ensuring that the environment is sane and all requirements are met (Qt, compiler, git, c/qmake) it will build the program. If any prerequisite is not met the user will be prompted to resolve the issue if it is not possible. A successful installation means that the user has the following components on their machine.
Maintaining
Now that everything is setup the user can enjoy the application. Unless not already clear, Git will show its use in this section. Should any update be done to the stable branch of the application the user will be prompted through the app. From their perspective its as simple as clicking a button. On the background the repo is pulled, bringing the update to the user's computer and the updated modules are rebuilt. Depending on the scope of the update rebuilding can vary in time.
Roundup
The proposed distribution of openPilotLog will ensure that all users independant of OS or CPU architecture can acquire and use the app. Any problems that may arise stem from the development side of the application. From idiomatic (compiler specific) code to Qt version incompatibilities, these can be caught and fixed before they even get pushed to the stable branch. CI/CD can ensure that anything the users acquire is going to work on their machines.
Beta Was this translation helpful? Give feedback.
All reactions