diff --git a/OCICL.md b/OCICL.md index 49dcbb2..8c8abc7 100644 --- a/OCICL.md +++ b/OCICL.md @@ -1,5 +1,8 @@ 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 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 diff --git a/templates/README.md b/templates/README.md index 813dc96..6b0d780 100644 --- a/templates/README.md +++ b/templates/README.md @@ -3,3 +3,4 @@ templates to start new projects www/* - static-file directories commmon to projects projects/* - CLOG Builder templates +common/* - general build scripts and files for new projects \ No newline at end of file diff --git a/templates/common/README.md b/templates/common/README.md new file mode 100644 index 0000000..937e090 --- /dev/null +++ b/templates/common/README.md @@ -0,0 +1,21 @@ +# New CLOG project +### _Your Name _ + +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 diff --git a/templates/projects/clog/run-ocicl.bat.lt b/templates/common/run-ocicl.bat.lt similarity index 100% rename from templates/projects/clog/run-ocicl.bat.lt rename to templates/common/run-ocicl.bat.lt diff --git a/templates/projects/clog/run-ocicl.lt b/templates/common/run-ocicl.lt similarity index 100% rename from templates/projects/clog/run-ocicl.lt rename to templates/common/run-ocicl.lt diff --git a/templates/projects/clog/run-ql.bat.lt b/templates/common/run-ql.bat.lt similarity index 100% rename from templates/projects/clog/run-ql.bat.lt rename to templates/common/run-ql.bat.lt diff --git a/templates/projects/clog/run-ql.lt b/templates/common/run-ql.lt similarity index 100% rename from templates/projects/clog/run-ql.lt rename to templates/common/run-ql.lt diff --git a/templates/projects/clog-gui-panel/README.md b/templates/projects/clog-gui-panel/README.md deleted file mode 100644 index 3e1ddc4..0000000 --- a/templates/projects/clog-gui-panel/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG-GUI project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-gui-sdi/README.md b/templates/projects/clog-gui-sdi/README.md deleted file mode 100644 index 3e1ddc4..0000000 --- a/templates/projects/clog-gui-sdi/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG-GUI project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-gui/README.md b/templates/projects/clog-gui/README.md deleted file mode 100644 index 3e1ddc4..0000000 --- a/templates/projects/clog-gui/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG-GUI project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-panel/README.md b/templates/projects/clog-panel/README.md deleted file mode 100644 index 884a69e..0000000 --- a/templates/projects/clog-panel/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG Web project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-plugin/README.md b/templates/projects/clog-plugin/README.md deleted file mode 100644 index 066ff85..0000000 --- a/templates/projects/clog-plugin/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-web-site/README.md b/templates/projects/clog-web-site/README.md deleted file mode 100644 index 066ff85..0000000 --- a/templates/projects/clog-web-site/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog-web/README.md b/templates/projects/clog-web/README.md deleted file mode 100644 index 884a69e..0000000 --- a/templates/projects/clog-web/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG Web project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/clog/README.md b/templates/projects/clog/README.md deleted file mode 100644 index 702c4bf..0000000 --- a/templates/projects/clog/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# New CLOG project -### _Your Name _ - -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 diff --git a/templates/projects/console/README.md b/templates/projects/console/README.md deleted file mode 100644 index db08a44..0000000 --- a/templates/projects/console/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/templates/projects/full-screen/README.md b/templates/projects/full-screen/README.md deleted file mode 100644 index 884a69e..0000000 --- a/templates/projects/full-screen/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# New CLOG Web project -### _Your Name _ - -This is a project to do ... something. - -## License - -Specify license here diff --git a/tools/clog-builder-settings-controls.lisp b/tools/clog-builder-settings-controls.lisp index e8f6c4d..b6c6d3f 100644 --- a/tools/clog-builder-settings-controls.lisp +++ b/tools/clog-builder-settings-controls.lisp @@ -2416,43 +2416,51 @@ '(:name "Centered Panel Project" :code "nbp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-panel/") '(:name "Full browser Panel Project" :code "nfp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/full-screen/") '(:name "CLOG-GUI MDI Panel Project" :code "nmp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-gui-panel/") '(:name "CLOG-GUI SDI Panel Project" :code "nsp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-gui-sdi/") '(:name "CLOG - General Projects" :code :group) - '(:name "Basic HTML Project" + '(:name "Basic Project" :code "ncp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog/") '(:name "CLOG-GUI Project" :code "ncgp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-gui/") '(:name "CLOG-WEB Project" :code "ncwp" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-web/") '(:name "CLOG-WEB-SITE Project" :code "ncws" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-web-site/") '(:name "CLOG/CLOG Builder - Extension Projects" @@ -2460,6 +2468,7 @@ '(:name "CLOG/CLOG Builder Plugin Project" :code "ncplug" :type :system + :common "templates/common/" :www "templates/www/" :loc "templates/projects/clog-plugin/") '(:name "General Common Lisp Applications" @@ -2467,4 +2476,5 @@ '(:name "Console Application" :code "nca" :type :system + :common "templates/common/" :loc "templates/projects/console/"))) diff --git a/tools/clog-builder-templates.lisp b/tools/clog-builder-templates.lisp index d40ca0b..e276a88 100644 --- a/tools/clog-builder-templates.lisp +++ b/tools/clog-builder-templates.lisp @@ -54,19 +54,20 @@ create-div's" src-file out-file))))))))) (defun fill-template (code dir fname) - (let* ((tmpl-rec (find-if (lambda (x) - (equal (getf x :code) code)) - *supported-templates*)) - (start-dir (format nil "~A~A" - (asdf:system-source-directory :clog) - (getf tmpl-rec :loc))) - (www-dir (format nil "~A~A" - (asdf:system-source-directory :clog) - (getf tmpl-rec :www)))) - (format t "Template copy ~A with www ~A to ~A~%" - start-dir - www-dir - dir) + (let* ((tmpl-rec (find-if (lambda (x) + (equal (getf x :code) code)) + *supported-templates*)) + (start-dir (format nil "~A~A" + (asdf:system-source-directory :clog) + (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" + (asdf:system-source-directory :clog) + (getf tmpl-rec :www)))) + (when (getf tmpl-rec :common) + (template-copy fname common-dir dir :base-dir nil)) (template-copy fname start-dir dir :base-dir nil) (when (getf tmpl-rec :www) (template-copy fname www-dir dir :base-dir nil)) @@ -86,6 +87,9 @@ create-div's" (start-dir (format nil "~A~A" (asdf:system-source-directory :clog) (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" (asdf:system-source-directory :clog) (getf tmpl-rec :www)))) @@ -109,18 +113,20 @@ create-div's" (clog-gui:alert-toast (win panel) "Cancel" "Canceled - Project directory exists") (window-close (win panel))) (t - (template-copy sys-name start-dir filename :panel (window-content (win panel))) - (when (getf tmpl-rec :www) - (template-copy sys-name www-dir filename :panel (window-content (win panel)))) - (asdf:clear-source-registry) - (when (project-win app) - (window-close (project-win app))) + (when (getf tmpl-rec :common) + (template-copy sys-name common-dir filename :panel (window-content (win panel)))) + (template-copy sys-name start-dir filename :panel (window-content (win panel))) + (when (getf tmpl-rec :www) + (template-copy sys-name www-dir filename :panel (window-content (win panel)))) + (asdf:clear-source-registry) + (when (project-win app) + (window-close (project-win app))) (on-show-project panel :project sys-name) - (when (project-tree-win app) - (window-close (project-tree-win app)) - (on-project-tree panel)) - (create-div (window-content (win panel)) :content "
done.")))) + (when (project-tree-win app) + (window-close (project-tree-win app)) + (on-project-tree panel)) + (create-div (window-content (win panel)) :content "
done.")))) (t - (window-close (win panel))))))))) + (window-close (win panel))))))))) (t - (window-close (win panel)))))))) + (window-close (win panel))))))))