Arguments

Values

Description

The function
save-universal-from-script
provides a convient way to create a uiversal binary on an Intel Macintosh, using a script designed for saving a mono-architecture image.

The
script-name
is the name of a Common Lisp build script for saving or delivering an image, as would be used to create a mono-architecture image. It should load the application and then call either
deliver
or
save-image
as appropriate.

The function
save-universal-from-script
runs the current LispWorks image in two subprocesses, once for the PowerPC architecture (under Rosetta) and once for the native Intel architecture, passing the
script-name
as the
-build
command line argument. The script is evaluated as normal, accept that the filename that is passed to any call to
save-image
or
deliver
is ignored and a temporary filename is used instead. If these two subprocesses are successful, then the temporary images are combined to make a universal binary
target-name
in the same as create-universal-binary
.

The command line arguments of the images run by the subprocesses will include the command line arguments that were passed to the current image. In addition, various undocumented command line argument will be prepended, which control the how
deliver
or
save-image
work in the script.

Any output generated by the subprocesses is written to
output-stream
. If this is
nil
, then the output is discarded. If this is
t
(the default), then the output is written to the standard output.

Note: The function
save-universal-from-script
can only be called from a LispWorks for Macintosh image that is itself a universal binary, such as the distributed image.

Example

Suppose the
file my-build-script.lisp
contains

(load-all-patches)

(load "my-application-defsys")

(compile-system 'my-application-system :load t)

(deliver 'my-application-function "my-application" 5)

Then, the following call create a universal binary
my-application
using this script: