Difference between revisions of "Common Lisp Creating A New Project"

From copec
Jump to: navigation, search
(Edit Stuff)
Line 47: Line 47:
 
               #:cl-colors)
 
               #:cl-colors)
 
   :components ((:file "package")
 
   :components ((:file "package")
 +
              (:file "swatchblade")))
 +
</pre>
 +
==== Add source files ''utils'', ''graphics'', ''web''====
 +
<pre>
 +
(asdf:defsystem #:swatchblade
 +
  :serial t
 +
  :depends-on (#:vecto
 +
              #:hunchentoot)
 +
  :components ((:file "package")
 +
              (:file "utils")
 +
              (:file "graphics")
 +
              (:file "web")
 
               (:file "swatchblade")))
 
               (:file "swatchblade")))
 
</pre>
 
</pre>

Revision as of 12:31, 15 September 2016

Overview

Template procedure on how to create new Common Lisp project. Totally stolen from:

Project Creation (Steps)

Make Sure Environment is Setup

Install quickproject

CL-USER> (ql:quickload "quickproject")

Create Project

CL-USER> (quickproject:make-project "~/org.unaen.dev.src/lisp/swatchblade/"
                             :depends-on '(vecto hunchentoot))
"swatchblade"

Default Files Created

~/org.unaen.dev.src/lisp/swatchblade/

  • package.lisp
  • swatchblade.lisp
  • swatchblade.asd
  • README.txt

Edit Stuff

Hack the planet starting in swatchblade.lisp

Import symbols under package.lisp

(defpackage #:swatchblade
  (:use #:cl)
  (:shadowing-import-from #:vecto
                          #:with-canvas
                          #:rounded-rectangle
                          #:set-rgb-fill
                          #:save-png-stream))

Add libraries under swatchblade.asd

(asdf:defsystem #:swatchblade
  :serial t
  :depends-on (#:vecto
               #:hunchentoot
               #:cl-colors)
  :components ((:file "package")
               (:file "swatchblade")))

Add source files utils, graphics, web

(asdf:defsystem #:swatchblade
  :serial t
  :depends-on (#:vecto
               #:hunchentoot)
  :components ((:file "package")
               (:file "utils")
               (:file "graphics")
               (:file "web")
               (:file "swatchblade")))

Load Project

CL-USER> (ql:quickload "swatchblade")