September 9th, 2009 — 1:05am
We are currently seeking a developer to look after the Windows port of PyKaraoke. If you are interested in contributing to an open source project (and learning something about Python development along the way) we would love to hear from you.
We have recently written two articles as a quick-start guide to development on the Windows platform:
The simplest way to get involved is to use the pure Python method discussed in the first article. It is not necessary to install any of the C development environment to do this, and you can quickly start editing and running your own PyKaraoke modifications. We are always happy to bring new developers on board and will give assistance in bringing you up to speed with the source code, but you should find that the PyKaraoke source is well commented and easy to follow. According to Ohloh:
Across all Python projects on Ohloh, 24% of all source code lines are comments. For PyKaraoke, this figure is 30%. This high number of comments puts PyKaraoke among the highest one-third of all Python projects on Ohloh. A high number of comments might indicate that the code is well-documented and organized, and could be a sign of a helpful and disciplined development team.
You can hook up with the development team on the PyKaraoke mailing list. Most of the developers work on Linux, but PyKaraoke works just as well on the Windows platform and for that reason we would like to invite anyone passionate about open source development to look after the Windows port. This might be a small contribution like tidying up the GUI on Windows or taking over making Windows releases, or you could contribute brand new features that can be used on Linux, BSD, OSX, GP2X and any other platforms which PyKaraoke runs on. The differences between the platforms are minor, but having a developer keeping a close eye on the Windows platform will assist in keeping PyKaraoke the most portable karaoke player out there.
Comment » | PyKaraoke
September 9th, 2009 — 12:42am
Following on from the previous article about PyKaraoke development for the Windows platform, those of you who are modifying the source and contributing to the project may be interested in these instructions for building your own PyKaraoke installer executable. This allows you to distribute test builds of PyKaraoke which users can install without having to first install any of the underlying applications and libraries such as Python and Pygame.
- Install NSIS and Py2exe.
- Follow these instructions for setting up the build environment.
- Copy the following DLLs to folder “build/lib.win32-2.6/” in the top-level source folder (note that your originating folders may differ). In future this step will be automated within the installer script:
- Compile PyKaraoke’s C-based optimised CDG interpreter from a command prompt:
- python setup.py build_ext –sdl-location=C:\proj\SDL
- Finally build the installer executable (use option –makensis if you installed NSIS to a non-standard location):
Your final executable installer will now be sitting in the top level source folder with the filename pykaraoke-ver.exe.
Comment » | PyKaraoke
August 29th, 2009 — 12:32am
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.
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 pykaraoke.py, or from a command-line using “python pykaraoke.py”.
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 VisualC.zip 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 setup.py 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 pykaraoke.py” and set the “Use optimised (C-based) implementation” option in the CDG configuration menu.
Alternatively you can use “python setup.py install” to install all modules including the optimised C module to Python’s site-packages folder.
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!
Comment » | PyKaraoke