Permalink
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@")
#+sbcl
(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")))
(stumpwm:stumpwm)
0)
:executable t)
#+clisp
(ext:saveinitmem "stumpwm" :init-function (lambda ()
(stumpwm:stumpwm)
(ext:quit))
:executable t :keep-global-handlers t :norc t :documentation "The StumpWM Executable")
#+ccl
(ccl:save-application "stumpwm" :prepend-kernel t :toplevel-function #'stumpwm:stumpwm)
#+ecl
(asdf:make-build 'stumpwm :type :program :monolithic t
:move-here "."
:name-suffix ""
:epilogue-code '(progn
(stumpwm:set-module-dir "@MODULE_DIR@")
(stumpwm:stumpwm)))
;;; 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 ()
(stumpwm:stumpwm)
(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.")