Author: junrue Date: Tue Mar 21 02:03:16 2006 New Revision: 61
Added: trunk/config.lisp Modified: trunk/README.txt trunk/build.lisp trunk/graphic-forms-tests.asd trunk/graphic-forms-uitoolkit.asd trunk/tests.lisp Log: build system cleanup
Modified: trunk/README.txt ============================================================================== --- trunk/README.txt (original) +++ trunk/README.txt Tue Mar 21 02:03:16 2006 @@ -9,25 +9,106 @@
Dependencies ------------ -Graphic-Forms depends on the following systems: +Graphic-Forms depends on the following packages:
- ASDF - - CFFI - - macro-utilities - - binary-data - + http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/
-How To Build ------------- + - CFFI 0.9.0 + http://common-lisp.net/project/cffi/ + + - lw-compat + http://common-lisp.net/project/cl-containers/lw-compat/lw-compat_latest.tar.... + + - closer-mop + http://common-lisp.net/project/cl-containers/closer-mop/closer-mop_latest.ta... + + - ImageMagick 6.2.6.5-Q16 + http://www.imagemagick.org/download/binaries/ImageMagick-6.2.6-5-Q16-windows... + + - lisp-unit + http://www.cs.northwestern.edu/academics/courses/325/readings/lisp-unit.html + + +How To Configure and Build +-------------------------- + +1. Install ImageMagick 6.2.6.5-Q16 (note in particular that it is the Q16 + version that is needed, not the Q8 version). The default installation + directory is "c:/Program Files/ImageMagick-6.2.6-Q16/". + +2. Extract the Graphic-Forms distribution archive somewhere on your + machine (or check out the source from Subversion). + +3. Change to the Graphic-Forms top-level directory. + +4. Load ASDF into your Lisp image if it is not already present. + +5. Execute the following forms from your REPL ( + + (load "config.lisp") + + ;; + ;; If ImageMagic is not installed in the default location, execute: + ;; + (setf gfsys::*imagemagick-dir* "c:/path/to/your/ImageMagick/install/")
-Execute the following forms from your REPL: + ;; Update these variables as needed for your specific environment to + ;; load the other dependencies besides ImageMagick. Or if your Lisp + ;; image already has these systems loaded, set these variables to nil. + ;; + ;; gfsys::*cffi-dir* + ;; gfsys::*closer-mop-dir* + ;; gfsys::*lw-compat-dir* + ;; + ;; Set the following var only if you want to run the unit-tests. + ;; Its value is the path to the lisp-unit.lisp source file minus + ;; the file extension. + ;; + ;; gfsys::*lisp-unit-file*
- (load "build.lisp") - (gfsys::build) + ;; Execute the following form to populate asdf:*central-registry* + ;; Note that it will skip any systems whose location variables were + ;; set to nil in the previous step. + ;; + (gfsys::configure-asdf) + + ;; Now load the graphic-forms system and its dependencies. + ;; + (asdf:operate 'asdf:load-op :graphic-forms-uitoolkit) + +6. Proceed to the next section to run the tests, or start coding! + (note: I will add instructions in the future for building the + documentation)
How To Run Tests And Samples ----------------------------
+1. Load the graphic-forms-uitoolkit system as described in the previous + section. + +2. Execute the following forms from your REPL: + + (load (compile-file gfsys::*lisp-unit-file*)) + + (asdf:operate 'asdf:load-op :graphic-forms-tests) + + (chdir "c:/some/path/graphic-forms/src/tests/uitoolkit/") + + ;; then execute one or more of the following: + ;; + + (run-tests) ;; runs the unit tests (many more to be added) + + (gft::run-event-tester) + + (gft::run-image-tester) + + (gft::run-windlg) + + (gft::run-layout-tester) + +
[the end]
Modified: trunk/build.lisp ============================================================================== --- trunk/build.lisp (original) +++ trunk/build.lisp Tue Mar 21 02:03:16 2006 @@ -31,34 +31,23 @@ ;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;
-(defpackage #:graphic-forms-system - (:nicknames #:gfsys) - (:use :common-lisp :asdf)) +(load "config.lisp")
(in-package #:graphic-forms-system)
-(defvar *external-build-dirs* nil) - -(defvar *library-root* "c:/projects/third_party/") +(defvar *library-root* "c:/third_party/") +(defvar *asdf-repo-root* (concatenate 'string *library-root* "asdf-repo/")) (defvar *project-root* "c:/projects/public/")
-(defvar *asdf-root* (concatenate 'string *library-root* "asdf-repo/")) - -(defvar *cffi-dir* (concatenate 'string *asdf-root* "cffi-0.9.0/")) -(defvar *closer-mop-dir* (concatenate 'string *asdf-root* "closer-mop/")) -(defvar *imagemagick-dir* "c:/Program Files/ImageMagick-6.2.6-Q16/") -(defvar *lw-compat-dir* (concatenate 'string *asdf-root* "lw-compat/")) +(setf *cffi-dir* (concatenate 'string *asdf-repo-root* "cffi-0.9.0/")) +(setf *closer-mop-dir* (concatenate 'string *asdf-repo-root* "closer-mop/")) +(setf *imagemagick-dir* "c:/Program Files/ImageMagick-6.2.6-Q16/") +(setf *lw-compat-dir* (concatenate 'string *asdf-repo-root* "lw-compat/")) +(setf *gf-dir* (concatenate 'string *project-root* "graphic-forms/"))
-(defvar *gf-dir* (concatenate 'string *project-root* "graphic-forms/")) (defvar *gf-build-dir* "c:/projects/public/build/graphic-forms/") -(defvar *gf-doc-dir* (concatenate 'string *gf-build-dir* "docs/")) (defvar *gf-tests-dir* (concatenate 'string *gf-dir* "src/tests/uitoolkit/"))
-(defvar *asdf-dirs* (list *cffi-dir* - *closer-mop-dir* - *lw-compat-dir* - *gf-dir*)) - (defvar *library-build-root* (concatenate 'string *library-root* "build/")) (defvar *cffi-build-dir* (concatenate 'string *library-build-root* "cffi/")) (defvar *closer-mop-build-dir* (concatenate 'string *library-build-root* "closer-mop/")) @@ -69,17 +58,14 @@ *lw-compat-build-dir* *gf-build-dir*))
-#+lispworks (defmacro chdir (path) - `(hcl:change-directory ,path)) -#+clisp (defmacro chdir (path) - `(ext:cd ,path)) - (defun build () - (mapc #'(lambda (dir-str) (pushnew dir-str asdf:*central-registry* :test #'equal)) *asdf-dirs*) + + (configure-asdf) + (when *external-build-dirs* (mapc #'(lambda (dir-str) (ensure-directories-exist (parse-namestring dir-str))) *build-dirs*)) - (ensure-directories-exist (parse-namestring *gf-doc-dir*))
+#| (if *external-build-dirs* (chdir *cffi-build-dir*)) (asdf:operate 'asdf:load-op :cffi) @@ -91,6 +77,7 @@ (if *external-build-dirs* (chdir *closer-mop-build-dir*)) (asdf:operate 'asdf:load-op :closer-mop) +|#
(if *external-build-dirs* (chdir *gf-build-dir*))
Added: trunk/config.lisp ============================================================================== --- (empty file) +++ trunk/config.lisp Tue Mar 21 02:03:16 2006 @@ -0,0 +1,58 @@ +;;;; +;;;; config.lisp +;;;; +;;;; Copyright (C) 2006, Jack D. Unrue +;;;; All rights reserved. +;;;; +;;;; Redistribution and use in source and binary forms, with or without +;;;; modification, are permitted provided that the following conditions +;;;; are met: +;;;; +;;;; 1. Redistributions of source code must retain the above copyright +;;;; notice, this list of conditions and the following disclaimer. +;;;; +;;;; 2. Redistributions in binary form must reproduce the above copyright +;;;; notice, this list of conditions and the following disclaimer in the +;;;; documentation and/or other materials provided with the distribution. +;;;; +;;;; 3. Neither the names of the authors nor the names of its contributors +;;;; may be used to endorse or promote products derived from this software +;;;; without specific prior written permission. +;;;; +;;;; THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND ANY +;;;; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +;;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- +;;;; CLAIMED. IN NO EVENT SHALL THE AUTHORS AND CONTRIBUTORS BE LIABLE FOR ANY +;;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +;;;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +;;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +;;;; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;;;; + +(defpackage #:graphic-forms-system + (:nicknames #:gfsys) + (:use :common-lisp :asdf)) + +(in-package #:graphic-forms-system) + +(defvar *external-build-dirs* nil) + +(defvar *cffi-dir* "cffi-0.9.0/") +(defvar *closer-mop-dir* "closer-mop/") +(defvar *imagemagick-dir* "c:/Program Files/ImageMagick-6.2.6-Q16/") +(defvar *lw-compat-dir* "lw-compat/") +(defvar *gf-dir* "graphic-forms/") + +(defvar *lisp-unit-file* "lisp-unit") + +#+lispworks (defmacro chdir (path) + `(hcl:change-directory ,path)) +#+clisp (defmacro chdir (path) + `(ext:cd ,path)) + +(defun configure-asdf () + (pushnew *cffi-dir* asdf:*central-registry* :test #'equal) + (pushnew *closer-mop-dir* asdf:*central-registry* :test #'equal) + (pushnew *lw-compat-dir* asdf:*central-registry* :test #'equal))
Modified: trunk/graphic-forms-tests.asd ============================================================================== --- trunk/graphic-forms-tests.asd (original) +++ trunk/graphic-forms-tests.asd Tue Mar 21 02:03:16 2006 @@ -33,6 +33,10 @@
(in-package #:graphic-forms-system)
+(defpackage #:graphic-forms.uitoolkit.tests + (:nicknames #:gft) + (:use :common-lisp :lisp-unit)) + (print "Graphic-Forms UI Toolkit Tests") (print "Copyright (c) 2006 by Jack D. Unrue") (print " ")
Modified: trunk/graphic-forms-uitoolkit.asd ============================================================================== --- trunk/graphic-forms-uitoolkit.asd (original) +++ trunk/graphic-forms-uitoolkit.asd Tue Mar 21 02:03:16 2006 @@ -42,6 +42,7 @@ :version "0.2.0" :author "Jack D. Unrue" :licence "BSD" + :depends-on ("cffi" "lw-compat" "closer-mop") :components ((:module "src" :components
Modified: trunk/tests.lisp ============================================================================== --- trunk/tests.lisp (original) +++ trunk/tests.lisp Tue Mar 21 02:03:16 2006 @@ -33,14 +33,8 @@
(in-package #:graphic-forms-system)
-(defvar *lisp-unit-file* (concatenate 'string *library-root* "lisp-unit")) - (load (compile-file *lisp-unit-file*))
-(defpackage #:graphic-forms.uitoolkit.tests - (:nicknames #:gft) - (:use :common-lisp :lisp-unit)) - (defun load-tests () (if *external-build-dirs* (chdir *gf-build-dir*))