The deploy Reference Manual

Table of Contents

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 2.3 "Robert April" on Wed Mar 14 03:48:38 2018 GMT+0.


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

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.


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

2 Systems

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


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

2.1 deploy

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/deploy

License

Artistic

Description

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

Version

1.0.0

Dependencies
Source

deploy.asd (file)

Components

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

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 files   [Contents][Index]

3.1.1 deploy.asd

Location

deploy.asd

Systems

deploy (system)


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

3.1.2 deploy/package.lisp

Parent

deploy (system)

Location

package.lisp

Packages

deploy


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

3.1.3 deploy/toolkit.lisp

Dependency

package.lisp (file)

Parent

deploy (system)

Location

toolkit.lisp

Exported Definitions
Internal Definitions

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

3.1.4 deploy/library.lisp

Dependency

toolkit.lisp (file)

Parent

deploy (system)

Location

library.lisp

Exported Definitions

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

3.1.5 deploy/hooks.lisp

Dependency

library.lisp (file)

Parent

deploy (system)

Location

hooks.lisp

Exported Definitions
Internal Definitions

*hooks* (special variable)


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

3.1.6 deploy/deploy.lisp

Dependency

hooks.lisp (file)

Parent

deploy (system)

Location

deploy.lisp

Exported Definitions
Internal Definitions

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

3.1.7 deploy/osx.lisp

Dependency

deploy.lisp (file)

Parent

deploy (system)

Location

osx.lisp

Exported Definitions
Internal Definitions

*info-plist-readtable* (special variable)


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

3.1.8 deploy/documentation.lisp

Dependency

osx.lisp (file)

Parent

deploy (system)

Location

documentation.lisp


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

4 Packages

Packages are listed by definition order.


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

4.1 deploy

Source

package.lisp (file)

Nickname

