PyKaraoke Windows Development

Windows users can install PyKaraoke using the simple installer available here, but those of you interested in modifying it or contributing to the PyKaraoke project may be interested in the following guide.

The Basics

To develop for PyKaraoke on Windows you must download and install the following dependencies:

Next download the PyKaraoke source ZIP from here and unzip.

With these in place you are ready to run PyKaraoke as well as modify the Python sources to your needs. You can launch the PyKaraoke GUI by clicking on, or from a command-line using “python”.

Faster CDG Implementation

As well as the pure Python version of PyKaraoke there is an optimised version of the CD+G interpreter which is written in C. It is not necessary to build and use the optimised version, but it can improve CD+G playback performance on very old PCs. Setting yourself up for building the C module is a little more involved than just installing the Python libraries, but here we walk you through every step.

First install the tools and libraries necessary to build the C file:

Now unpack the SDL sources somewhere (e.g. c:\proj\sdl) and follow VisualC.html (contained in the SDL sources) for instructions on building the SDL library. We distil the VisualC.html build instructions here:

  • Unzip contained in the SDL sources
  • Double-click VisualC/SDL.dsw
  • Build->Configuration Manager menu: Change from Debug to Release
  • Build solution
  • The library SDL.lib builds to folder c:\proj\SDL\VisualC\SDL\Release\
  • Create a “lib” folder under the top-level SDL source folder, e.g. c:\proj\SDL\lib
  • Copy the previously-built SDL.lib file to c:\proj\SDL\lib\SDL.lib

You only need to build SDL once. From now on compilation of the PyKaraoke C module is carried out with a single command on the command-line. The C module is built as follows (from the PyKaraoke source folder):

  • python build_ext –sdl-location=c:\proj\SDL

Before launching, copy the compiled module from “build/lib.win32-2.6/_pycdgAux.pyd” to the top-level PyKaraoke source directory. You can now launch PyKaraoke using “python” and set the “Use optimised (C-based) implementation” option in the CDG configuration menu.

Alternatively you can use “python install” to install all modules including the optimised C module to Python’s site-packages folder.

Getting Help

That’s everything you need to get started with development for the PyKaraoke project on Windows. A little prior Python experience will always be helpful but you should find that PyKaraoke is well commented enough to be able to dive in quickly. Any questions can be posted to the pykaraoke-discuss mailing list, we’re always happy to have another developer on board. And don’t forget to send us your patches!

Leave a Reply

Your email address will not be published. Required fields are marked *