Fetching contributors…
Cannot retrieve contributors at this time
50 lines (42 sloc) 2.03 KB
(in-package #:cl-user)
(load "load-stumpwm.lisp")
#-ecl (stumpwm:set-module-dir "@MODULE_DIR@")
(sb-ext:save-lisp-and-die "stumpwm" :toplevel (lambda ()
;; asdf requires sbcl_home to be set, so set it to the value when the image was built
(sb-posix:putenv (format nil "SBCL_HOME=~A" #.(sb-ext:posix-getenv "SBCL_HOME")))
:executable t)
(ext:saveinitmem "stumpwm" :init-function (lambda ()
:executable t :keep-global-handlers t :norc t :documentation "The StumpWM Executable")
(ccl:save-application "stumpwm" :prepend-kernel t :toplevel-function #'stumpwm:stumpwm)
(asdf:make-build 'stumpwm :type :program :monolithic t
:move-here "."
:name-suffix ""
:epilogue-code '(progn
(stumpwm:set-module-dir "@MODULE_DIR@")
;;; if you want to save an image
#+(and lispworks (not lispworks-personal-edition))
(hcl:save-image "stumpwm"
:multiprocessing t
:environment nil
:load-init-files t
:restart-function (compile nil
#'(lambda ()
(lw:quit :status 0))))
;;; if you want to save a standalone executable
#+(and nil lispworks (not lispworks-personal-edition))
(lw:deliver #'stumpwm:stumpwm "stumpwm" 0
:interface nil
:multiprocessing t
:keep-pretty-printer t)
#+(and lispworks lispworks-personal-edition)
(warn "StumpWM can be saved as an image only in LispWorks Pro/Enterprise editions.")