| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: lisp-file bat-file &key (executable "sys:mlisp.exe") (image "sys:mlisp.dxl") (pause t) if-exists
This function creates a bat file which (on Windows) will execute the contents of lisp-file. The bat-file argument specifies the name of the bat file. It does this by wrapping around the Lisp code commands from the Windows command shell (cmd.exe), and using the new arguments to Allegro CL, --bat and --bat-pause. (See Command line arguments in startup.htm for a list of command-line arguments accepted by Allegro CL.)
bat files are only supported on Windows. This function exists and works on UNIX platforms but only for creating bat files that will be used on Windows with Allegro CL on Windows. Similar functionality, running Lisp from a shell script, is supported on UNIX (but not on Windows, where shell scripts are not supported). See Starting on UNIX using a shell script in startup.htm for details of using a shell script on UNIX to run Lisp.
The executable keyword argument must specify a exe file. There are effectively four exe files on Windows: mlisp.exe and buildi.exe, and mlisp8.exe and build.exe. The first pair use international characters (16-bits per character) while the second pair use 8-bit charcaters. build.exe and buildi.exe run console apps on Windows (note the warning about multiprocessing and console apps below). (Executables with other names are copies of one or another of those four -- alisp8.exe, for example, is a copy of mlisp8.exe.)
The image keyword argument must specify an image file (with type dxl). Examples of existing image files include mlisp.dxl and mlisp8.dxl. allegro.dxl is the image file for the IDE. While you can call that image in a bat file, it is necessarily interactive so it is hard to see why doing so would be practical.
The specified executable and image files must be compatible, that is they must use the same character sizes. The table below shows compatible executables and images among those supplied with the distribution.
The pause keyword argument indicates if a
pause at the end of the script is desired. (By pause, we mean the
script will execute and then Lisp will not exit until the user hits
the Enter key. This allows the user to examine information which may
be displayed. If there is no pause, it is likely the user will not be
able to see anything displayed before Lisp exits.) For console apps
pause should be nil
, but
for Windows apps t
is a good value for, as we
said, seeing the results of the script before Lisp exits. (If
pause is specified true, the --bat-pause
command-line argument is used. If pause is
nil
, --bat is used.
The value of the if-exists keyword argument is passed to open when creating bat-file.
The supplied executables in the first column are compatible with the
images in the second column. (Often an executable is compatible with
more images: the only important feature is character size. We list
them this way for ease of specifying arguments.) I18n is an
abbreviation for Internationalization. If the I18n is
t
, international characters are supported.
executable | images | type | i18n? |
---|---|---|---|
build.exe | mlisp8.dxl, alisp8.dxl | console | no |
buildi.exe | mlisp.dxl, alisp.dxl | console | yes |
mlisp.exe | mlisp.dxl | windows | yes |
alisp.exe | alisp.dxl | windows | yes |
mlisp8.exe | mlisp8.dxl | windows | no |
alisp8.exe | alisp8.dxl | windows | no |
Console apps may not work properly when they use multiprocessing. If you intend to use multiple processes, you should use a Windows app.
This Tech Corner entry talks about the bat file feature and gives an example.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |