This utility converts a Basic program to a file of type Absolute (&ff8), which can be run just like the original program. The converted program has a couple of advantages:
Å It is a bit safer against unwanted copying and modifying, because it
isn't easily recognizable as a Basic program.
But, more importantly,
Å It can be treated by compression programs such as Acorn's 'squeeze', or
!Crunch (by BASS). These make it much smaller, up to 50%. You save disc
space and loading time, and the compression makes it fully incomprehensible.
(Note, however, that it makes no difference for the execution speed. To make
your program run faster, use a Basic cruncher, or a Basic compiler.)
The application is called !MakeApp2, after the original !MakeApp by Stuart Hickinbottom and John 'Lofty' Wallace. The improvement that !MakeApp2 gives is that it retains the command-line parameters. The old !MakeApp can not be used if your program has to read some parameters from the command line: the parameters are lost in the process.
!MakeApp2 comes with a utility that does the same, but can be called from the command line.
!MakeApp2 is FreeWare. For conditions of use, read the copyright notice at the end of this manual.
How to use it
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
The program installs itself on the icon bar. To convert a Basic file, drop it on the icon. A 'Save as:' window opens, from where you can change the leafname. The conversion starts when you drag the file from that window to a directory viewer.
The Options window opens when you click with Select on the iconbar icon, or choose 'Options...' from the menu. There are two options:
'Preserve command parameters' - When off, !MakeApp2 omits the code that
retains the command-line parameters. This gives output that is about 200
bytes smaller than with the option on.
'Default output leafname' - Controls the filename in the 'Save as:' window,
when it is opened. Either it contains the same name as the input file, or
it contains the name that is entered in the writeable field.
The command-line version
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
Included with !MakeApp2 is bas2app, a utility which does the same, but is run from the command line. That way, it can be used by other programs, or it can be started from an Obey file. You can find bas2app inside the application directory, in subdirectory CLIapp. The command syntax is
bas2app infile [outfile]
If no 'outfile' is given, then the output file has the same name, i.e. the input file is overwritten (!).
The command parameters are always preserved. If you don't need that, then use
bas2app0.
How it works
ÿÿÿÿÿÿÿÿÿÿÿÿ
!MakeApp2 adds a small ARMcode header to the Basic program. This header:
Å Moves the Basic program to a suitable location in memory
Å Reads the command line, converts it from
<program name> <parameters>
to
Basic -quit "<program name>" <parameters>
and stores this in the system variable MakeApp2$CLI
Å Passes control to Basic by issuing the command
'Basic -quit @<start address>,<end address>'
The Basic program has an extra line (at the start) added, which
Å Reads the content of the variable MakeApp2$CLI
Å Changes the command line by a call to OS_SetEnv
Å Deletes the variable
Version history
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
1.00 First released version
1.01 Added the command-line version of the program
Credits and copyright notice
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
The idea for this program (and the original !MakeApp) is by Stuart Hickinbottom and John Wallace. The MenuUtils module is FreeWare, and was written by (and is ⌐ of):
Alex Petrov
Bld. 1, Flat 107
Kavkazsky boulevard, 29
Moscow 115541
RUSSIA
e-mail: APetrov@misis.msk.su
This program is FreeWare. This means that I retain the copyright. You may freely copy and distribute it, provided that it is complete with all original files, and that you do not sell it. PD libraries may charge a nominal fee for the cost of duplication, postage etc. When you use the program, you do so entirely at your own risk. You may change the program to suit your own needs. If it's a bug fix, or if you think it's an improvement, then please send the changes to me.