Hey,
Great to see OpenLP moving to GitLab. Also, thanks for publishing the
beta on PyPI.
I have included an install script that installs OpenLP from there and
creates a desktop shortcut.
This could be a way to publish OpenLP in the future to spare users the
hassle of command line.
The main advantages compared to the PyInstaller based installers are:
The user is in control of the installed software versions including Python.
No 3rd party software has to be redistributed.
There is still a legal problem with the installers
that is documented at https://gitlab.com/openlp/openlp/issues/19.
The install script is not affected by this issue.
The desktop shortcut does not have the OpenLP icon on it because that
is not part
of the binary distribution (egg/wheel) that is generated by setuptools.
In case of its inclusion the pyshortcuts library can set it as shortcut icon.
#!/usr/bin/env python3
"""
This is an example installer for the OpenLP distribution on PyPI.
It installs the latest available versions of OpenLP and its dependencies.
The installation instruction for an average user can sound like this:
Please download the latest stable Python version from https://www.python.org/downloads/
and install it with the default settings.
Then download the latest stable VLC media player from https://www.videolan.org
and install it with the default settings.
Download the OpenLP installer script from (link to this file) and open it.
After the automated download and installation you will find a OpenLP launcher on your desktop.
A script for a production version could also install specific (frozen) versions for each package.
The installer script is known to run on Windows 7 (32/64 bit). It was not tested with macOS yet.
For Linux there are some preconditions (development libraries) because many native modules are
not published for Linux on PyPI. But users should be pointed to the distribution packages anyway.
"""
from os import path
from subprocess import run, CalledProcessError
from sys import executable
from sysconfig import get_path
OPENLP = path.join(get_path("scripts"), "openlp")
SHORTCUT = "from pyshortcuts import shortcut_cli; shortcut_cli()"
PIP = [executable, "-m", "pip", "install", "--disable-pip-version-check", "--pre",
"pyshortcuts", "OpenLP[agpl-pdf,darkstyle,mysql,odbc,postgresql,sword-bibles]"]
if __name__ == "__main__":
try:
run(PIP, check=True)
run([executable, "-c", SHORTCUT, "-g", "-n", "OpenLP", OPENLP], check=True)
except CalledProcessError:
input("Installation failed. Please get help in the OpenLP forum. Press any key to exit.")
_______________________________________________
openlp-dev mailing list
[email protected]
https://lists.openlp.io/mailman/listinfo/openlp-dev