Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asdf
asdf
Commits
352b0fd7
Commit
352b0fd7
authored
Dec 06, 2013
by
Francois-Rene Rideau
Browse files
Support :application-type :gui for uiop:dump-image on sbcl/windows.
parent
6c357da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
uiop/image.lisp
View file @
352b0fd7
...
@@ -277,7 +277,8 @@ by setting appropriate variables, running various hooks, and calling any specifi
...
@@ -277,7 +277,8 @@ by setting appropriate variables, running various hooks, and calling any specifi
(
defun
dump-image
(
filename
&key
output-name
executable
(
defun
dump-image
(
filename
&key
output-name
executable
(
postlude
*image-postlude*
)
(
postlude
*image-postlude*
)
(
dump-hook
*image-dump-hook*
)
(
dump-hook
*image-dump-hook*
)
#+
clozure
prepend-symbols
#+
clozure
(
purify
t
))
#+
clozure
prepend-symbols
#+
clozure
(
purify
t
)
#+
(
and
sbcl
windows
)
application-type
)
"Dump an image of the current Lisp environment at pathname FILENAME, with various options"
"Dump an image of the current Lisp environment at pathname FILENAME, with various options"
;; Note: at least SBCL saves only global values of variables in the heap image,
;; Note: at least SBCL saves only global values of variables in the heap image,
;; so make sure things you want to dump are NOT just local bindings shadowing the global values.
;; so make sure things you want to dump are NOT just local bindings shadowing the global values.
...
@@ -322,8 +323,9 @@ by setting appropriate variables, running various hooks, and calling any specifi
...
@@ -322,8 +323,9 @@ by setting appropriate variables, running various hooks, and calling any specifi
(
ext:gc
:full
t
)
(
ext:gc
:full
t
)
(
setf
ext:*batch-mode*
nil
)
(
setf
ext:*batch-mode*
nil
)
(
setf
ext::*gc-run-time*
0
)
(
setf
ext::*gc-run-time*
0
)
(
apply
'ext:save-lisp
filename
#+
cmu
:executable
#+
cmu
t
(
apply
'ext:save-lisp
filename
(
when
executable
'
(
:init-function
restore-image
:process-command-line
nil
))))
#+
cmu
:executable
#+
cmu
t
(
when
executable
'
(
:init-function
restore-image
:process-command-line
nil
))))
#+
gcl
#+
gcl
(
progn
(
progn
(
si::set-hole-size
500
)
(
si::gbc
nil
)
(
si::sgc-on
t
)
(
si::set-hole-size
500
)
(
si::gbc
nil
)
(
si::sgc-on
t
)
...
@@ -338,7 +340,10 @@ by setting appropriate variables, running various hooks, and calling any specifi
...
@@ -338,7 +340,10 @@ by setting appropriate variables, running various hooks, and calling any specifi
(
setf
sb-ext::*gc-run-time*
0
)
(
setf
sb-ext::*gc-run-time*
0
)
(
apply
'sb-ext:save-lisp-and-die
filename
(
apply
'sb-ext:save-lisp-and-die
filename
:executable
t
;--- always include the runtime that goes with the core
:executable
t
;--- always include the runtime that goes with the core
(
when
executable
(
list
:toplevel
#'
restore-image
:save-runtime-options
t
))))
;--- only save runtime-options for standalone executables
(
when
executable
(
list
:toplevel
#'
restore-image
:save-runtime-options
t
))
;--- only save runtime-options for standalone executables
#+
(
and
sbcl
windows
)
;; passing :application-type :gui will disable the console window.
;; the default is :console - only works with SBCL 1.1.15 or later.
(
when
application-type
(
list
:application-type
application-type
))))
#-
(
or
allegro
clisp
clozure
cmu
gcl
lispworks
sbcl
scl
)
#-
(
or
allegro
clisp
clozure
cmu
gcl
lispworks
sbcl
scl
)
(
error
"Can't ~S ~S: UIOP doesn't support image dumping with ~A.~%"
(
error
"Can't ~S ~S: UIOP doesn't support image dumping with ~A.~%"
'dump-image
filename
(
nth-value
1
(
implementation-type
))))
'dump-image
filename
(
nth-value
1
(
implementation-type
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment