support 'ros dump executable' for ccl

This commit is contained in:
SANO Masatoshi 2015-03-13 07:29:20 +09:00
parent e9a6216171
commit df5578be2b
2 changed files with 13 additions and 3 deletions

View file

@ -83,14 +83,22 @@ exec ros -- $0 "$@"
#'(lambda ()
(setf ros:*argv* (rest sb-ext:*posix-argv*))
(ros:run cmds))
:executable t))
:executable t)
#+ccl
(ccl:save-application
(first params)
:toplevel-function
#'(lambda ()
(setf ros:*argv* (rest (ccl::command-line-arguments)))
(ros:run cmds))
:prepend-kernel t))
(format t "ros dump executable help~%")))
(defvar *subcmds*
'(("list" "List images" dump-list)
("output" "Create dump" dump-output)
("rm" "delete image" dump-rm)
#+sbcl("executable" "Create executable" dump-executable)))
#+(or sbcl ccl)("executable" "Create executable" dump-executable)))
(defun main (subcmd cmd &rest r)
(cond ((and (equal subcmd "main") r)

View file

@ -133,7 +133,9 @@
(with-open-file (in arg)
(let ((line(read-line in)))
(push :ros.script *features*)
(cl:load (make-concatenated-stream
(funcall #+sbcl 'cl:load
#-sbcl 'asdf::eval-input
(make-concatenated-stream
(make-string-input-stream
(format nil "(cl:setf cl:*load-pathname* ~S cl:*load-truename* (truename cl:*load-pathname*))~A" (merge-pathnames (make-pathname :defaults arg))
(if (equal (subseq line 0 (min (length line) 2)) "#!")