Running the Linux Demos
The demos in /u/nn/demos are intended to be run on a
linux desktop/laptop (although a lot of them are videos that can be
run on any platform). To make it easy, we developed a simple
command-line interface, run-demos.pl, to run them. (Note: demos.other
uses a different interface described in the README file.)
Running a demo
- From the "demos" directory, type "run-demos.pl" at the command
line. You will be presented with a list of demos.
- Enter the number corresponding to the demo you'd like to run. You
will be presented with a list of different configurations of this
demo.
- Enter the number corresponding to the configuration you want to
run or enter "R" to read a description of the demo.
Setting up a new demo
- Create a new subdirectory of the "demos" directory. Make sure to
give the diretory a descriptive name, as it will be used to label a
menu item in the "run-demos.pl" script. Put all files associated with
your demo in the subdirectory. If possible, statically link your
executable so it will still work when shared libraries are moved
around.
- In this subdirectory, create a script called ".scr" that
will run your demo. Make sure to set all necessary environment
variables, etc. Don't forget to set the execute privileges
appropriately. If your demo can be run several different ways, you
can create multiple scripts. If your demo depends on programs
outside of the demo directory, make sure to give the user the option
(e.g. by setting environment variables) of specifying the paths of
those programs. This way the script can still work if programs are
moved to other directories. Look in the "predprey" directory for a
simple example of a script. Again, make sure to give your scripts
descriptive names as they will appear as menu items in the
"run-demos.pl" script.
- In your subdirectory, create an HTML file called "description.html"
that explains the demo and gives any special instructions for its use.
If the demo depends on programs outside of the demo directory, make
sure to state those dependencies there. The user will have the option
of viewing this file in a browser before they run your demo.
- From the demos directory, type "run-demos.pl" at the command line
to verify that your demo and all its configurations appear as options,
and check that they run correctly in different environments.
Last modified: Sun Sep 25 15:12:30 PDT 2022