The deploy Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The deploy Reference Manual

This is the deploy Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:26:20 2022 GMT+0.

Table of Contents


1 Introduction

About Deploy

This is a system to help you easily and quickly deploy standalone common lisp applications as binaries. Specifically it is geared towards applications with foreign library dependencies that run some kind of GUI.

How To

In order to make use of Deploy, you'll have to change the ASDF system definition of your project to contain the following properties:

:defsystem-depends-on (:deploy)
:build-operation "deploy-op"
:build-pathname "my-application-name"
:entry-point "my-package:my-start-function"

Once you have updated your system appropriately, all you need to do is start a fresh instance of your implementation from a terminal and run the following function:

(asdf:make :my-system)

This will build your system, gather the necessary information, and deploy a standalone bin folder within your project's root directory. You can then ship this folder to your users.

Customising Foreign Libraries

Sometimes you might want to designate a specific library for deployment, rather than the one used during development. If this is the case, you have to help Deploy out a little by defining extra information about the library with define-library. If the foreign library is in the source tree of a lisp library, you can simply associate the CFFI library with the system that provides it, and Deploy will find it automatically:

(deploy:define-library cffi-library-symbol
  :system :system-name-that-defines-the-library)

For example, the cl-mpg123 system provides a single library, which we would annotate like this:

(deploy:define-library cl-mpg123-cffi:libmpg123
  :system :cl-mpg123)

If the file is not contained in the directory of the system that provides it, you can also designate specific source directories to scan:

(deploy:define-library cffi-library-symbol
  :sources '("/some/path/where/the/library/is/stored/")) 

Finally, you can also specify the path directly if you want Deploy to choose a particular file, rather than trying to find one on its own:

(deploy:define-library cffi-library-symbol
  :path "/some/path/to/the/file.so")

Generally though these extra associations should not be necessary as Deploy will simply take the path that CFFI has already figured out to find the library.

Sometimes it might not be desired to deploy all the libraries, or reload them all upon boot. You can change this behaviour with define-library's :dont-deploy and :dont-open properties respectively.

Extending Deployment and Boot Behaviour

Deploy also offers a hooks system with which you can easily extend the steps performed during deployment and during the boot process of the generated executable. With the define-hook macro you can add functions that are executed during various points of the process. Specifically, the following types are available:

If you would simply like to include a data directory to bundle with the rest, use define-resource-directory. After boot, all of the resource files will be in the directory returned by data-directory.

Deploying to an OS X App Bundle

If you would like a nicely bundled .app for OS X, you can simply change the build-operation in your ASDF system file to osx-app-deploy-op. If you would like to customise the Info.plist file that is generated for the app, you can change *info-plist-template* to point to a file that contains what you want.

Debugging a Deployed Executable

If you're having trouble with an application that's already deployed, there's a few things you can do to debug it by setting environment variables. The following are recognised by Deploy:

Particularly on Windows and OS X debugging can be an issue, as a GUI application will not get a standard output to write to. In that case, the above redirect might help. Alternatively, on Windows, you can build your binary with the feature flag :deploy-console present, which will force it to deploy as a console application.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 deploy

Tools to aid in the deployment of a fully standalone application.

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://Shinmera.github.io/deploy/

Source Control

(GIT https://github.com/Shinmera/deploy.git)

Bug Tracker

https://github.com/Shinmera/deploy/issues

License

zlib

Version

1.0.0

Dependencies
  • cffi (system).
  • documentation-utils (system).
  • trivial-features (system).
Source

deploy.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 deploy/deploy.asd

Source

deploy.asd.

Parent Component

deploy (system).

ASDF Systems

deploy.


3.1.2 deploy/package.lisp

Source

deploy.asd.

Parent Component

deploy (system).

Packages

deploy.


3.1.3 deploy/toolkit.lisp

Dependency

package.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).

Public Interface
Internals

3.1.4 deploy/library.lisp

Dependency

toolkit.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).

Public Interface

3.1.5 deploy/hooks.lisp

Dependency

library.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).

Public Interface
Internals

*hooks* (special variable).


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.6 deploy/deploy.lisp

Dependency

hooks.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).

Public Interface
Internals

3.1.7 deploy/osx.lisp

Dependency

deploy.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).

Public Interface
Internals

*info-plist-readtable* (special variable).


Previous: , Up: Lisp   [Contents][Index]

3.1.8 deploy/documentation.lisp

Dependency

osx.lisp (file).

Source

deploy.asd.

Parent Component

deploy (system).


4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 deploy

Source

package.lisp.

Nickname

org.shirakumo.deploy

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

5.1.1 Special variables

Special Variable: *compression-factor*
Package

deploy.

Source

deploy.lisp.

Special Variable: *data-location*

Relative path designating the location of the resource directory.

This path should be relative to the location of
the executable.

You may set this variable before deployment to
influence where resource files are stored.

See DATA-DIRECTORY

Package

deploy.

Source

toolkit.lisp.

Special Variable: *info-plist-template*

This variable holds a pathname pointing to the Info.plist template to use for OS X app bundles.

See PARSE-INFO-PLIST

Package

deploy.

Source

osx.lisp.

Special Variable: *status-output*

The output stream of status messages.

You can set this to NIL if you want to suppress status messages on the console, or set them to some other stream that won’t bother the user.

See STATUS

Package

deploy.

Source

toolkit.lisp.

Special Variable: *system-source-directories*

This variable holds a list of paths to system library directories.

Deploy will search through these paths to attempt to
find the source of libraries if the more explicitly
provided paths should fail.

Package

deploy.

Source

library.lisp.


5.1.2 Macros

Macro: define-hook ((type name &optional priority) args &body body)

Define a new hook function.

The args list’s arguments are automatically turned into keyword arguments for the hook function. This allows you to only specify the arguments that you are interested in.

The following arguments are available for all hook types: - SYSTEM The ASDF system object the application is built with.
- OP The ASDF operation object used to build the application.

The following hook types are recognised:
- :load These functions should perform the loading of systems or other kinds of things that will potentially change the set of libraries.

- :deploy These functions are responsible for copying files into the deployment target directory. It supplies the following extra arguments: - DIRECTORY The target directory into which resource files should be placed.

- :build These functions should prepare the system for the dump to binary. Specifically you might want to shut down existing threads, close file handles, remove unneeded baggage, and remove potentially sensitive information about your system.

- :boot These functions are run right before the primary entry point is executed. Thus they are responsible for preparing the runtime to continue by restarting threads, re-opening files, and so forth.
It supplies the following extra arguments: - DIRECTORY The directory in which the resource files now reside after boot.

- :quit These functions are run right before the executable exits completely. They offer a last-minute opportunity to dump some information about the system, or to clean up vital resources.

See HOOK
See REMOVE-HOOK

Package

deploy.

Source

hooks.lisp.

Macro: define-library (name &body initargs)

Define additional properties for a foreign library.

The NAME should be one of a valid CFFI foreign library as defined by CFFI:DEFINE-FOREIGN-LIBRARY.

Valid properties are:
- :SYSTEM
- :SOURCES
- :PATH
- :DONT-OPEN
- :DONT-DEPLOY

See LIBRARY
See LIBRARY-SYSTEM
See LIBRARY-SOURCES
See LIBRARY-PATH
See LIBRARY-DONT-OPEN-P
See LIBRARY-DONT-DEPLOY-P

Package

deploy.

Source

library.lisp.

Macro: define-resource-directory (name directory &key copy-root)

Shorthand to define a hook that simply deploys the given directory.

The directory has to be a form that evaluates to a
pathname to a directory that should be copied. The
path is merged with the system source directory of
the system being deployed. This means that relative
paths are relative to the source root of your system.

See DEFINE-HOOK
See COPY-DIRECTORY-TREE

Package

deploy.

Source

hooks.lisp.


5.1.3 Ordinary functions

Function: copy-directory-tree (source target &key copy-root)

Copy the source directory to the target directory.

If COPY-ROOT is true, the source folder itself is copied, otherwise only its contents are copied.

Package

deploy.

Source

toolkit.lisp.

Function: data-directory ()

Return an absolute path to the resource directory.

See DATA-DIRECTORY

Package

deploy.

Source

toolkit.lisp.

Function: deployed-p ()

Returns T if the current Lisp environment has been booted from a deployed executable.

Package

deploy.

Source

deploy.lisp.

Function: ensure-library (library)

Return the corresponding LIBRARY instance, if possible.

The following happens for the following type of
the argument:
- LIBRARY The argument is returned.
- CFFI:FOREIGN-LIBRARY The object is CHANGE-CLASSd into a LIBRARY instance.
- SYMBOL The library instance is retrieved by name and then passed back in.

See CFFI::GET-FOREIGN-LIBRARY
See LIBRARY

Package

deploy.

Source

library.lisp.

Function: env-set-p (envvar)

Returns the value of the given environment variable if it is set to a non-empty value.

Package

deploy.

Source

toolkit.lisp.

Function: hook (type name)

Accessor to the hook instance of the given type and name.

See *HOOKS*
See HOOK
See REMOVE-HOOK

Package

deploy.

Source

hooks.lisp.

Function: (setf hook) (type name)
Package

deploy.

Source

hooks.lisp.

Function: list-libraries ()

Return a fresh list of known foreign libraries.

All the returned libraries will be of type LIBRARY.

See LIBRARY
See CFFI:LIST-FOREIGN-LIBRARIES
See ENSURE-LIBRARY

Package

deploy.

Source

library.lisp.

Function: parse-info-plist (system &optional template)

Parses the Info.plist file and replaces values as appropriate.

Specifically, anything enclosed in [] is taken as a
list of symbols designating functions to call with
the system object. The resulting values are then
turned into a string by PRINC-TO-STRING, and escaped
for usage by XML-ESCAPED before writing them to
the returned string in place of the []. Note that you
can enclose multiple symbols. The value of the first function call that returns non-NIL is used as the
value to splice into the file.

This allows to conveniently fill an Info.plist
template with values from the ASDF system.

Have a look at the standard Info.plist file shipped
with Deploy for what’s possible.

See *INFO-PLIST-TEMPLATE*

Package

deploy.

Source

osx.lisp.

Function: quit (&optional system op exit-code)

Runs the quit hooks and terminates the application.

If an error occurs during the execution of a quit hook, it is ignored.

See RUN-HOOKS

Package

deploy.

Source

deploy.lisp.

Function: redirect-output (target)

Redirect all output to the given file.

This changes *STANDARD-OUTPUT*, *ERROR-OUTPUT*, *TRACE-OUTPUT*, and *DEBUG-IO*. For the latter, only its output stream is changed.

The stream to the given target file is returned.

Package

deploy.

Source

toolkit.lisp.

Function: remove-hook (type name)

Remove the hook of the given type and name.

See *HOOKS*
See HOOK

Package

deploy.

Source

hooks.lisp.

Function: run-hooks (type &rest args)

Run the hooks of the given type, supplying the given arguments.

Refer to DEFINE-HOOKS for the recognised arguments for
each hook type.

This function simply iterates through *HOOKS*, checks the HOOK-TYPE for compliance, establishes a REPORT-ERROR restart, and then applies the HOOK-FUNCTION to the given arguments.

The REPORT-ERROR restart simply prints out the error it receives and is thus useful for ignoring errors that
might occur during the execution of a hook.

See *HOOKS*
See HOOK-FUNCTION
See DEFINE-HOOK

Package

deploy.

Source

hooks.lisp.

Function: runtime-directory ()

Returns a pathname to the directory where the executable is being run in.

See UIOP:ARGV0

Package

deploy.

Source

toolkit.lisp.

Function: status (level format-string &rest format-args)

Print a status message to *status-output*.

The level determines the granularity of the message. Higher levels mean "more detailed".

See *STATUS-OUTPUT*

Package

deploy.

Source

toolkit.lisp.


5.1.4 Generic functions

Generic Function: close-library (library)

Close/unload the library.

See CFFI:CLOSE-FOREIGN-LIBRARY

Package

deploy.

Methods
Method: close-library (library)
Source

library.lisp.

Method: close-library ((library library))
Source

library.lisp.

Generic Function: discover-entry-point (op c)

Attempt to resolve the given ASDF system’s entry point to a function.

The entry point may be either a function or a class
designator. If a class, returned is a function that
simply instantiates the class.

See ASDF/SYSTEM:COMPONENT-ENTRY-POINT

Package

deploy.

Methods
Method: discover-entry-point ((op deploy-op) (c system))
Source

deploy.lisp.

Generic Function: find-source-file (library)

Attempt to find the source file of the library on the system.

Uses the directories listed in POSSIBLE-DIRECTORIES
to look for the library source.

The directories are searched for pathnames that
match one of the POSSIBLE-PATHNAMES for the library.

See POSSIBLE-DIRECTORIES
See POSSIBLE-PATHNAMES

Package

deploy.

Methods
Method: find-source-file (library)
Source

library.lisp.

Method: find-source-file ((library library))
Source

library.lisp.

Generic Reader: hook-function (object)

Accessor to the function of the hook.

This function is what is executed when RUN-HOOKS is called.

See HOOK
See RUN-HOOKS

Package

deploy.

Methods
Reader Method: hook-function ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

function.

Generic Writer: (setf hook-function) (object)
Package

deploy.

Methods
Writer Method: (setf hook-function) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

function.

Generic Reader: hook-name (object)

Accessor to the name of the hook.

The name should be a symbol.

See HOOK

Package

deploy.

Methods
Reader Method: hook-name ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

name.

Generic Writer: (setf hook-name) (object)
Package

deploy.

Methods
Writer Method: (setf hook-name) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

name.

Generic Reader: hook-priority (object)

Accessor to the priority of the hook.

The priority should be an integer.
The higher the priority, the earlier the hook is executed.

See HOOK

Package

deploy.

Methods
Reader Method: hook-priority ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

priority.

Generic Writer: (setf hook-priority) (object)
Package

deploy.

Methods
Writer Method: (setf hook-priority) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

priority.

Generic Reader: hook-type (object)

Accessor to the type of the hook.

The type can be one of :LOAD :BUILD :DEPLOY :BOOT :QUIT.

See HOOK

Package

deploy.

Methods
Reader Method: hook-type ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

type.

Generic Writer: (setf hook-type) (object)
Package

deploy.

Methods
Writer Method: (setf hook-type) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

type.

Generic Reader: library-dont-deploy-p (object)

Accessor to whether to deploy (copy) the library to the resources directory on build.

See LIBRARY

Package

deploy.

Methods
Reader Method: library-dont-deploy-p ((library library))

automatically generated reader method

Source

library.lisp.

Target Slot

dont-deploy.

Generic Writer: (setf library-dont-deploy-p) (object)
Package

deploy.

Methods
Writer Method: (setf library-dont-deploy-p) ((library library))

automatically generated writer method

Source

library.lisp.

Target Slot

dont-deploy.

Generic Reader: library-dont-open-p (object)

Accessor to whether the library should not be opened on boot.

See LIBRARY

Package

deploy.

Methods
Reader Method: library-dont-open-p ((library library))

automatically generated reader method

Source

library.lisp.

Target Slot

dont-open.

Generic Writer: (setf library-dont-open-p) (object)
Package

deploy.

Methods
Writer Method: (setf library-dont-open-p) ((library library))

automatically generated writer method

Source

library.lisp.

Target Slot

dont-open.

Generic Function: library-name (library)

Return the library’s name.

See CFFI:FOREIGN-LIBRARY-NAME

Package

deploy.

Methods
Method: library-name (library)
Source

library.lisp.

Method: library-name ((library library))
Source

library.lisp.

Generic Function: library-open-p (library)

Returns whether the library is currently open.

See CFFI:FOREIGN-LIBRARY-LOADED-P

Package

deploy.

Methods
Method: library-open-p (library)
Source

library.lisp.

Method: library-open-p ((library library))
Source

library.lisp.

Generic Reader: library-path (object)

Accessor to the definite path to the library’s source file.

If this is NIL, the library could not be found.

See LIBRARY

Package

deploy.

Methods
Reader Method: library-path ((library library))

automatically generated reader method

Source

library.lisp.

Target Slot

path.

Generic Writer: (setf library-path) (object)
Package

deploy.

Methods
Writer Method: (setf library-path) ((library library))

automatically generated writer method

Source

library.lisp.

Target Slot

path.

Generic Reader: library-sources (object)

Accessor to the list of additional paths to search for source files.

See LIBRARY

Package

deploy.

Methods
Reader Method: library-sources ((library library))

automatically generated reader method

Source

library.lisp.

Target Slot

sources.

Generic Writer: (setf library-sources) (object)
Package

deploy.

Methods
Writer Method: (setf library-sources) ((library library))

automatically generated writer method

Source

library.lisp.

Target Slot

sources.

Generic Reader: library-system (object)

Accessor to the ASDF system associated with the library.

If there is a system associated with this library, the system’s source tree is used to search for the library’s source file.

See LIBRARY

Package

deploy.

Methods
Reader Method: library-system ((library library))

automatically generated reader method

Source

library.lisp.

Target Slot

system.

Generic Writer: (setf library-system) (object)
Package

deploy.

Methods
Writer Method: (setf library-system) ((library library))

automatically generated writer method

Source

library.lisp.

Target Slot

system.

Generic Function: open-library (library)

Open/load the library.

See CFFI:LOAD-FOREIGN-LIBRARY

Package

deploy.

Methods
Method: open-library (library)
Source

library.lisp.

Method: open-library ((library library))
Source

library.lisp.

Generic Function: possible-directories (library)

Return a list of possible directories to search for the library.

By default this list includes:
- The LIBRARY-SOURCES of the library.
- The directory tree of the LIBRARY-SYSTEM’s source.
- The CFFI:*FOREIGN-LIBRARY-DIRECTORIES*
- The *SYSTEM-SOURCE-DIRECTORIES*
- The paths from the following environment variables:
- PATH on Windows
- LD_LIBRARY_PATH on Linux
- DYLD_LIBRARY_PATH on Darwin

See LIBRARY-SOURCES
See LIBRARY-SYSTEM
See DISCOVER-SUBDIRECTORIES
See CFFI:*FOREIGN-LIBRARY-DIRECTORIES*
See *SYSTEM-SOURCE-DIRECTORIES*
See ENV-PATHS

Package

deploy.

Methods
Method: possible-directories (library)
Source

library.lisp.

Method: possible-directories ((library library))
Source

library.lisp.

Generic Function: possible-pathnames (library)

Return a list of possible file pathnames that match the library.

By default this list includes:
- The CFFI:FOREIGN-LIBRARY-PATHNAME if present.
- Paths computed through the CFFI library’s spec.
- A generic path after the LIBRARY-NAME.

See CFFI:FOREIGN-LIBRARY-PATHNAME
See CFFI:DEFINE-FOREIGN-LIBRARY
See LIBRARY-NAME
See LIBRARY
See RESOLVE-CFFI-SPEC

Package

deploy.

Methods
Method: possible-pathnames (library)
Source

library.lisp.

Method: possible-pathnames ((library library))
Source

library.lisp.


5.1.5 Standalone methods

Method: output-files ((o osx-app-deploy-op) (c system))
Package

asdf/action.

Source

osx.lisp.

Method: output-files ((o deploy-op) (c system))
Package

asdf/action.

Source

deploy.lisp.

Method: perform ((o deploy-op) (c system))
Package

asdf/action.

Source

deploy.lisp.

Method: perform :before ((o deploy-op) (c system))
Package

asdf/action.

Source

deploy.lisp.

Method: print-object ((library library) stream)
Source

library.lisp.

Method: print-object ((hook hook) stream)
Source

hooks.lisp.

Method: shared-initialize :after ((library library) slots &key)
Source

library.lisp.


5.1.6 Classes

Class: deploy-op

An ASDF operation to perform a deployment.

When this operation is performed, the following steps are taken:

1. The :LOAD hooks are run with the appropriate arguments.
2. The output files are determined, which should be a list of two paths, the first being the executable to dump to, and the second being a directory where all the resources should be stored.
3. The list of libraries to reload on boot is computed by removing all libraries that are either marked as dont-open, or aren’t yet opened from LIST-LIBRARIES. 4. The deployment directories are created.
5. The *DATA-LOCATION* path is adapted to be relative to the binary file.
6. The :DEPLOY hooks are run with the appropriate arguments.
7. The :BUILD hooks are run with the appropriate arguments.
8. The image is dumped to an executable format, using core compression if available, and using the appropriate application type depending on the presence of the operating system and the :DEPLOY-CONSOLE feature flag.

See LIST-LIBRARIES
See *FOREIGN-LIBRARIES-TO-RELOAD*
See *DATA-LOCATION*
See FIND-RELATIVE-PATH-TO
See RUN-HOOKS

Package

deploy.

Source

deploy.lisp.

Direct superclasses

program-op.

Direct subclasses

osx-app-deploy-op.

Direct methods
Class: hook

This class encapsulates a hook.

Hooks are functions that are run during various points of deployment and execution of the resulting executable.

See HOOK-NAME
See HOOK-TYPE
See HOOK-FUNCTION
See HOOK-PRIORITY
See HOOK
See REMOVE-HOOK
See DEFINE-HOOK
See RUN-HOOKS

Package

deploy.

Source

hooks.lisp.

Direct methods
Direct Default Initargs
InitargValue
:name(error name required.)
:type(error type required.)
:function(constantly nil)
:priority0
Direct slots
Slot: name
Initargs

:name

Readers

hook-name.

Writers

(setf hook-name).

Slot: type
Package

common-lisp.

Initargs

:type

Readers

hook-type.

Writers

(setf hook-type).

Slot: function
Package

common-lisp.

Initargs

:function

Readers

hook-function.

Writers

(setf hook-function).

Slot: priority
Initargs

:priority

Readers

hook-priority.

Writers

(setf hook-priority).

Class: library

Class to represent a foreign library.

This is a subclass of CFFI:FOREIGN-LIBRARY with some additional slots for information necessary for the Deploy system.

Upon shared-initialize, if the LIBRARY-PATH is not explicitly set, it is resolved through FIND-SOURCE- FILE.

See LIBRARY-SYSTEM
See LIBRARY-SOURCES
See LIBRARY-PATH
See LIBRARY-DONT-OPEN-P
See LIBRARY-DONT-DEPLOY-P
See FIND-SOURCE-FILE

Package

deploy.

Source

library.lisp.

Direct superclasses

foreign-library.

Direct methods
Direct slots
Slot: system
Initargs

:system

Readers

library-system.

Writers

(setf library-system).

Slot: sources
Initargs

:sources

Readers

library-sources.

Writers

(setf library-sources).

Slot: path
Initargs

:path

Readers

library-path.

Writers

(setf library-path).

Slot: dont-open
Initargs

:dont-open

Readers

library-dont-open-p.

Writers

(setf library-dont-open-p).

Slot: dont-deploy
Initargs

:dont-deploy

Readers

library-dont-deploy-p.

Writers

(setf library-dont-deploy-p).

Class: osx-app-deploy-op

This deployment op generates an OS X app bundle.

See DEPLOY-OP
See PARSE-INFO-PLIST
See *INFO-PLIST-TEMPLATE*

Package

deploy.

Source

osx.lisp.

Direct superclasses

deploy-op.

Direct methods

output-files.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: *foreign-libraries-to-reload*

This variable keeps a list of library instances to open on boot.

The variable is set during deployment and should not be modified unless you know what you’re doing.

Package

deploy.

Source

deploy.lisp.

Special Variable: *hooks*

This variable holds a list of all hook instances.

The list should be sorted by priority of the hooks in descending order.

See HOOK
See RUN-HOOKS

Package

deploy.

Source

hooks.lisp.

Special Variable: *info-plist-readtable*

Custom readtable used to parse parts of the info plist.

Package

deploy.

Source

osx.lisp.


Previous: , Up: Internals   [Contents][Index]

5.2.2 Ordinary functions

Function: call-entry-prepared (entry-point system op)

Sets up a basic environment to run the entry point in.

In particular, it sets up an EXIT restart to allow you to quit the application, adds an error handler to handle the top-level errors, potentially redirects all output streams, executes the warm boot, and finally calls the entry point.

If an error should occur during boot or during the execution of the entry point, a debugger is only invoked if the environment variable DEPLOY_DEBUG_BOOT is set to a non-empty value. Otherwise an error will lead to an exit restart invocation.

If the environment variable DEPLOY_REDIRECT_OUTPUT is set to a non-empty value, REDIRECT-OUTPUT is called with its value.

See WARMLY-BOOT
See REDIRECT-OUTPUT

Package

deploy.

Source

deploy.lisp.

Function: directory-contents (path)

Returns all files and subdirectories within the given pathname’s directory.

Package

deploy.

Source

toolkit.lisp.

Function: discover-subdirectories (path)

Return a list of all directories contained in the path.

This includes the path itself.

Package

deploy.

Source

toolkit.lisp.

Function: env-paths (variable)

Returns the paths contained in the given environment variable.

For Windows systems, the split character is ;
otherwise it is :

See SPLIT
See UIOP:GETENV

Package

deploy.

Source

toolkit.lisp.

Function: find-relative-path-to (target source)

Attempt to find a way to "get to" the target directory.

This tries to construct a relative path from the source to the target pathname, using :UP transforms in the pathname. If no relative path can be found, an error is signalled.

Package

deploy.

Source

toolkit.lisp.

Function: make-lib-pathname (name)

Create a pathname with the proper type for a library.

The type is OS-dependent.
Linux: "so"
Darwin: "dylib"
Windows: "dll"

Package

deploy.

Source

toolkit.lisp.

Function: pathname-filename (path)

Return the full file name of the pathname as a string.

Package

deploy.

Source

toolkit.lisp.

Function: query-for-library-path ()
Package

deploy.

Source

deploy.lisp.

Function: resolve-cffi-spec (spec)

Resolve the CFFI foreign library spec to a list of usable pathnames.

This is the spec as used in CFFI:DEFINE-FOREIGN-
LIBRARY.

See CFFI:DEFINE-FOREIGN-LIBRARY

Package

deploy.

Source

toolkit.lisp.

Function: split (split string)

Split the string on each split character.

Empty subsequences are not included.

Package

deploy.

Source

toolkit.lisp.

Function: system-applicable-p (system-spec)

Returns T if the system-spec is applicable for the current system.

If system-spec is T, this returns T. Otherwise T is
returned if the system-spec is in *FEATURES*.

Package

deploy.

Source

toolkit.lisp.

Function: warmly-boot (system op)

Perform a warm boot.

This updates the CFFI:*FOREIGN-LIBRARY-DIRECTORIES* variable to a sensible value which should hopefully ensure that your designated libraries are reloaded on boot.

This will also run all :BOOT hooks with the appropriate arguments supplied.

See CFFI:*FOREIGN-LIBRARY-DIRECTORIES*
See RUN-HOOKS

Package

deploy.

Source

deploy.lisp.

Function: xml-escape (string)

Escape the string for XML.

The following replacements are made: "<" => "&lt;"
">" => "&gt;"
"&" => "&amp;

Package

deploy.

Source

toolkit.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   E   F   G   H   L   M   O   P   Q   R   S   W   X  
Index Entry  Section

(
(setf hook): Public ordinary functions
(setf hook-function): Public generic functions
(setf hook-function): Public generic functions
(setf hook-name): Public generic functions
(setf hook-name): Public generic functions
(setf hook-priority): Public generic functions
(setf hook-priority): Public generic functions
(setf hook-type): Public generic functions
(setf hook-type): Public generic functions
(setf library-dont-deploy-p): Public generic functions
(setf library-dont-deploy-p): Public generic functions
(setf library-dont-open-p): Public generic functions
(setf library-dont-open-p): Public generic functions
(setf library-path): Public generic functions
(setf library-path): Public generic functions
(setf library-sources): Public generic functions
(setf library-sources): Public generic functions
(setf library-system): Public generic functions
(setf library-system): Public generic functions

C
call-entry-prepared: Private ordinary functions
close-library: Public generic functions
close-library: Public generic functions
close-library: Public generic functions
copy-directory-tree: Public ordinary functions

D
data-directory: Public ordinary functions
define-hook: Public macros
define-library: Public macros
define-resource-directory: Public macros
deployed-p: Public ordinary functions
directory-contents: Private ordinary functions
discover-entry-point: Public generic functions
discover-entry-point: Public generic functions
discover-subdirectories: Private ordinary functions

E
ensure-library: Public ordinary functions
env-paths: Private ordinary functions
env-set-p: Public ordinary functions

F
find-relative-path-to: Private ordinary functions
find-source-file: Public generic functions
find-source-file: Public generic functions
find-source-file: Public generic functions
Function, (setf hook): Public ordinary functions
Function, call-entry-prepared: Private ordinary functions
Function, copy-directory-tree: Public ordinary functions
Function, data-directory: Public ordinary functions
Function, deployed-p: Public ordinary functions
Function, directory-contents: Private ordinary functions
Function, discover-subdirectories: Private ordinary functions
Function, ensure-library: Public ordinary functions
Function, env-paths: Private ordinary functions
Function, env-set-p: Public ordinary functions
Function, find-relative-path-to: Private ordinary functions
Function, hook: Public ordinary functions
Function, list-libraries: Public ordinary functions
Function, make-lib-pathname: Private ordinary functions
Function, parse-info-plist: Public ordinary functions
Function, pathname-filename: Private ordinary functions
Function, query-for-library-path: Private ordinary functions
Function, quit: Public ordinary functions
Function, redirect-output: Public ordinary functions
Function, remove-hook: Public ordinary functions
Function, resolve-cffi-spec: Private ordinary functions
Function, run-hooks: Public ordinary functions
Function, runtime-directory: Public ordinary functions
Function, split: Private ordinary functions
Function, status: Public ordinary functions
Function, system-applicable-p: Private ordinary functions
Function, warmly-boot: Private ordinary functions
Function, xml-escape: Private ordinary functions

G
Generic Function, (setf hook-function): Public generic functions
Generic Function, (setf hook-name): Public generic functions
Generic Function, (setf hook-priority): Public generic functions
Generic Function, (setf hook-type): Public generic functions
Generic Function, (setf library-dont-deploy-p): Public generic functions
Generic Function, (setf library-dont-open-p): Public generic functions
Generic Function, (setf library-path): Public generic functions
Generic Function, (setf library-sources): Public generic functions
Generic Function, (setf library-system): Public generic functions
Generic Function, close-library: Public generic functions
Generic Function, discover-entry-point: Public generic functions
Generic Function, find-source-file: Public generic functions
Generic Function, hook-function: Public generic functions
Generic Function, hook-name: Public generic functions
Generic Function, hook-priority: Public generic functions
Generic Function, hook-type: Public generic functions
Generic Function, library-dont-deploy-p: Public generic functions
Generic Function, library-dont-open-p: Public generic functions
Generic Function, library-name: Public generic functions
Generic Function, library-open-p: Public generic functions
Generic Function, library-path: Public generic functions
Generic Function, library-sources: Public generic functions
Generic Function, library-system: Public generic functions
Generic Function, open-library: Public generic functions
Generic Function, possible-directories: Public generic functions
Generic Function, possible-pathnames: Public generic functions

H
hook: Public ordinary functions
hook-function: Public generic functions
hook-function: Public generic functions
hook-name: Public generic functions
hook-name: Public generic functions
hook-priority: Public generic functions
hook-priority: Public generic functions
hook-type: Public generic functions
hook-type: Public generic functions

L
library-dont-deploy-p: Public generic functions
library-dont-deploy-p: Public generic functions
library-dont-open-p: Public generic functions
library-dont-open-p: Public generic functions
library-name: Public generic functions
library-name: Public generic functions
library-name: Public generic functions
library-open-p: Public generic functions
library-open-p: Public generic functions
library-open-p: Public generic functions
library-path: Public generic functions
library-path: Public generic functions
library-sources: Public generic functions
library-sources: Public generic functions
library-system: Public generic functions
library-system: Public generic functions
list-libraries: Public ordinary functions

M
Macro, define-hook: Public macros
Macro, define-library: Public macros
Macro, define-resource-directory: Public macros
make-lib-pathname: Private ordinary functions
Method, (setf hook-function): Public generic functions
Method, (setf hook-name): Public generic functions
Method, (setf hook-priority): Public generic functions
Method, (setf hook-type): Public generic functions
Method, (setf library-dont-deploy-p): Public generic functions
Method, (setf library-dont-open-p): Public generic functions
Method, (setf library-path): Public generic functions
Method, (setf library-sources): Public generic functions
Method, (setf library-system): Public generic functions
Method, close-library: Public generic functions
Method, close-library: Public generic functions
Method, discover-entry-point: Public generic functions
Method, find-source-file: Public generic functions
Method, find-source-file: Public generic functions
Method, hook-function: Public generic functions
Method, hook-name: Public generic functions
Method, hook-priority: Public generic functions
Method, hook-type: Public generic functions
Method, library-dont-deploy-p: Public generic functions
Method, library-dont-open-p: Public generic functions
Method, library-name: Public generic functions
Method, library-name: Public generic functions
Method, library-open-p: Public generic functions
Method, library-open-p: Public generic functions
Method, library-path: Public generic functions
Method, library-sources: Public generic functions
Method, library-system: Public generic functions
Method, open-library: Public generic functions
Method, open-library: Public generic functions
Method, output-files: Public standalone methods
Method, output-files: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, possible-directories: Public generic functions
Method, possible-directories: Public generic functions
Method, possible-pathnames: Public generic functions
Method, possible-pathnames: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, shared-initialize: Public standalone methods

O
open-library: Public generic functions
open-library: Public generic functions
open-library: Public generic functions
output-files: Public standalone methods
output-files: Public standalone methods

P
parse-info-plist: Public ordinary functions
pathname-filename: Private ordinary functions
perform: Public standalone methods
perform: Public standalone methods
possible-directories: Public generic functions
possible-directories: Public generic functions
possible-directories: Public generic functions
possible-pathnames: Public generic functions
possible-pathnames: Public generic functions
possible-pathnames: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods

Q
query-for-library-path: Private ordinary functions
quit: Public ordinary functions

R
redirect-output: Public ordinary functions
remove-hook: Public ordinary functions
resolve-cffi-spec: Private ordinary functions
run-hooks: Public ordinary functions
runtime-directory: Public ordinary functions

S
shared-initialize: Public standalone methods
split: Private ordinary functions
status: Public ordinary functions
system-applicable-p: Private ordinary functions

W
warmly-boot: Private ordinary functions

X
xml-escape: Private ordinary functions

Jump to:   (  
C   D   E   F   G   H   L   M   O   P   Q   R   S   W   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   F   N   P   S   T  
Index Entry  Section

*
*compression-factor*: Public special variables
*data-location*: Public special variables
*foreign-libraries-to-reload*: Private special variables
*hooks*: Private special variables
*info-plist-readtable*: Private special variables
*info-plist-template*: Public special variables
*status-output*: Public special variables
*system-source-directories*: Public special variables

D
dont-deploy: Public classes
dont-open: Public classes

F
function: Public classes

N
name: Public classes

P
path: Public classes
priority: Public classes

S
Slot, dont-deploy: Public classes
Slot, dont-open: Public classes
Slot, function: Public classes
Slot, name: Public classes
Slot, path: Public classes
Slot, priority: Public classes
Slot, sources: Public classes
Slot, system: Public classes
Slot, type: Public classes
sources: Public classes
Special Variable, *compression-factor*: Public special variables
Special Variable, *data-location*: Public special variables
Special Variable, *foreign-libraries-to-reload*: Private special variables
Special Variable, *hooks*: Private special variables
Special Variable, *info-plist-readtable*: Private special variables
Special Variable, *info-plist-template*: Public special variables
Special Variable, *status-output*: Public special variables
Special Variable, *system-source-directories*: Public special variables
system: Public classes

T
type: Public classes

Jump to:   *  
D   F   N   P   S   T