(in-package "COMMON-LISP-USER")
;;;*************************************************************************
;;; 
;;; KPML-INSTALLATION.lisp
;;;
;;; 4.0, September 2002
;;; Some startup files moved to the subdirectory Processes/startup to
;;; clean-up the increasingly congested top-level directory.
;;;
;;; 3.0, February 2000
;;;
;;; Dialogue-driven KPML installation as used in all versions of KPML
;;; prior to 3.0. Also contains the advanced configuration options for
;;; multiple sets of compiled binaries and user levels.
;;;
;;;*************************************************************************

(load (merge-pathnames "configuration" *load-pathname*))

;;; ----------------------------------------------------------------------
;;; ***********  Optional configuration options... ***********************
;;; ***********  ONLY CHANGE THESE IF YOU KNOW     ***********************
;;; ***********  WHAT YOU ARE DOING AND WHAT YOU   ***********************
;;; ***********  WANT!                             ***********************
;;; ***********                                    ***********************
;;; ***********  IF YOU DO NOT KNOW WHAT YOU ARE   ***********************
;;; ***********  DOING SHOULD ONLY BE CHANGING THE ***********************
;;; ***********  configuration.lisp FILE !!!!!!    ***********************
;;; ***********  SEE THE TOP-LEVEL README FILE...  ***********************
;;; ----------------------------------------------------------------------
(defvar *kpml-initial-resources* :ml-baseline
  "Resource set to use when resource loading at load-time")
(defvar *kpml-general-resources* :general
  "Resource set to use when loading upper model or general inquiries")
(defvar *configuration-all-languages* nil
  "Initial language configuration")

;;; ----------------------------------------------------------------------
;; *** the following must only be set if the kpml binaries are being ***
;; *** kept in a different place to the source files. This is not    ***
;; *** the case unless you have explicitly organized this to be done ***
;; *** locally. It is particularly useful if you are maintaining     ***
;; *** KPML in parallel with several different Lisp versions. This   ***
;; *** is not often the case for regular users. Hence the            ***
;; **  conditionalization.                                           ***
;;; ----------------------------------------------------------------------

#+kpmldeveloper
(defvar *KPML-BINARIES-ROOT* 
  (pathname #+lispworks4.1 "D:\\KPML\\KPML4-BINARIES\\LWW41-NO-GUI\\"
            #+lispworks4.0 "C:\\KPML\\KPML-BINARIES\\LISPWORKS40\\"
            #+(and mswindows allegro) "D:\\KPML\\KPML4-BINARIES\\ACL5\\"
            #+(and unix allegro) "/opt/bateman/KPML-BINARIES/ACL//"
	    #+clisp              nil))

;;; 2.1 ------------------------------------------------------------------
;;; Oct 98, Edinburgh; added user level to filter complexity for
;;;    new users. Have to recompile to produce a version with non
;;;    default user level. The user level is controlled by placing the required
;;;    levels on the *features* list thus:
;;;
;;; :KPML-LEVEL>= :KPML-L0 : novice level, for users new to computers.
;;;                           Resources can be loaded not saved, no
;;;                           choosers, inquiries, implementations, etc.
;;;                           are assumed. Simple generation is available
;;;                           with inspection of structure.
;;;               :KPML-L1 : beginners, can save modified resources,
;;;                           but no patching and resource versioning.
;;;               :KPML-L2 : Modes can be changed, patching and resource
;;;                           versioning available.
;;;               :KPML-L3 : Creation of resources and other advanced options
;;;                           available.
;;;
;;;   Comment out from below to successively restrict functionality...
;;;   3.1 will only be considered if there is no kpml-level already on 
;;;       the *features* list...
;;; ----------------------------------------------------------------------
#-kpml-level>=
(progn
  (pushnew :kpml-level>= *features*) 
  (pushnew :kpml-l0 *features*)           
  (pushnew :kpml-l1 *features*)
  (pushnew :kpml-l2 *features*)
  (pushnew :kpml-l3 *features*)
  (pushnew :kpml-unrestricted *features*))

;;; ----------------------------------------------------------------------
;;; Start the KPML installation process....
;;; ----------------------------------------------------------------------

(pushnew :KPML *features*)
(defvar *stratification?* nil)
(defvar *questions-during-configuration* T)

(load 
 (merge-pathnames 
  "version-utilities.lisp"
  (merge-pathnames "Processes/startup/" *root-of-kpml*)))

(when (y-or-n-p "Compile KPML system?")
  (load 
   (merge-pathnames 
    "compile-kpml.lisp"
    (merge-pathnames "Processes/startup/" *root-of-kpml*)))
  )

(when (y-or-n-p "Load KPML system?")
  (load 
   (merge-pathnames 
    "load-kpml.lisp"
    (merge-pathnames "Processes/startup/" *root-of-kpml*)))
  )

;;; the following is introduced here for LW Personal Edition
;;; (at least) because the existing value of this variable
;;; NIL is no longer compatible with the required type,
;;; which is a path. 

(setf kpml::*currently-used-file* (pathname "/tmp/junk")) 

;;; ----------------------------------------------------------------------
;;; Done...

       




