Demos

Demos
Some examples to get you started

There are a number of demos included with wxEuphoria. They should be located in the demos subdirectory of your wxEuphoria directory if you preserved the directory structure when you decompressed wxEuphoria. First, make sure that you properly installed wxEuphoria. This means that the dynamic or shared libary is located in the correct directory. Under Windows, it can be in either your euphoria/bin directory, or your %WINDIR%\system32 directory. Under Linux, it should be in your usr/local/lib/ directory. Also, ensure that the wxEuphoria source files are either in a directory that's included in your EUINC variable (see the Euphoria docs for information about changing this), or that any program that uses wxEuphoria is in the same directory as the wxEuphoria library. Then, to run the window_basic.exw demo from the command line, you can type:

Windows:
  > exw hello_world.exw

Linux:
  $ exu hello_world.exw

In Windows, if you have the ".exw" extension associated with the Euphoria interpreter, you may simply type:

  > window_basic.exw

In Linux, there is a similar feature available to you, but you will need to change the first line of the file, which is sometimes called the shebang. This line tells your shell that it should use the interpreter listed on the first line to execute the file. You may also need to change the permissions on the file using chmod to allow the file to execute.

To see what the shebang should be, you could type:

  > which exu

This will give the path to your copy of the Euphoria interpreter. It will probably look similar to the current shebang in the demos. The path must be preceded by "#!" to tell the shell that the line is actually the interpreter to be used:

  Current shebang (based on my system):
        #!/home/matt/euphoria/bin/exu 

  Yours might look like:
        #!/home/myuserid/euphoria/bin/exu 

  Or perhaps:
        #!/usr/local/euphoria/bin/exu 

You also need to make sure that the file does not have DOS style new lines (carriage returns + new line). Once you have done this, you can run the demo from the command line:

   > ./window_basic.exw 

Note that this assumes your current directory is the same directory where the file is located. Linux doesn't include the current directory in your executable PATH environment variable (like Windows does), so you need to tell Linux to look there using "./".

Greg Haberek recently wrote a gateway to the wxEuphoria demos, called all_demos.exw. A demo itself, it provides a list of all available the demos with a brief description.

Supertopics