mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
run builder as an app and make a executable
This commit is contained in:
parent
241c9953a8
commit
b5c33af83e
4 changed files with 25 additions and 5 deletions
1
make-exe
Executable file
1
make-exe
Executable file
|
|
@ -0,0 +1 @@
|
|||
sbcl --eval "(ql:quickload :clog/tools)" --eval "(sb-ext:save-lisp-and-die #P\"./builder\" :toplevel (lambda () (clog-tools:clog-builder :app t)(loop (sleep 10))) :executable t :compression t)"
|
||||
|
|
@ -1 +1 @@
|
|||
sbcl --eval "(ql:quickload :clog/tools)" --eval "(clog-tools:clog-builder)"
|
||||
sbcl --eval "(ql:quickload :clog/tools)" --eval "(clog-tools:clog-builder :app t)"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ script."
|
|||
(*break-on-error* variable)
|
||||
|
||||
(initialize function)
|
||||
(random-port function)
|
||||
(shutdown-clog function)
|
||||
(set-on-connect function)
|
||||
(set-clog-path function)
|
||||
|
|
@ -367,6 +368,17 @@ the default answer. (Private)"
|
|||
(format t "Condition caught in clog-server start-up - ~A.~&" c)
|
||||
(values 0 c))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;
|
||||
;; random-port ;;
|
||||
;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun random-port (&key (host "0.0.0.0"))
|
||||
"Return a random open port on host"
|
||||
(let* ((l (usocket:socket-listen host 0))
|
||||
(p (usocket:get-local-port l)))
|
||||
(usocket:socket-close l)
|
||||
p))
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
;; initialize ;;
|
||||
;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
|
|
@ -2973,16 +2973,20 @@ of controls and double click to select control."
|
|||
(create-gui-menu-full-screen menu))
|
||||
(on-show-control-properties-win body)
|
||||
(on-show-control-list-win body)
|
||||
;; (on-show-control-events-win body)
|
||||
(on-show-copy-history-win body)
|
||||
;; (on-new-builder-panel body)
|
||||
(on-show-project body :project *start-project*)
|
||||
(set-on-before-unload (window body) (lambda(obj)
|
||||
(declare (ignore obj))
|
||||
;; return empty string to prevent nav off page
|
||||
""))))
|
||||
"")))
|
||||
(run body)
|
||||
(when *app-mode*
|
||||
(clog:shutdown)
|
||||
(uiop:quit)))
|
||||
|
||||
(defun clog-builder (&key (port 8080) project static-root system)
|
||||
(defparameter *app-mode* nil)
|
||||
|
||||
(defun clog-builder (&key (port 8080) app project static-root system)
|
||||
"Start clog-builder."
|
||||
(if project
|
||||
(setf *start-project* (string-downcase (format nil "~A" project)))
|
||||
|
|
@ -2990,6 +2994,9 @@ of controls and double click to select control."
|
|||
(when system
|
||||
(setf static-root (merge-pathnames "./www/"
|
||||
(asdf:system-source-directory system))))
|
||||
(when app
|
||||
(setf *app-mode* t)
|
||||
(setf port (clog-connection:random-port)))
|
||||
(if static-root
|
||||
(initialize nil :port port :static-root static-root)
|
||||
(initialize nil :port port))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue