Toolmaster/GSharp
Go to AVS Home Page
 Recent Releases
AVS/Express 7.3 Released
OpenViz 2.9 Released
Toolmaster 7.5.3 Released
AVS 5.7 Released
 Contact Support
 Licensing
Information on licensing AVS 
products
 
Interact with the AVS Developer 
community. Takes you out of 
the support web site

 


Field Technical Bulletin 190


FTB NO:    FTB190
DATE: 6th February 1998
SUBJECT: Enhancement! A framework for building Gsharp Applications

ENHANCEMENT DESCRIPTION

Since releasing Gsharp 3.0 we have invented a framework for running applications using the Gsharp Application Seat. This FTB describes the steps needed to set up this framework and provides the files that are needed.

When Gsharp or GsharpApp is started the file $UNIDIR/base/Gsharp.gsl is run to create the interface. The released version of this file contained a lot of logic to decide which file should be used to create the interface. With the new framework this file has been greatly simplified.

The new logic is as follows.

  • If a .gsa file is refenced on the command line Gsharp.gsl quits and leaves the .gsa file to create its own interface
  • Otherwise Gsharp will use the .gsa file in $UNIDIR/apps with the same name as the executable.

In order for this to work $UNIDIR/apps should contain at least a Gsharp.gsa and a GsharpApp.gsa.

N.B. The Gsharp Professional Edition and the Gsharp Application Seat are in fact the same executable. If the name is anything other than Gsharp it behaves as an Application Seat and uses and Application Seat license.

IMPLEMENTATION

Firstly download the new Gsharp.gsl from ftp.avs.com.

Now setup the $UNIDIR/apps directory:

cd $UNIDIR
mkdir apps
mv base/Menus.gsl apps/Gsharp.gsa
mv example/GsharpApp/GsharpApp.gsa apps
rm example/GsharpApp/gallery.gsa
#On Windows you should also remove $UNIDIR/example/Gsharp/Gsharp.gsl

You should now be able to run Gsharp and GsharpApp as normal.

N.B. The Gsharp Professional Edition is not available under Windows.

ADDING MORE APPLICATIONS

Gsharp Applications can always just be specified on the command line (GsharpApp $HOME/myapps/bob.gsa) but if you want to include them in this framework you should:

  1. Place the .gsa file into $UNIDIR/apps

    If your application contains multiple files we recommend putting them in a subdirectory of $UNIDIR/apps with the same name as the application. You should always reference these files using $UNIDIR and forward slashes as this will work on both UNIX and PCs without alteration. e.g.

    include "$UNIDIR/apps/myapp/menus.gsl";
    import_report("$UNIDIR/apps/myapp/globals.dat");
    
  2. You now need to make a new executable with the name of your application. Under UNIX this is easy:
    cd $UNIDIR/bin
    ln -s Gsharp myapp
    

    But under Windows executables keep their own names and not the names of the shortcuts. You must make a copy of the entire GsharpApp executable and then rename it with the name of your application with a .exe extension. You can then make shortcuts to the copy and place them on the desktop, in the start menu or wherever you like. Remember to set the Start in directory in the shortcut properties.

    OTHER RELATED SUBJECTS

    The GsharpApp FAQ contains other articles on related subjects.