;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------- ;;;; File name: defsys.lsp ;;;; System: Case Manager ;;;; Author: Shawn Nicholson ;;;; Created: June 25, 2002 10:02:52 ;;;; Purpose: ;;;; --------------------------------------------------------------------- ;;;; Modified: Saturday, November 15, 2003 at 02:37:34 by madeline ;;;; --------------------------------------------------------------------- (in-package :common-lisp-user) #-qrg (error "You must first load qrg-setup.lisp.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load defsys for other modules required by this system if any (unless (member :fire-case-viewer *features*) (qrg:load-qrg-defsys "fire" "v1" "case-manager" "case-viewer")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Set up package (eval-when (:load-toplevel :compile-toplevel :execute) (defpackage :textual-case-display (:use :common-lisp :qrg))) ;;Provide the ability to move data to a separate package in the future. (eval-when (:compile-toplevel :load-toplevel :execute) (unless (find-package :data) (rename-package (find-package :cl-user) :common-lisp-user ;keep name the same '(:cl-user :user ;replace standard nicknames :data)))) ;add a new nickname (in-package :textual-case-display) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Global variables (defconstant *text-case-display-version* "1.0") ;; current version number (defparameter *text-case-display-path* (append-qrg-path fire-case-viewer::*case-viewer-path* "text-display-and-edit")) (defparameter *text-case-display-files* nil) ;; Function to get case manager path (works for running under executable or ;; devel environment) (defun get-text-case-display-path (&key (subdirs nil) (filename nil) (filetype nil)) (let ((path (qrg:get-path :root-path *text-case-display-path* :subdirs subdirs :filename filename :filetype filetype))) (unless (or (null filename) (probe-file path)) (format t "~%Could not find ~A." path)) path)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; PackDoc stuff (eval-when (:load-toplevel :compile-toplevel :execute) (defmacro export-symbols (subpackage-name doc-string symbols) "Assigns a name and documentation to the group of symbols and exports them from the current package. If PackDoc has been loaded, subpackage documentation will also be generated." `(progn (export ,symbols) (when (member :packdoc *features*) (funcall (intern :subpackage-documentation :packdoc) ,subpackage-name ,symbols ,doc-string))))) #+packdoc (defun generate-text-case-display-documentation (&key (output-path (qrg:append-qrg-path *text-case-display-pathname* "docs")) (overwrite-files? t)) "Generates API documentation for the Case Mapper in HTML format. Files are written to qrg/fire/v1/case-manager/case-viewer/text-display-and-edit/docs/ by default." (flet ((doc-path (filename) (qrg:make-full-file-spec output-path filename ".html"))) (packdoc:document-package-to-file :textual-case-display (doc-path "text-case-display-API") :html nil t :block) #+common-graphics (cg:beep) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load the export file (qrg:load-file *text-case-display-path* "export" :action :load-source) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; List the system files (setq *text-case-display-files* '( "general-utilities" "text-case-display-objects" "case-management-interface" "numbered-datum-list" "individual-editor-popup" "expression-editor-expression" "expression-editor-popup" "text-case-display" "case-viewer-registration" )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Application files that must be shipped with the executable (ru:def-appfiles-dir (qrg:append-qrg-path *text-case-display-path* "icons") "icons\\" :file-filters '("*.gif" "*.jpeg" "*.jpg" "*.avi" "*.bmp")) (ru:def-appfiles-dir (qrg:append-qrg-path *text-case-display-path* "graphics" "icons") "graphics\\icons\\" :file-filters '("*.gif" "*.jpeg" "*.jpg" "*.avi" "*.bmp")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Loading Function (defun load-text-case-display (&key (action :source-if-newer) (verbose t) (force-load nil)) (cond ((and (not force-load) (member :textual-case-display qrg:*modules-loaded*)) (format t "~%;;; Case Manager already loaded.")) (t (qrg:require-system fire-case-viewer::*case-viewer-path* :load-fire-case-viewer :fire-case-viewer :action action :verbose verbose :load-subsystems? nil) ;; Load the text display code now (qrg:load-files (make-qrg-path "Utils") (list "general-utilities") :action action :verbose verbose) (qrg:load-files *text-case-display-path* *text-case-display-files* :action action :verbose verbose) (pushnew :textual-case-display *features*) (pushnew :textual-case-display qrg:*modules-loaded*)) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End Of Code