Creates a macOS application bundle for the running LispWorks image.
hcl
create-macos-application-bundle target-path &key template-bundle bundle-name signature package-type extension application-icns identifier version build version-string help-book-folder help-book-name document-types executable-name => path
target-path⇩ |
A pathname designator. |
template-bundle⇩ |
A pathname designator. |
bundle-name⇩ |
A string. |
signature⇩ |
A string. |
package-type⇩ |
A string. |
extension⇩ |
A string. |
application-icns⇩ |
A pathname designator. |
identifier⇩ |
A string. |
version⇩ |
A string. |
build⇩ |
A string. |
version-string⇩ |
A string. |
help-book-folder⇩ |
A string. |
help-book-name⇩ |
A string. |
document-types⇩ |
A list or t . |
executable-name⇩ | t or nil . |
path⇩ |
A pathname. |
The function create-macos-application-bundle
creates a macOS application bundle for the running LispWorks image, and returns the pathname path in which an image is expected to be saved. If you are saving an image, it is convenient to use save-image-with-bundle.
target-path is where the new bundle is created.
By default create-macos-application-bundle
uses the application bundle of the current image as a template, and modifies it according to its arguments. If you do not supply of any of the keyword arguments, the only modification is to the actual path.
One of the files that create-macos-application-bundle
copies is Info.plist
. In the template bundle, the source for Info.plist
may be in a file named Info.plist.template
in the Contents
directory. create-macos-application-bundle
first looks for Info.plist
, and if it does not exist uses Info.plist.template
. This allows you to make the template bundle look different from a real application bundle, so that macOS does not treat it as one.
template-bundle can be supplied to provide a path for an application bundle which will be used as a template. If template-bundle is not supplied, create-macos-application-bundle
uses the path of the bundle of the current image. Except when specified, all the other parameters default to their values in the application bundle (the current image or from template-bundle).
bundle-name provides CFBundleName. The default value is the name of the last directory component in target-path.
signature is the signature in the PkgInfo
file.
package-type is the package type, CFBundlePackageType. The default value of package-type is "APPL"
.
extension is the extension to add to the last component of target-path. The default value of extension is "app"
, as in "LispWorks.app"
.
application-icns provides CFBundleIconFile.
identifier provides CFBundleIdentifier. You must change this if you are creating a bundle for your own application.
version is the version value, CFBundleVersion. If template-bundle is nil
, version defaults to the value returned by cl:lisp-implementation-version.
version-string provides CFBundleShortVersionString. If version-string is nil
(the default), then version and build (if non nil
) are used to make a default string.
help-book-folder provides CFBundleHelpBookFolder.
help-book-name provides CFBundleHelpBookName.
document-types provides the CFBundleDocumentTypes dict array. Each item of the list document-types should be a list of the form (name extensions icns-file os-types role) which provide the dict values as follows: the string name provides CFBundleTypeName; the list of strings extensions provides the contents of the array CFBundleTypeExtensions; the pathname designator icns-file provides the string CFBundleTypeIconFile; the list of strings os-types provides the contents of the array CFBundleTypeOSTypes and the string role provides CFBundleTypeRole. role can be omitted and defaults to "Editor"
. os-types can be omitted and defaults to ("****")
.The default value of document-types is t
, which means copy them from the application bundle template-bundle.
executable-name is the filename of the LispWorks image executable, not including the directory. The default value of executable-name is the pathname name of the last component of target-path.
create-macos-application-bundle
is implemented only in LispWorks for Macintosh.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35