Open Trilarion opened 6 years ago
Based on my experience and a little research last night, I see three options that could work for our use case:
App Bundles macOS apps are distributed as packages, which are directories that behave like files for normal users. The directories contain all of the code and resources required to run the program, so the user simply drags the package into their Applications folder and it's installed. Double-clicking the package launches the program. Building the bundle is a matter of organizing the code and resources (this would include a copy of Qt and a Python interpreter, along with the libraries used) and adding a few meta-data files. The result could be downloaded as a zip file or disk image and no further installation is required. Automation isn't hard--I think it would just be a build script of some sort that assembles the package and then the result can be hosted on GitHub or elsewhere.
Homebrew Tap Homebrew is a third-party package manager used by some Mac users that gives access to programs and utilities not included with macOS. It is an alternative to (and usually considered exclusive with) Macports, and I think fink
is another but I don't hear much about it anymore. Homebrew packages are "recipes" written in Ruby that download and install software all needed dependencies. Users can connect to external repositories called "taps" that are maintained outside of the core repository (usually they are just GitHub repos) and install software from those as well, and it integrates with the existing dependency structure.
Do it all within Python Currently, all requirements for this project can be satisfied with pip
, so a user with Python3 could install everything with by invoking pip
. The package would have to be uploaded to the Python Packaging Index each time there was an update, which would make it available for pip
to download.
pip
is not good with updates)pip
and hopefully venv
. This shouldn't be too hard to automate in a shell script, though.My opinion on this is that Option 1 would be the best experience in the end (no external tools, no command line), Option 2 is the best as long as the game is under development (updating is easy), but Option 3 would be the most straightforward solution in that it's cross-platform and not as complicated as the other two.
Thanks for the overview. The game is alread on the Python package index (https://pypi.python.org/pypi/imperialism-remake), however not the latest version. The aim would rather be something more automatic like your option 1.
Your option 1 corresponds to a dmg file, right? How would updating/installing a different version work with these?
In general I think that the average user should get an automatic binary package, that works right out of the box (for both, Windows and Mac). The PyPi version is plattform independent and for the somewhat savy user who has Python already installed, and the Github source code repository is for developers.
Correct, most of the time the app bundles are packaged on a .dmg image file, but it's not necessary.
I'm not sure if it's possible to update from within the program. The solution I think I see the most (even with professional software) is to download a completely fresh copy of the updated version and move it into the Applications folder. Since the apps have the same name, the user is prompted to overwrite the old one, and that's it. Saves and configuration files are usually kept in a different location (e.g., ~/Library/Application Support/imperialism_remake) so that data is not lost when the app is updated.
Okay, that an app bundle (including Python and the required modules) seems to have everything we want. A task would then to try to create an app bundle (see #12).
The goal is to have an easy-to-use package that installs or updates the game and its dependencies (mainly python and python packages) and makes starting the game easy. Additionally we need to automatize the package creation.
What are the available options? What are the pros and cons of them? How would one need to do for them?
Dependent issues: