Unified Demos requires a few packages included with most GNU/Linux distributions, namely Python, GTK+, PyGTK and PyXML. At the time of writing, this is all based on version 2 of Python, NOT version 3. If your operating system gives a name other than python to the Python 2 executable, you will need to make a few changes to the source. Aditionally Unified Demos requires the Python bindings from the Medit text editor. These are not as easy to install so pay attention!
As far as I know, Unified Demos is the second program using the "moo module" from Medit. PIDA is the first. Fans of Medit have a few different options for how to set this up. My experiences with them are documented in the tips and tricks page for the moo module. If you've never heard of Medit, then you can just download the latest source archive from the Medit file releases and enter the following commands:
tar -xf medit-1.1.0.tar.bz2
cd medit-1.1.0
./configure --with-python --enable-moo-module --enable-shared
make
sudo make install
As a starting point for those wishing to make their own demo sets with XML, Unified Demos comes with five demo sets, one for each of the languages: C, C++, Python, Perl and Ruby. To use each demo set you will need GTK+, gtkmm, PyGTK, gtk2-perl and ruby-gtk2 respectively. To even use the program at all, you will already need two of these. The other three are optional but gtkmm must be installed on your system when you compile Unified Demos.
The source releases can be found on the project page and they are compiled with the commands:
tar -xf unified-demos-0.3.tar.gz
cd unified-demos-0.3
make
sudo make install
Additionally for the latest source between releases one can check out or browse the Subversion repository:
svn co https://demohack.svn.sourceforge.net/svnroot/demohack demohack
After a successful installation, XML files will placed in your system's data directory. They can be accessed with the simple command demohack /usr/share/demohack/gtk.xml for example. You will see that the same directory has several "fix_demo" scripts. With the exception of Python, demos for the GTK+ language bindings are not stand-alone programs. The steps to convert them to stand-alone programs are fairly easy to automate and that is what the scripts do. You should not run "fix_demo" on any of the files that come with Unified Demos. This has already been done.
You might also notice that "info", "src" and "bin" files for each demo are in directories named info, src and bin respectively and that all these files have the same name up to extension. This extra bit of structure is completely optional. The only thing that matters is that all images and data files are in the same directory as the "bin" files if the demos refer to them with relative paths. To save space, symlinks have been used for demos written in interpreted languages.
Last updated: 2010-05-30 | Design by:
Hry online,
Croatia accommodation