diff --git a/templates/projects/clog/run-ql.bat.lt b/templates/projects/clog/run-ql.bat.lt index 24c3e38..24ede20 100644 --- a/templates/projects/clog/run-ql.bat.lt +++ b/templates/projects/clog/run-ql.bat.lt @@ -1 +1 @@ -sbcl --eval "(ql:quickload :<%= (@ sys-name) %>/tools)" --eval "(clog-tools:clog-builder :project :<%= (@ sys-name) %> :port 0 :app t)" \ No newline at end of file +sbcl --eval "(pushnew (uiop:getcwd) ql:*local-project-directories* :test #'equalp)"--eval "(ql:quickload :<%= (@ sys-name) %>/tools)" --eval "(clog-tools:clog-builder :project :<%= (@ sys-name) %> :port 0 :app t)" \ No newline at end of file diff --git a/templates/projects/clog/run-ql.lt b/templates/projects/clog/run-ql.lt index 24c3e38..fe0277a 100644 --- a/templates/projects/clog/run-ql.lt +++ b/templates/projects/clog/run-ql.lt @@ -1 +1 @@ -sbcl --eval "(ql:quickload :<%= (@ sys-name) %>/tools)" --eval "(clog-tools:clog-builder :project :<%= (@ sys-name) %> :port 0 :app t)" \ No newline at end of file +sbcl --eval "(pushnew (uiop:getcwd) ql:*local-project-directories* :test #'equalp)" --eval "(ql:quickload :<%= (@ sys-name) %>/tools)" --eval "(clog-tools:clog-builder :project :<%= (@ sys-name) %> :port 0 :app t)" \ No newline at end of file diff --git a/tools/clog-builder-templates.lisp b/tools/clog-builder-templates.lisp index baf47bf..d40ca0b 100644 --- a/tools/clog-builder-templates.lisp +++ b/tools/clog-builder-templates.lisp @@ -90,8 +90,7 @@ create-div's" (asdf:system-source-directory :clog) (getf tmpl-rec :www)))) (setf (hiddenp (win panel)) t) - (input-dialog - (win panel) "Enter new system name:" + (input-dialog (win panel) "Enter new system name:" (lambda (sys-name) (cond (sys-name (let* ((*default-title-class* *builder-title-class*) diff --git a/tools/panel-project-directory.clog b/tools/panel-project-directory.clog index b1c7040..946242b 100644 --- a/tools/panel-project-directory.clog +++ b/tools/panel-project-directory.clog @@ -1,2 +1,33 @@ -
\ No newline at end of file + +
+ +
\ No newline at end of file diff --git a/tools/panel-project-directory.lisp b/tools/panel-project-directory.lisp index f485efb..608feb8 100644 --- a/tools/panel-project-directory.lisp +++ b/tools/panel-project-directory.lisp @@ -1,26 +1,42 @@ ;;;; CLOG Builder generated code - modify original .clog file and rerender (in-package :clog-tools) (defclass project-dir (clog:clog-panel) - ((select-button :reader select-button) + ((other-button :reader other-button) + (select-button :reader select-button) (project-list :reader project-list) (frame :reader frame) (on-done :accessor on-done :initform nil))) (defun create-project-dir - (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (clog-obj &key hidden class style html-id (auto-place t)) (let ((panel (change-class (clog:create-div clog-obj :content - "
" - :hidden hidden :class class :html-id html-id - :auto-place auto-place) + "
+ +
" + :hidden hidden :class class :style style :html-id + html-id :auto-place auto-place) 'project-dir))) + (setf (slot-value panel 'other-button) + (attach-as-child clog-obj "CLOGB3930207072" :clog-type + 'clog:clog-button :new-id t)) (setf (slot-value panel 'select-button) - (attach-as-child clog-obj "CLOGB3928741017" :clog-type + (attach-as-child clog-obj "CLOGB3930207071" :clog-type 'clog:clog-button :new-id t)) (setf (slot-value panel 'project-list) - (attach-as-child clog-obj "CLOGB3928741016" :clog-type + (attach-as-child clog-obj "CLOGB3930207070" :clog-type 'clog:clog-select :new-id t)) (setf (slot-value panel 'frame) - (attach-as-child clog-obj "CLOGB3928741015" :clog-type + (attach-as-child clog-obj "CLOGB3930207069" :clog-type 'clog:clog-div :new-id t)) (let ((target (project-list panel))) (declare (ignorable target)) @@ -34,4 +50,29 @@ (lambda (target) (declare (ignorable target)) (funcall (on-done panel) panel))) + (clog:set-on-click (other-button panel) + (lambda (target) + (declare (ignorable target)) + (let ((*default-title-class* *builder-title-class*) + (*default-border-class* *builder-border-class*)) + (input-dialog panel "Add Project Directory" + (lambda (result) + (when result + (pushnew result + quicklisp-client:*local-project-directories* + :test #'equalp) + (add-select-option (project-list panel) result + result :selected t) + (let ((*default-title-class* + *builder-title-class*) + (*default-border-class* + *builder-border-class*)) + (alert-dialog panel + (format nil + "~A added to ql:*local-project-directories* temporarily.~% ~ + Use the generated run-ql or run-ocicl scripts in the created project ~% + or add to Options -> Edit preferences.lisp to work with your project in ~% + future." + result) + :width 500 :height 250)))))))) panel)) \ No newline at end of file