deploy
3.0.0Tools to aid in the deployment of a fully standalone application.
Table of Contents
System Information
Definition Index
-
DEPLOY
- ORG.SHIRAKUMO.DEPLOY
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *BUILD-TIME*
If true pre-build, is set to the universal-time on build.
-
EXTERNAL SPECIAL-VARIABLE *COMPRESSION-FACTOR*
No documentation provided. -
EXTERNAL 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
-
EXTERNAL SPECIAL-VARIABLE *SBCL-SOURCE-TREE*
Path to the SBCL source tree's root. This tree must have already been used to build the same SBCL you want to deploy with. Will try to auto-detect the path based on the logical pathname translations of SYS.
-
EXTERNAL SPECIAL-VARIABLE *SOURCE-CHECKSUM*
If true pre-build, is set to the checksum of all source files on build. See SOURCE-CHECKSUM
-
EXTERNAL 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
-
EXTERNAL 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.
-
EXTERNAL CLASS DEPLOY-CONSOLE-OP
-
EXTERNAL CLASS DEPLOY-IMAGE-OP
-
EXTERNAL CLASS DEPLOY-OP
An operation to perform a deployment. When ASDF is available, this is also an ASDF:OPERATION. 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. See DEPLOY See ENTRY-POINT See OUTPUT-FILE See LIST-LIBRARIES See *FOREIGN-LIBRARIES-TO-RELOAD* See *DATA-LOCATION* See RUN-HOOKS
-
EXTERNAL 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
-
EXTERNAL 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-SOURCES See LIBRARY-PATH See LIBRARY-DONT-OPEN-P See LIBRARY-DONT-DEPLOY-P See FIND-SOURCE-FILE
-
EXTERNAL CLASS SHRINKWRAP-OP
No documentation provided. -
EXTERNAL FUNCTION COMMAND-LINE-ARGUMENTS
No documentation provided. -
EXTERNAL FUNCTION COPY-DIRECTORY-TREE
- SOURCE
- TARGET
- &KEY
- COPY-ROOT
- EXCLUDE
- IF-EXISTS
- &REST
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. EXCLUDE may be a function of one argument, a source path, which returns a boolean designating whether the source file should be excluded or not. See COPY-FILE
-
EXTERNAL FUNCTION COPY-FILE
- SOURCE
- TARGET
- &KEY
- IF-EXISTS
- &REST
Copy the source to the target file. IF-EXISTS may be one of the following values, governing what to do if the destination file exists already: :REPLACE :SUPERSEDE :OVERWRITE --- Replaces the file regardless NIL :IGNORE --- Does nothing :ERROR --- Signals an error :UPDATE --- Replaces the file if its write date is older than the source file's See COPY-DIRECTORY-TREE
-
EXTERNAL FUNCTION DATA-DIRECTORY
Return an absolute path to the resource directory. See DATA-DIRECTORY
-
EXTERNAL FUNCTION DEPLOYED-P
Returns T if the current Lisp environment has been booted from a deployed executable.
-
EXTERNAL FUNCTION ENSURE-LIBRARY
- LIBRARY
- &REST
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
-
EXTERNAL FUNCTION ENV-SET-P
- ENVVAR
- &REST
Returns the value of the given environment variable if it is set to a non-empty value.
-
EXTERNAL FUNCTION ENVVAR
- X
- &REST
Returns the value of the given environment variable. May return NIL or an empty string if the variable is unset.
-
EXTERNAL FUNCTION ENVVAR-DIRECTORIES
- VARIABLE
- &REST
Returns the paths contained in the given environment variable. For Windows systems, the split character is ; otherwise it is : See ENVVAR
-
EXTERNAL FUNCTION ENVVAR-DIRECTORY
- VAR
- &REST
Returns the environment variable as a pathname directory. See ENVVAR
-
EXTERNAL FUNCTION FEATUREP
- FEATURE
- &REST
Returns true if the given name names a feature. See CL:*FEATURES*
-
EXTERNAL FUNCTION HOOK
- TYPE
- NAME
- &REST
Accessor to the hook instance of the given type and name. See *HOOKS* See HOOK See REMOVE-HOOK
-
EXTERNAL FUNCTION (SETF HOOK)
- HOOK
- TYPE
- NAME
- &REST
No documentation provided. -
EXTERNAL FUNCTION LIST-ALL-SOURCE-FILES
Returns a list of all source files of the current system state, if possible. If ASDF is available this uses the list of loaded system and their descriptions to compute the list.
-
EXTERNAL 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
-
EXTERNAL FUNCTION QUIT
- &OPTIONAL
- EXIT-CODE
- &REST
- ARGS
- &REST
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
-
EXTERNAL FUNCTION REDIRECT-OUTPUT
- TARGET
- &REST
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.
-
EXTERNAL FUNCTION REMOVE-HOOK
- TYPE
- NAME
- &REST
-
EXTERNAL FUNCTION RUN-HOOKS
- TYPE
- &REST
- ARGS
- &REST
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
-
EXTERNAL FUNCTION RUNTIME-DIRECTORY
Returns a pathname to the directory where the executable is being run in. See UIOP:ARGV0
-
EXTERNAL FUNCTION SHRINKWRAP
- SYSTEM
- &REST
- ARGS
- &KEY
- &ALLOW-OTHER-KEYS
- &REST
Shrinkwrap the given ASDF system. This is the same as (ASDF:OOS 'DEPLOY:SHRINKWRAP-OP system args...) See SHRINKWRAP-OP
-
EXTERNAL FUNCTION SOURCE-CHECKSUM
- &OPTIONAL
- FILES
- &REST
Computes a checksum of the given source files. The source files are sorted by their truenames in order to ensure consistency regardless of order. By default the output of LIST-ALL-SOURCE-FILES is used. See LIST-ALL-SOURCE-FILES See *SOURCE-CHECKSUM*
-
EXTERNAL FUNCTION STATUS
- LEVEL
- FORMAT-STRING
- &REST
- FORMAT-ARGS
- &REST
Print a status message to *status-output*. The level determines the granularity of the message. Higher levels mean "more detailed". See *STATUS-OUTPUT*
-
EXTERNAL GENERIC-FUNCTION CLOSE-LIBRARY
- LIBRARY
- &REST
Close/unload the library. See LIBRARY See CFFI:CLOSE-FOREIGN-LIBRARY
-
EXTERNAL GENERIC-FUNCTION DEPLOY
- OP
- &REST
- ARGS
- &KEY
- TYPE
- SYSTEM
- ENTRY-POINT
- &ALLOW-OTHER-KEYS
- &REST
Performs a deployment. If the target is a pathname, a deployment is performed directly without running any hooks. If the target is a symbol, an operation object is created according to that symbol's type and the extra arguments provided. If the target is an operation object, deployment is performed according to that operation, running hooks as needed, ultimately running DEPLOY with the intended target pathname. If an ENTRY-POINT is given, that function will be invoked on boot. If a TYPE is given, it designates the kind of deployment to perform. It may be one of :EXECUTABLE -- A GUI application is deployed. :CONSOLE -- A console application is deployed. :IMAGE -- An image core file is deployed.
-
EXTERNAL GENERIC-FUNCTION ENTRY-POINT
- OBJECT
- &REST
-
EXTERNAL GENERIC-FUNCTION (SETF ENTRY-POINT)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FIND-SOURCE-FILE
- LIBRARY
- &REST
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 LIBRARY See POSSIBLE-DIRECTORIES See POSSIBLE-PATHNAMES
-
EXTERNAL GENERIC-FUNCTION HOOK-FUNCTION
- OBJECT
- &REST
-
EXTERNAL GENERIC-FUNCTION (SETF HOOK-FUNCTION)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HOOK-NAME
- OBJECT
- &REST
Accessor to the name of the hook. The name should be a symbol. See HOOK
-
EXTERNAL GENERIC-FUNCTION (SETF HOOK-NAME)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HOOK-PRIORITY
- OBJECT
- &REST
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
-
EXTERNAL GENERIC-FUNCTION (SETF HOOK-PRIORITY)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HOOK-TYPE
- OBJECT
- &REST
Accessor to the type of the hook. The type can be one of :LOAD :BUILD :DEPLOY :BOOT :QUIT. See HOOK
-
EXTERNAL GENERIC-FUNCTION (SETF HOOK-TYPE)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LIBRARY-DEPENDENCIES
- LIBRARY
- &REST
Return the library's dependant libraries, if possible. The returned value is a list of string names of the libraries. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION LIBRARY-DONT-DEPLOY-P
- OBJECT
- &REST
Accessor to whether to deploy (copy) the library to the resources directory on build. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION (SETF LIBRARY-DONT-DEPLOY-P)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LIBRARY-DONT-OPEN-P
- OBJECT
- &REST
Accessor to whether the library should not be opened on boot. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION (SETF LIBRARY-DONT-OPEN-P)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LIBRARY-NAME
- LIBRARY
- &REST
Return the library's name. See CFFI:FOREIGN-LIBRARY-NAME See LIBRARY
-
EXTERNAL GENERIC-FUNCTION LIBRARY-OPEN-P
- LIBRARY
- &REST
Returns whether the library is currently open. See LIBRARY See CFFI:FOREIGN-LIBRARY-LOADED-P
-
EXTERNAL GENERIC-FUNCTION LIBRARY-PATH
- OBJECT
- &REST
Accessor to the definite path to the library's source file. If this is NIL, the library could not be found. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION (SETF LIBRARY-PATH)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LIBRARY-SONAME
- LIBRARY
- &REST
Return the library's encoded soname, if possible. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION LIBRARY-SOURCES
- OBJECT
- &REST
Accessor to the list of additional paths to search for source files. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION (SETF LIBRARY-SOURCES)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPEN-LIBRARY
- LIBRARY
- &REST
Open/load the library. See LIBRARY See CFFI:LOAD-FOREIGN-LIBRARY
-
EXTERNAL GENERIC-FUNCTION OUTPUT-FILE
- OBJECT
- &REST
Accesses the target output file of the deployment operation. If NIL a file will be picked for you. In the case of an ASDF operation, this will be a file named after the system being operated on, and the directory will be a subdirectory called bin/ within the system's source directory. Otherwise the bin/ directory within Deploy's source directory will be used and the name will simply be "application". See DEPLOY See DEPLOY-OP
-
EXTERNAL GENERIC-FUNCTION (SETF OUTPUT-FILE)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PATCH-DEPENDENCIES
- LIBRARY
- CHANGES
- &REST
Patch the library's encoded dependencies to match the given spec. The spec should be a list of lists, each inner list having two elements, the first being the name of the dependency to change, and the second being the name to change it to. Can be invoked with a LIBRARY, a LIBRARY designator, or a pathname of the library file to patch. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION PATCH-SONAME
- LIBRARY
- &REST
Patch the library's encoded soname to match the file name. Can be invoked with a LIBRARY, a LIBRARY designator, or a pathname of the library file to patch. See LIBRARY
-
EXTERNAL GENERIC-FUNCTION POSSIBLE-DIRECTORIES
- LIBRARY
- &REST
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 ENVVAR-DIRECTORIES
-
EXTERNAL GENERIC-FUNCTION POSSIBLE-PATHNAMES
- LIBRARY
- &REST
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
-
EXTERNAL MACRO DEFINE-HOOK
- TYPE
- NAME
- &OPTIONAL
- PRIORITY
- &REST
- ARGS
- &BODY
- BODY
- &REST
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
-
EXTERNAL MACRO DEFINE-LIBRARY
- NAME
- &BODY
- INITARGS
- &REST
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
-
EXTERNAL MACRO DEFINE-RESOURCE-DIRECTORY
- NAME
- DIRECTORY
- &KEY
- COPY-ROOT
- &REST
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