A Desktop Front-End for Compilers
by Chris Dollin

This program installs an icon on the icon bar and compiles C or Pascal files that are dragged to it. When a file is dragged to the icon, the current directory is set to the directory containing the 'c' or 'pas' directory containing the file, and the command 'comp_c' or 'comp_pas' is executed. Thus it is necessary to set up an alias for 'comp_c' and/or 'comp_pas' beforehand, typically using:

*Set Alias$comp_c cc %*0
*Set Alias$comp_pas pascal %*0

or similar. This can be done in !Compile's !Boot or !Run file for convenience. Alternatively you can create Obey files entitled comp_c and/or comp_pas, and save them in either the library directory or the directory containing the 'c' or 'pas' directory. A typical Obey file might be:

cc -c -I$.RISC_OSLib %0
if sys$returnCode = 0 then echo *** Linking ***
if sys$returnCode = 0 then link -o !RunImage o.%0 $.CLib.o.Stubs $.RISC_OSLib.o.RISC_OSLib

To terminate the program and remove the icon from the icon bar, use the task display. For more details, run !Compile.!ReadMe.