tools.deploy.shaker: support "stop-after-last-window?".

This only works on macOS right now, but since most every deploy.factor
has it set, we should read it and use it.
char-rename
John Benediktsson 2017-03-05 15:13:24 -08:00
parent 96a0c30baf
commit 8b455d2306
2 changed files with 9 additions and 1 deletions

View File

@ -21,6 +21,13 @@ IN: tools.deploy.shaker
command-line set-global
] "command-line" startup-hooks get set-at ;
: set-stop-after-last-window? ( -- )
get-namestack [ "stop-after-last-window?" swap key? ] any? [
"ui-stop-after-last-window?" "ui.backend" lookup-word [
"stop-after-last-window?" get swap set-global
] when*
] when ;
: strip-startup-hooks ( -- )
"Stripping startup hooks" show
{
@ -632,6 +639,7 @@ SYMBOL: deploy-vocab
"Vocabulary has no MAIN: word." print flush 1 exit
] unless
] tri
set-stop-after-last-window?
strip
"Saving final image" show
save-image-and-exit

View File

@ -6,7 +6,7 @@ IN: ui.backend
SYMBOL: ui-backend
SYMBOL: ui-stop-after-last-window?
ui-stop-after-last-window? [ t ] initialize
t ui-stop-after-last-window? set-global
HOOK: set-title ui-backend ( string world -- )