forked from stumpwm/stumpwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-image.lisp.in
49 lines (42 loc) · 2.04 KB
/
make-image.lisp.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(in-package #:cl-user)
(load "load-stumpwm.lisp")
#-ecl (stumpwm:set-contrib-dir "@CONTRIB_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-contrib-dir "@CONTRIB_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.")