add :common templates, setup-ocicl

This commit is contained in:
David Botton 2024-07-17 10:42:36 -04:00
parent 604ae6af47
commit 2fd68eec36
19 changed files with 67 additions and 109 deletions

3
OCICL.md vendored
View file

@ -1,5 +1,8 @@
OCICL is a complete secure alternative to a QuickLisp CLOG install OCICL is a complete secure alternative to a QuickLisp CLOG install
Note: New project temlates contain setup-ocicl and run-ocicl for builder
so only need to install OCICL.
OCICL loads dependencies with your project. Once setup the command line OCICL loads dependencies with your project. Once setup the command line
tool ocicl is used to prepare a directory for a new project or to convert tool ocicl is used to prepare a directory for a new project or to convert
and existing project to an ocicl based one. To add dependecies you just and existing project to an ocicl based one. To add dependecies you just

1
templates/README.md vendored
View file

@ -3,3 +3,4 @@ templates to start new projects
www/* - static-file directories commmon to projects www/* - static-file directories commmon to projects
projects/* - CLOG Builder templates projects/* - CLOG Builder templates
common/* - general build scripts and files for new projects

21
templates/common/README.md vendored Normal file
View file

@ -0,0 +1,21 @@
# New CLOG project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
To use your installed QuickLisp
bash run-ql / run-ql.bat - run the clog-builder for this project if using QuickLisp
To use OCICL setup before (install OCICL if needed)
bash setup-ocicl / setup-ocicl.bat - setup project to use ocicl - see
https://github.com/rabbibotton/clog/blob/main/OCICL.md
bash run-ocicl / run-ocicl.bat - run the clog-builder for this project if using ocicl
# License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG-GUI project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG-GUI project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG-GUI project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG Web project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG Web project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,11 +0,0 @@
# New CLOG project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
run-ocicl.bat - run the clog-builder for this project if using ocicl
run-ql.bat - run the clog-builder for this project if using QuickLisp
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -1,8 +0,0 @@
# New CLOG Web project
### _Your Name <your.name@example.com>_
This is a project to do ... something.
## License
Specify license here

View file

@ -2416,43 +2416,51 @@
'(:name "Centered Panel Project" '(:name "Centered Panel Project"
:code "nbp" :code "nbp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-panel/") :loc "templates/projects/clog-panel/")
'(:name "Full browser Panel Project" '(:name "Full browser Panel Project"
:code "nfp" :code "nfp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/full-screen/") :loc "templates/projects/full-screen/")
'(:name "CLOG-GUI MDI Panel Project" '(:name "CLOG-GUI MDI Panel Project"
:code "nmp" :code "nmp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-gui-panel/") :loc "templates/projects/clog-gui-panel/")
'(:name "CLOG-GUI SDI Panel Project" '(:name "CLOG-GUI SDI Panel Project"
:code "nsp" :code "nsp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-gui-sdi/") :loc "templates/projects/clog-gui-sdi/")
'(:name "CLOG - General Projects" '(:name "CLOG - General Projects"
:code :group) :code :group)
'(:name "Basic HTML Project" '(:name "Basic Project"
:code "ncp" :code "ncp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog/") :loc "templates/projects/clog/")
'(:name "CLOG-GUI Project" '(:name "CLOG-GUI Project"
:code "ncgp" :code "ncgp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-gui/") :loc "templates/projects/clog-gui/")
'(:name "CLOG-WEB Project" '(:name "CLOG-WEB Project"
:code "ncwp" :code "ncwp"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-web/") :loc "templates/projects/clog-web/")
'(:name "CLOG-WEB-SITE Project" '(:name "CLOG-WEB-SITE Project"
:code "ncws" :code "ncws"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-web-site/") :loc "templates/projects/clog-web-site/")
'(:name "CLOG/CLOG Builder - Extension Projects" '(:name "CLOG/CLOG Builder - Extension Projects"
@ -2460,6 +2468,7 @@
'(:name "CLOG/CLOG Builder Plugin Project" '(:name "CLOG/CLOG Builder Plugin Project"
:code "ncplug" :code "ncplug"
:type :system :type :system
:common "templates/common/"
:www "templates/www/" :www "templates/www/"
:loc "templates/projects/clog-plugin/") :loc "templates/projects/clog-plugin/")
'(:name "General Common Lisp Applications" '(:name "General Common Lisp Applications"
@ -2467,4 +2476,5 @@
'(:name "Console Application" '(:name "Console Application"
:code "nca" :code "nca"
:type :system :type :system
:common "templates/common/"
:loc "templates/projects/console/"))) :loc "templates/projects/console/")))

View file

@ -54,19 +54,20 @@ create-div's"
src-file out-file))))))))) src-file out-file)))))))))
(defun fill-template (code dir fname) (defun fill-template (code dir fname)
(let* ((tmpl-rec (find-if (lambda (x) (let* ((tmpl-rec (find-if (lambda (x)
(equal (getf x :code) code)) (equal (getf x :code) code))
*supported-templates*)) *supported-templates*))
(start-dir (format nil "~A~A" (start-dir (format nil "~A~A"
(asdf:system-source-directory :clog) (asdf:system-source-directory :clog)
(getf tmpl-rec :loc))) (getf tmpl-rec :loc)))
(www-dir (format nil "~A~A" (common-dir (format nil "~A~A"
(asdf:system-source-directory :clog) (asdf:system-source-directory :clog)
(getf tmpl-rec :www)))) (getf tmpl-rec :common)))
(format t "Template copy ~A with www ~A to ~A~%" (www-dir (format nil "~A~A"
start-dir (asdf:system-source-directory :clog)
www-dir (getf tmpl-rec :www))))
dir) (when (getf tmpl-rec :common)
(template-copy fname common-dir dir :base-dir nil))
(template-copy fname start-dir dir :base-dir nil) (template-copy fname start-dir dir :base-dir nil)
(when (getf tmpl-rec :www) (when (getf tmpl-rec :www)
(template-copy fname www-dir dir :base-dir nil)) (template-copy fname www-dir dir :base-dir nil))
@ -86,6 +87,9 @@ create-div's"
(start-dir (format nil "~A~A" (start-dir (format nil "~A~A"
(asdf:system-source-directory :clog) (asdf:system-source-directory :clog)
(getf tmpl-rec :loc))) (getf tmpl-rec :loc)))
(common-dir (format nil "~A~A"
(asdf:system-source-directory :clog)
(getf tmpl-rec :common)))
(www-dir (format nil "~A~A" (www-dir (format nil "~A~A"
(asdf:system-source-directory :clog) (asdf:system-source-directory :clog)
(getf tmpl-rec :www)))) (getf tmpl-rec :www))))
@ -109,18 +113,20 @@ create-div's"
(clog-gui:alert-toast (win panel) "Cancel" "Canceled - Project directory exists") (clog-gui:alert-toast (win panel) "Cancel" "Canceled - Project directory exists")
(window-close (win panel))) (window-close (win panel)))
(t (t
(template-copy sys-name start-dir filename :panel (window-content (win panel))) (when (getf tmpl-rec :common)
(when (getf tmpl-rec :www) (template-copy sys-name common-dir filename :panel (window-content (win panel))))
(template-copy sys-name www-dir filename :panel (window-content (win panel)))) (template-copy sys-name start-dir filename :panel (window-content (win panel)))
(asdf:clear-source-registry) (when (getf tmpl-rec :www)
(when (project-win app) (template-copy sys-name www-dir filename :panel (window-content (win panel))))
(window-close (project-win app))) (asdf:clear-source-registry)
(when (project-win app)
(window-close (project-win app)))
(on-show-project panel :project sys-name) (on-show-project panel :project sys-name)
(when (project-tree-win app) (when (project-tree-win app)
(window-close (project-tree-win app)) (window-close (project-tree-win app))
(on-project-tree panel)) (on-project-tree panel))
(create-div (window-content (win panel)) :content "<hr><b>done.</b>")))) (create-div (window-content (win panel)) :content "<hr><b>done.</b>"))))
(t (t
(window-close (win panel))))))))) (window-close (win panel)))))))))
(t (t
(window-close (win panel)))))))) (window-close (win panel))))))))