mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
envelope-panel* load project/tools when starting builder with a project
This commit is contained in:
parent
45a0cf9243
commit
0bbbcc292e
6 changed files with 228 additions and 186 deletions
34
OCICL.md
vendored
34
OCICL.md
vendored
|
|
@ -7,17 +7,21 @@ add them to your asd file and will be downloaded as needed. A simple
|
|||
run of "ocicl latest" updates your project dependecies.
|
||||
|
||||
Once installed either in an empty new project dir or existing project do:
|
||||
(Do not call your project clog, creates asdf circular dependecies.)
|
||||
(Do not call your project clog, that creates an asdf circular dependecy.)
|
||||
|
||||
```
|
||||
ocicl setup > init
|
||||
ocicl install clog
|
||||
```
|
||||
Note for Windows: unzip https://rabbibotton.github.io/clog/clogframe.zip for
|
||||
needed dlls in directory
|
||||
|
||||
Then start to dev with the CLOG Builder:
|
||||
|
||||
```
|
||||
sbcl --userinit init --eval "(asdf:load-system :clog/tools)" --eval "(clog-tools:clog-builder :port 0 :app t)"
|
||||
|
||||
and after first run can use "bash run-ocicl" (or chmod 775 run-oicl to make the batch file executable)
|
||||
```
|
||||
(or replace ecl for sbcl)
|
||||
|
||||
|
|
@ -26,10 +30,14 @@ On Windows:
|
|||
```
|
||||
sbcl --userinit init --eval "(setf asdf:*compile-file-failure-behaviour* :warn)" --eval "(asdf:load-system :clog/tools)" --eval "(clog-tools:clog-builder :port 0 :app t)"
|
||||
|
||||
and after first run can use run-ocicl.bat
|
||||
and after first run can use "run-ocicl.bat"
|
||||
```
|
||||
|
||||
Update ocicl *frequenlty* with:
|
||||
|
||||
```
|
||||
ocicl latest
|
||||
```
|
||||
Note for Windows: unzip https://rabbibotton.github.io/clog/clogframe.zip for
|
||||
needed dlls in directory
|
||||
|
||||
I N S T A L L
|
||||
=============
|
||||
|
|
@ -73,7 +81,7 @@ Create a dir for example projects and cd to it then do:
|
|||
git clone https://github.com/ocicl/ocicl.git
|
||||
```
|
||||
|
||||
the cd in to ocicl and run:
|
||||
the cd in to ocicl and run to create ocicl in ~/.local/bin:
|
||||
|
||||
```
|
||||
sbcl --load setup.lisp
|
||||
|
|
@ -111,12 +119,13 @@ cd to projects/ctest
|
|||
ocicl setup > init
|
||||
ocicl install clog
|
||||
```
|
||||
Note: run frequenlty oclicl latest to get the latest version of clog
|
||||
|
||||
Note for Windows: unzip https://rabbibotton.github.io/clog/clogframe.zip for
|
||||
needed dlls in directory. You may also need to add to sbcl
|
||||
needed dlls in directory. You will also need to add to sbcl
|
||||
--eval "(setf asdf:*compile-file-failure-behaviour* :warn)"
|
||||
|
||||
to use sbcl any time in your own ocicl world use:
|
||||
To use sbcl any time in your own ocicl world use:
|
||||
```
|
||||
sbcl --userinit init
|
||||
```
|
||||
|
|
@ -128,6 +137,13 @@ and to start the builder in sbcl:
|
|||
(clog-tools:clog-builder)
|
||||
```
|
||||
|
||||
If this is the new project a .asd file, first .lisp file and www directory
|
||||
will be created as well. For windows run-ocicl.bat also created.
|
||||
If this is the new project an .asd file, first .lisp file and www directory
|
||||
will be created as well. Batch files that will use your asd files to load
|
||||
plugins are also configured run-ocicl.bat / run-ocicl and run-ql.bat / run-ql
|
||||
are also created.
|
||||
|
||||
Update ocicl frequenlty with:
|
||||
|
||||
```
|
||||
ocicl latest
|
||||
```
|
||||
|
|
|
|||
|
|
@ -150,11 +150,11 @@ nil. Resizable only works if overflow is set to :SCROLL"))
|
|||
|
||||
(defgeneric envelope-panel (clog-element panel width height
|
||||
&key class style units)
|
||||
(:documentation "Create a panel of WIDTH and HEIGHT with :relative
|
||||
positioning to envelope PANEL. This allows any type of clog-panel (including
|
||||
those created by CLOG Builder, to be positioned within DISPLAY :flex or
|
||||
:grid layouts or otherwise treat the panel as an inline object.
|
||||
Returns envelope-panel"))
|
||||
(:documentation "Create a envelope of WIDTH and HEIGHT with :relative
|
||||
positioning to envelope PANEL. The envelope is a child of CLOG-ELEMENT.
|
||||
This allows any type of clog-panel (including those created by CLOG Builder,
|
||||
to be positioned within a DISPLAY :flex or :grid layout or otherwise treat the
|
||||
panel as an inline object. Returns the new envelope of PANEL"))
|
||||
|
||||
(defmethod envelope-panel ((obj clog-element) (panel clog-element)
|
||||
width height
|
||||
|
|
@ -165,6 +165,21 @@ Returns envelope-panel"))
|
|||
(place-inside-top-of e panel)
|
||||
e))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
;; envelope-panel ;;
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defgeneric envelope-panel* (panel width height
|
||||
&key class style units)
|
||||
(:documentation "Like envelope panel, but usses the panels parent as the
|
||||
parent of the envelope. Returns the new envelope of PANEL"))
|
||||
|
||||
(defmethod envelope-panel* ((panel clog-element)
|
||||
width height
|
||||
&key (units :px) class (style ""))
|
||||
(envelope-panel (parent panel) panel width height
|
||||
:units units :class class :style style))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; center-children ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
|
|
@ -650,6 +650,7 @@ embedded in a native template application.)"
|
|||
"CLOG-Panel-Box-Layout"
|
||||
(clog-panel-box-layout class)
|
||||
(envelope-panel generic-function)
|
||||
(envelope-panel* generic-function)
|
||||
(center-children generic-function)
|
||||
(create-panel-box-layout function)
|
||||
(center-panel generic-function)
|
||||
|
|
|
|||
|
|
@ -276,6 +276,8 @@
|
|||
(projects-load sys))
|
||||
|
||||
(defun projects-add-plugin (panel sys)
|
||||
(let ((*default-title-class* *builder-title-class*)
|
||||
(*default-border-class* *builder-border-class*))
|
||||
(input-dialog panel (format nil "Enter plugin name (without /tools), ~
|
||||
plugin will be added to the runtime and designtime:")
|
||||
(lambda (result)
|
||||
|
|
@ -286,7 +288,7 @@
|
|||
(add-dep-to-defsystem sys result)
|
||||
(projects-load sys)
|
||||
(projects-populate panel)))
|
||||
:height 250))
|
||||
:height 250)))
|
||||
|
||||
(defun add-dep-to-defsystem (sys file)
|
||||
(let ((fname (asdf:system-source-file (asdf:find-system sys)))
|
||||
|
|
@ -324,6 +326,8 @@
|
|||
(pprint n s))))))
|
||||
|
||||
(defun projects-add-lisp (panel sys)
|
||||
(let ((*default-title-class* *builder-title-class*)
|
||||
(*default-border-class* *builder-border-class*))
|
||||
(Input-dialog panel "Enter lisp component name (with out .lisp):"
|
||||
(lambda (result)
|
||||
(when result
|
||||
|
|
@ -336,9 +340,11 @@
|
|||
(projects-load sys)
|
||||
(projects-populate panel))))
|
||||
:height 230)
|
||||
(projects-load sys))
|
||||
(projects-load sys)))
|
||||
|
||||
(defun projects-add-clog (panel sys)
|
||||
(let ((*default-title-class* *builder-title-class*)
|
||||
(*default-border-class* *builder-border-class*))
|
||||
(input-dialog panel (format nil "Enter clog component name (with out .clog), ~
|
||||
a lisp component will also be created in the runtime system:")
|
||||
(lambda (result)
|
||||
|
|
@ -359,7 +365,7 @@
|
|||
(add-file-to-defsystem sys result :file)
|
||||
(projects-load sys)
|
||||
(projects-populate panel))))
|
||||
:height 250))
|
||||
:height 250)))
|
||||
|
||||
(defun add-file-to-defsystem (system file ftype)
|
||||
(let ((fname (asdf:system-source-file (asdf:find-system system)))
|
||||
|
|
|
|||
|
|
@ -679,8 +679,12 @@ clog-builder window.")
|
|||
(if project
|
||||
(progn
|
||||
(setf *start-project* (string-downcase (format nil "~A" project)))
|
||||
(projects-load *start-project*)
|
||||
(handler-case
|
||||
(progn
|
||||
(projects-load (format nil "~A/tools" *start-project*))
|
||||
(setf static-root (merge-pathnames "./www/" (format nil "~A" (asdf:system-source-directory project)))))
|
||||
(error ()
|
||||
(projects-load *start-project*))))
|
||||
(setf *start-project* nil))
|
||||
(when dir
|
||||
(setf *start-dir* dir))
|
||||
|
|
|
|||
2
tools/preferences.lisp.sample
vendored
2
tools/preferences.lisp.sample
vendored
|
|
@ -5,7 +5,7 @@
|
|||
;; (pushnew #P"/path/of/projects" ql:*local-project-directories* :test #'equalp)
|
||||
;;
|
||||
;; System to be available but not listed:
|
||||
;; (pushnew #P"/path/to/a/projects" asdf:*central-registry* :test #'equalp)
|
||||
;; (pushnew #P"/path/to/a/project" asdf:*central-registry* :test #'equalp)
|
||||
|
||||
;; Preferences loaded on next call to clog-tools:clog-builder or [Eval All]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue