Skip to content

Windows Install

s0600204 edited this page Aug 24, 2024 · 12 revisions

Installing LiSP on Windows (using MSys2)

Introduction

Installing Linux Show Player (LiSP) on Microsoft Windows is a fairly straightforward consideration - LiSP's dependencies are cross-platform, and it only requires minor modification to LiSP's source code to permit it to run.

That said, LiSP has dependencies that cannot be installed via pip/poetry, and so the first part of this guide addresses that. Whilst most of these dependencies are not actually needed to run LiSP itself, the functionality is somewhat lacking if they aren't installed (e.g. GStreamer is not needed for LiSP to run, however you won't be able to play any audio without it).

To install the non-python dependencies we are using MSys2. There are several reasons for doing this instead of installing each separately:

  • Allows installing all non-python dependencies in one go,
  • Provides an easy way to keep the dependencies up-to-date,
  • It doesn't require admin privileges,
  • Doesn't require use of the (closed-source) MSVC toolsets,
  • Not all dependencies support being built by MSVC (pygobject, pyliblo)

You will require roughly 3 GiB of disk space.

Installation

1: Install MSys2

To install MSys2, navigate a web-browser of your choice to https://www.mysys2.org and follow the installation instructions.

2: Start MSys2 environment

MSys2 provides various environments inside which software can be installed and run. If you're running Windows 10 or above, then the one you probably want to use is:

  • ucrt64

As this doesn't appear to require MS Visual Studio/Code redistributables.

If you're running an earlier version of Windows (e.g. 7), then either:

  • mingw64
  • mingw32

should work, depending on the bitness of your computer.

Pick the one that suits you best, and open the relevant terminal window. Shortcuts to these will have been installed to your Start Menu during the installation of MSys2; or you can find and run the appropriate executable in the MSys2 install directory.

3: Install dependencies

Once you have the appropriate terminal window open, run the following commands:

pacman -S git pactoys-git
pkgfile --update
pacboy -S cairo:p gcc:p gobject-introspection:p gstreamer:p gst-plugins-good:p liblo:p pkgconf:p python-gobject:p python-pip:p python-pyqt5:p qt5-svg:p rtmidi:p

Note

The installation may take a while. Be patient.

Note

Neither python-gobject nor sip (a dependency of python-pyqt5) install correctly via pip when running in an msys2 environment. Thus we're using the packages available from the msys2 repositories instead.

Tip

If you wish to use waveform seek-bars in List Layout, then you will also need gst-plugins-bad:x. If not, you will need to disable these on your first run of LiSP to prevent warnings when playing Media Cues.

Tip

I recommend not installing gst-libav:p, as this causes a stutter in mp3 decoding.

Note

A future upcoming version will require numpy. This refused to install from pip when I last tried it (and I haven't found the time/inclination to debug why), so future versions of this guide will most likely be using the version from the msys2 repos instead (python-numpy:p, incidentally.) For now, however, it's not needed.

4: Checkout and install LiSP

Continuing in the terminal window of your choice:

git clone https://github.com/s0600204/linux-show-player.git -b msys2 ~/lisp
pip install ~/lisp

Note

The installation may take a while. Be patient.

Once complete, you can close the terminal window.

5: Create shortcut to LiSP

Create a new shortcut (right-click the desktop > "New" > "Shortcut")

When asked to provide a location:

<Path to msys2_shell.cmd> -<environment> -c linux-show-player

e.g. If msys is installed under C:\msys\ and you're using the ucrt64 environment:

C:\msys\msys2_shell.cmd -ucrt64 -c linux-show-player

Feel free to move the shortcut where you want - Start Menu, Taskbar, Desktop, etc.

Building with clang

It is possible to build with clang instead of gcc. To do this:

  • Substitute gcc:p with clang:p in Step 3.
  • Run export CC=clang between Steps 3 and 4.

Warning

Although there is a clang64 environment (where everything provided from its repository is build with clang), I wouldn't recommend using it at this time. This is because, when trying to run LiSP within it, the MSys2-provided gstreamer/pygobject/gobject-introspection/something in this chain attempts to load a file (llvm-dlltool.dll) that doesn't exist. (An llvm-dlltool.exe does exist, but a .dll with that name does not.)

Keeping up to date

Open the MSys2 terminal environment that you chose in Step 2 of installation:

pacman -Syu

Follow the instructions on screen. (If it tells you that it's performing a "Core upgrade", then you will need to let it do its thing and then run the above command again.) Then, to finish off:

paccache -r

to remove old downloads of package archives.

That's usually it. If there's been an update to LiSP, or its no longer running correctly after the above update, then it will be necessary to update LiSP on your system. To do this, in the terminal window from above, run:

cd ~/lisp
git pull origin msys2
pip install ~/lisp

Known Issues

  1. The level-meters for audio cues do not work within LiSP. In addition, once an audio cue come to an end, LiSP remains oblivious. These are both caused by the same issue: GStreamer uses something called GLib to pass messages along "message bus"es. On *nix systems, QT5 supports this and starts a "GLib Mainloop" to facilitate this. On Windows systems, QT5 disables its own GLib support. Thus the "GLib mainloop" isn't running, thus GStreamer messages aren't passed, thus LiSP doesn't get them, thus it has no idea if an audio file is still playing.

  2. If you're getting an error about MSVCR120.dll missing when running on the mingw64 environment, this seems to be a bug with MSys2's python/pip build where it (or, I suspect, the bundled distutils module inside pip's dependency setuptools) mistakenly thinks that you're using MSVC2013 to build. Haven't a clue why.

    There are three solutions here:

    1. Use ucrt64 instead (requires Windows 10 or above);
    2. Use mingw32 instead;
    3. Run LiSP directly from ~/lisp (<Path to msys2_shell.cmd> -mingw64 -c ~/lisp/linux-show-player to create a Windows shortcut) - you'll still need to run pip install ~/lisp to make sure you have all the dependencies;