org.shirakumo.deploy

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

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 (file)

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 (file)

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 (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

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:
- :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 (file)

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
See LIBRARY-DONT-DEPLOY

Package

deploy

Source

library.lisp (file)

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 (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 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 (file)

Function: data-directory ()

Return an absolute path to the resource directory.

See DATA-DIRECTORY

Package

deploy

Source

toolkit.lisp (file)

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 (file)

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 (file)

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 (file)

Writer

(setf hook) (function)

Function: (setf hook) HOOK TYPE NAME
Package

deploy

Source

hooks.lisp (file)

Reader

hook (function)

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 (file)

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 (file)

Function: quit &optional SYSTEM OP

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 (file)

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 (file)

Function: remove-hook TYPE NAME

Remove the hook of the given type and name.

See *HOOKS*
See HOOK

Package

deploy

Source

hooks.lisp (file)

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 (file)

Function: runtime-directory ()

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

See UIOP:ARGV0

Package

deploy

Source

toolkit.lisp (file)

Function: status LEVEL FORMAT-STRING &rest FORMAT-ARGS

Print a status message to standard-output.

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

Package

deploy

Source

toolkit.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

Method: close-library (LIBRARY library)
Source

library.lisp (file)

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 (file)

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 (file)

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

library.lisp (file)

Generic Function: 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

Writer

(setf hook-function) (generic function)

Methods
Method: hook-function (HOOK hook)

automatically generated reader method

Source

hooks.lisp (file)

Generic Function: (setf hook-function) NEW-VALUE OBJECT
Package

deploy

Reader

hook-function (generic function)

Methods
Method: (setf hook-function) NEW-VALUE (HOOK hook)

automatically generated writer method

Source

hooks.lisp (file)

Generic Function: hook-name OBJECT

Accessor to the name of the hook.

The name should be a symbol.

See HOOK

Package

deploy

Writer

(setf hook-name) (generic function)

Methods
Method: hook-name (HOOK hook)

automatically generated reader method

Source

hooks.lisp (file)

Generic Function: (setf hook-name) NEW-VALUE OBJECT
Package

deploy

Reader

hook-name (generic function)

Methods
Method: (setf hook-name) NEW-VALUE (HOOK hook)

automatically generated writer method

Source

hooks.lisp (file)

Generic Function: 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

Writer

(setf hook-priority) (generic function)

Methods
Method: hook-priority (HOOK hook)

automatically generated reader method

Source

hooks.lisp (file)

Generic Function: (setf hook-priority) NEW-VALUE OBJECT
Package

deploy

Reader

hook-priority (generic function)

Methods
Method: (setf hook-priority) NEW-VALUE (HOOK hook)

automatically generated writer method

Source

hooks.lisp (file)

Generic Function: hook-type OBJECT

Accessor to the type of the hook.

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

See HOOK

Package

deploy

Writer

(setf hook-type) (generic function)

Methods
Method: hook-type (HOOK hook)

automatically generated reader method

Source

hooks.lisp (file)

Generic Function: (setf hook-type) NEW-VALUE OBJECT
Package

deploy

Reader

hook-type (generic function)

Methods
Method: (setf hook-type) NEW-VALUE (HOOK hook)

automatically generated writer method

Source

hooks.lisp (file)

Generic Function: library-dont-deploy-p OBJECT

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

See LIBRARY

Package

deploy

Writer

(setf library-dont-deploy-p) (generic function)

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

automatically generated reader method

Source

library.lisp (file)

Generic Function: (setf library-dont-deploy-p) NEW-VALUE OBJECT
Package

deploy

Reader

library-dont-deploy-p (generic function)

Methods
Method: (setf library-dont-deploy-p) NEW-VALUE (LIBRARY library)

automatically generated writer method

Source

library.lisp (file)

Generic Function: library-dont-open-p OBJECT

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

See LIBRARY

Package

deploy

Writer

(setf library-dont-open-p) (generic function)

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

automatically generated reader method

Source

library.lisp (file)

Generic Function: (setf library-dont-open-p) NEW-VALUE OBJECT
Package

deploy

Reader

library-dont-open-p (generic function)

Methods
Method: (setf library-dont-open-p) NEW-VALUE (LIBRARY library)

automatically generated writer method

Source

library.lisp (file)

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 (file)

Method: library-name (LIBRARY library)
Source

library.lisp (file)

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 (file)

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

library.lisp (file)

Generic Function: 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

Writer

(setf library-path) (generic function)

Methods
Method: library-path (LIBRARY library)

automatically generated reader method

Source

library.lisp (file)

Generic Function: (setf library-path) NEW-VALUE OBJECT
Package

deploy

Reader

library-path (generic function)

Methods
Method: (setf library-path) NEW-VALUE (LIBRARY library)

automatically generated writer method

Source

library.lisp (file)

Generic Function: library-sources OBJECT

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

See LIBRARY

Package

deploy

Writer

(setf library-sources) (generic function)

Methods
Method: library-sources (LIBRARY library)

automatically generated reader method

Source

library.lisp (file)

Generic Function: (setf library-sources) NEW-VALUE OBJECT
Package

deploy

Reader

library-sources (generic function)

Methods
Method: (setf library-sources) NEW-VALUE (LIBRARY library)

automatically generated writer method

Source

library.lisp (file)

Generic Function: 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

Writer

(setf library-system) (generic function)

Methods
Method: library-system (LIBRARY library)

automatically generated reader method

Source

library.lisp (file)

Generic Function: (setf library-system) NEW-VALUE OBJECT
Package

deploy

Reader

library-system (generic function)

Methods
Method: (setf library-system) NEW-VALUE (LIBRARY library)

automatically generated writer method

Source

library.lisp (file)

Generic Function: open-library LIBRARY

Open/load the library.

See CFFI:LOAD-FOREIGN-LIBRARY

Package

deploy

Methods
Method: open-library LIBRARY
Source

library.lisp (file)

Method: open-library (LIBRARY library)
Source

library.lisp (file)

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 (file)

Method: possible-directories (LIBRARY library)
Source

library.lisp (file)

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 (file)

Method: possible-pathnames (LIBRARY library)
Source

library.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Classes

Class: deploy-op ()

An ASDF operation to perform a deployment.

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

1. 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.
2. 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. 3. The deployment directories are created.
4. The *DATA-LOCATION* path is adapted to be relative to the binary file.
5. The :DEPLOY hooks are run with the appropriate arguments.
6. The :BUILD hooks are run with the appropriate arguments.
7. 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 (file)

Direct superclasses

program-op (class)

Direct subclasses

osx-app-deploy-op (class)

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 (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

hook-name (generic function)

Writers

(setf hook-name) (generic function)

Slot: type
Initargs

:type

Readers

hook-type (generic function)

Writers

(setf hook-type) (generic function)

Slot: function
Initargs

:function

Readers

hook-function (generic function)

Writers

(setf hook-function) (generic function)

Slot: priority
Initargs

:priority

Readers

hook-priority (generic function)

Writers

(setf hook-priority) (generic function)

Direct Default Initargs
InitargValue
:name(error "name required.")
:type(error "type required.")
:function(constantly nil)
:priority0
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 (file)

Direct superclasses

foreign-library (class)

Direct methods
Direct slots
Slot: system
Initargs

:system

Readers

library-system (generic function)

Writers

(setf library-system) (generic function)

Slot: sources
Initargs

:sources

Readers

library-sources (generic function)

Writers

(setf library-sources) (generic function)

Slot: path
Initargs

:path

Readers

library-path (generic function)

Writers

(setf library-path) (generic function)

Slot: dont-open
Initargs

:dont-open

Readers

library-dont-open-p (generic function)

Writers

(setf library-dont-open-p) (generic function)

Slot: dont-deploy
Initargs

:dont-deploy

Readers

library-dont-deploy-p (generic function)

Writers

(setf library-dont-deploy-p) (generic function)

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 (file)

Direct superclasses

deploy-op (class)

Direct methods

output-files (method)


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

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [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 (file)

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 (file)

Special Variable: *info-plist-readtable*

Custom readtable used to parse parts of the info plist.

Package

deploy

Source

osx.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 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 (file)

Function: directory-contents PATH

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

Package

deploy

Source

toolkit.lisp (file)

Function: discover-subdirectories PATH

Return a list of all directories contained in the path.

This includes the path itself.

Package

deploy

Source

toolkit.lisp (file)

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 (file)

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 (file)

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 (file)

Function: pathname-filename PATH

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

Package

deploy

Source

toolkit.lisp (file)

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

deploy

Source

deploy.lisp (file)

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 (file)

Function: split SPLIT STRING

Split the string on each split character.

Empty subsequences are not included.

Package

deploy

Source

toolkit.lisp (file)

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 (file)

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 (file)

Function: xml-escape STRING

Escape the string for XML.

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

Package

deploy

Source

toolkit.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
deploy.asd: The deploy<dot>asd file
deploy/deploy.lisp: The deploy/deploy<dot>lisp file
deploy/documentation.lisp: The deploy/documentation<dot>lisp file
deploy/hooks.lisp: The deploy/hooks<dot>lisp file
deploy/library.lisp: The deploy/library<dot>lisp file
deploy/osx.lisp: The deploy/osx<dot>lisp file
deploy/package.lisp: The deploy/package<dot>lisp file
deploy/toolkit.lisp: The deploy/toolkit<dot>lisp file

F
File, Lisp, deploy.asd: The deploy<dot>asd file
File, Lisp, deploy/deploy.lisp: The deploy/deploy<dot>lisp file
File, Lisp, deploy/documentation.lisp: The deploy/documentation<dot>lisp file
File, Lisp, deploy/hooks.lisp: The deploy/hooks<dot>lisp file
File, Lisp, deploy/library.lisp: The deploy/library<dot>lisp file
File, Lisp, deploy/osx.lisp: The deploy/osx<dot>lisp file
File, Lisp, deploy/package.lisp: The deploy/package<dot>lisp file
File, Lisp, deploy/toolkit.lisp: The deploy/toolkit<dot>lisp file

L
Lisp File, deploy.asd: The deploy<dot>asd file
Lisp File, deploy/deploy.lisp: The deploy/deploy<dot>lisp file
Lisp File, deploy/documentation.lisp: The deploy/documentation<dot>lisp file
Lisp File, deploy/hooks.lisp: The deploy/hooks<dot>lisp file
Lisp File, deploy/library.lisp: The deploy/library<dot>lisp file
Lisp File, deploy/osx.lisp: The deploy/osx<dot>lisp file
Lisp File, deploy/package.lisp: The deploy/package<dot>lisp file
Lisp File, deploy/toolkit.lisp: The deploy/toolkit<dot>lisp file

Jump to:   D   F   L  

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): Exported functions
(setf hook-function): Exported generic functions
(setf hook-function): Exported generic functions
(setf hook-name): Exported generic functions
(setf hook-name): Exported generic functions
(setf hook-priority): Exported generic functions
(setf hook-priority): Exported generic functions
(setf hook-type): Exported generic functions
(setf hook-type): Exported generic functions
(setf library-dont-deploy-p): Exported generic functions
(setf library-dont-deploy-p): Exported generic functions
(setf library-dont-open-p): Exported generic functions
(setf library-dont-open-p): Exported generic functions
(setf library-path): Exported generic functions
(setf library-path): Exported generic functions
(setf library-sources): Exported generic functions
(setf library-sources): Exported generic functions
(setf library-system): Exported generic functions
(setf library-system): Exported generic functions

C
call-entry-prepared: Internal functions
close-library: Exported generic functions
close-library: Exported generic functions
close-library: Exported generic functions
copy-directory-tree: Exported functions

D
data-directory: Exported functions
define-hook: Exported macros
define-library: Exported macros
define-resource-directory: Exported macros
directory-contents: Internal functions
discover-entry-point: Exported generic functions
discover-entry-point: Exported generic functions
discover-subdirectories: Internal functions

E
ensure-library: Exported functions
env-paths: Internal functions
env-set-p: Exported functions

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

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

H
hook: Exported functions
hook-function: Exported generic functions
hook-function: Exported generic functions
hook-name: Exported generic functions
hook-name: Exported generic functions
hook-priority: Exported generic functions
hook-priority: Exported generic functions
hook-type: Exported generic functions
hook-type: Exported generic functions

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

M
Macro, define-hook: Exported macros
Macro, define-library: Exported macros
Macro, define-resource-directory: Exported macros
make-lib-pathname: Internal functions
Method, (setf hook-function): Exported generic functions
Method, (setf hook-name): Exported generic functions
Method, (setf hook-priority): Exported generic functions
Method, (setf hook-type): Exported generic functions
Method, (setf library-dont-deploy-p): Exported generic functions
Method, (setf library-dont-open-p): Exported generic functions
Method, (setf library-path): Exported generic functions
Method, (setf library-sources): Exported generic functions
Method, (setf library-system): Exported generic functions
Method, close-library: Exported generic functions
Method, close-library: Exported generic functions
Method, discover-entry-point: Exported generic functions
Method, find-source-file: Exported generic functions
Method, find-source-file: Exported generic functions
Method, hook-function: Exported generic functions
Method, hook-name: Exported generic functions
Method, hook-priority: Exported generic functions
Method, hook-type: Exported generic functions
Method, library-dont-deploy-p: Exported generic functions
Method, library-dont-open-p: Exported generic functions
Method, library-name: Exported generic functions
Method, library-name: Exported generic functions
Method, library-open-p: Exported generic functions
Method, library-open-p: Exported generic functions
Method, library-path: Exported generic functions
Method, library-sources: Exported generic functions
Method, library-system: Exported generic functions
Method, open-library: Exported generic functions
Method, open-library: Exported generic functions
Method, possible-directories: Exported generic functions
Method, possible-directories: Exported generic functions
Method, possible-pathnames: Exported generic functions
Method, possible-pathnames: Exported generic functions

O
open-library: Exported generic functions
open-library: Exported generic functions
open-library: Exported generic functions

P
parse-info-plist: Exported functions
pathname-filename: Internal functions
possible-directories: Exported generic functions
possible-directories: Exported generic functions
possible-directories: Exported generic functions
possible-pathnames: Exported generic functions
possible-pathnames: Exported generic functions
possible-pathnames: Exported generic functions

Q
query-for-library-path: Internal functions
quit: Exported functions

R
redirect-output: Exported functions
remove-hook: Exported functions
resolve-cffi-spec: Internal functions
run-hooks: Exported functions
runtime-directory: Exported functions

S
split: Internal functions
status: Exported functions
system-applicable-p: Internal functions

W
warmly-boot: Internal functions

X
xml-escape: Internal 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

*
*data-location*: Exported special variables
*foreign-libraries-to-reload*: Internal special variables
*hooks*: Internal special variables
*info-plist-readtable*: Internal special variables
*info-plist-template*: Exported special variables
*system-source-directories*: Exported special variables

D
dont-deploy: Exported classes
dont-open: Exported classes

F
function: Exported classes

N
name: Exported classes

P
path: Exported classes
priority: Exported classes

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

T
type: Exported classes

Jump to:   *  
D   F   N   P   S   T  

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

A.4 Data types

Jump to:   C   D   H   L   O   P   S  
Index Entry  Section

C
Class, deploy-op: Exported classes
Class, hook: Exported classes
Class, library: Exported classes
Class, osx-app-deploy-op: Exported classes

D
deploy: The deploy system
deploy: The deploy package
deploy-op: Exported classes

H
hook: Exported classes

L
library: Exported classes

O
osx-app-deploy-op: Exported classes

P
Package, deploy: The deploy package

S
System, deploy: The deploy system

Jump to:   C   D   H   L   O   P   S