This function is intended for advanced use. See the function save-universal-from-script for a simpler way to create a universal binary.
The function
create-universal-binary
writes a universal binary to the file
target-image
from the saved image files
src-image1
and
src-image2
. The value of
target-image
is returned.
The source images src-image1 and src-image2 must both be LispWorks for Macintosh mono-architecture ("thin") images and one should be for the Intel architecture and the other for the PowerPC architecture (the order is immaterial). For example, they could have been created by save-image or deliver.
Note: The function
create-universal-binary
checks that
src-image1
and
src-image2
are LispWorks images of different architectures, but it does not check how they were saved or how similar they are. You need to ensure that both images contain the same functionality.
Note: The function
create-universal-binary
can only be called from a LispWorks for Macintosh image that is itself a universal binary, such as the distributed image.
Suppose that you have saved two images,
my-application-intel
and
my-application-powerpc
, which contains the same application code loaded on an Intel Macintosh and a PowerPC Macintosh. The following command will combine them into a universal binary
my-application
that will run on both kinds of Macintosh:
(create-universal-binary "my-application"
"my-application-intel"
"my-application-powerpc")