source: branches/1.7-appstore/source/cocoa-ide/defsystem.lisp @ 15070

Last change on this file since 15070 was 15070, checked in by rme, 8 years ago

Remove some unused/experimental/broken IDE stuff.

File size: 3.2 KB
Line 
1;;-*-Mode: LISP; Package: CCL -*-
2;;;
3;;;   Copyright (C) 2007 Clozure Associates
4;;;
5
6(in-package "CCL")
7
8(eval-when (:compile-toplevel :execute)
9  (use-interface-dir :cocoa))
10
11;; These are used to communicate with ide-bundle, which must be loaded before objc-support.
12;; They are defvar'ed so the caller can set them before loading us.
13(defvar *cocoa-application-path* nil)
14(defvar *cocoa-application-copy-headers-p* nil)
15(require "IDE-BUNDLE")
16
17(require "OBJC-SUPPORT")
18
19(defpackage "GUI"
20  (:use :common-lisp :ccl)
21  (:import-from
22   "CCL"
23   ;; symbols defined here
24   *cocoa-application-path*
25   *cocoa-application-copy-headers-p*
26   load-ide
27   build-ide
28   ;; Misc symbols that perhaps should be exported from CCL but currently aren't.
29   report-bad-arg
30   native-translated-namestring
31   make-id-map
32   assign-id-map-id
33   id-map-free-object
34   process-thread
35   process-serial-number
36   ensure-directory-pathname
37   recursive-copy-directory
38   application
39   ;; Symbols that perhaps should be exported by ObjC support but aren't
40   @selector
41   *nsapp*
42   with-nsstr
43   %make-nsstring
44   lisp-string-from-nsstring
45   with-autorelease-pool
46   ns-height
47   ns-width
48   *cocoa-event-process*
49   create-autorelease-pool
50   release-autorelease-pool
51   release-canonical-nsobject
52   objc-message-send
53   open-main-bundle
54   )
55  (:export
56   "ABSTRACT-NS-LISP-STRING"
57   "NS-LISP-STRING"
58   "NS-LISP-STRING-STRING"
59   "BACKGROUND-PROCESS-RUN-FUNCTION"
60
61   "EXECUTE-IN-GUI"
62   ))
63
64(defparameter *ide-files*
65  '(;"ide-bundle" - loaded by hand above
66    "constants"
67    "cocoa-utils"
68    "cocoa-defaults"
69    "cocoa-prefs"
70    "cocoa-typeout"
71    "console-window"
72    "cocoa-window"
73    "cocoa-doc"
74    "compile-hemlock"
75    "hemlock"  ;; treated specially below, compile-hemlock must come before.
76    "cocoa-editor"
77    "cocoa-listener"
78    "cocoa-grep"
79    "cocoa-backtrace"
80    "inspector"
81    "project"
82    "preferences"
83    "processes-window"
84    "apropos-window"
85    "file-dialogs"
86    "app-delegate"
87    "search-files"
88    "start"
89    ))
90
91(defun load-ide-files (names src-dir force-compile)
92  (declare (special *hemlock-files*)) ;; kludge
93  (let* ((bin-dir (merge-pathnames ";fasls;" src-dir)))
94    (ensure-directories-exist bin-dir)
95    (with-compilation-unit ()
96      (dolist (name names)
97        (let* ((source (make-pathname :name name :type (pathname-type *.lisp-pathname*)
98                                      :defaults src-dir))
99               (fasl (make-pathname :name name :type (pathname-type *.fasl-pathname*)
100                                    :defaults bin-dir))
101               (sources (cons source
102                              (and (equalp name "hemlock")
103                                   ;; This is defined in compile-hemlock, which is loaded first
104                                   (mapcar #'hemlock-source-pathname *hemlock-files*)))))
105          (if (needs-compile-p fasl sources force-compile)
106            (progn
107              ;; Once compile something, keep compiling, in case macros changed.
108              (setq force-compile t)
109              (compile-file source :output-file fasl :verbose t :load t))
110            (load fasl :verbose t))))))
111  force-compile)
112
113(defun load-ide (&optional force-compile)
114  (load-ide-files *ide-files* "ccl:cocoa-ide;" force-compile)
115  (provide "COCOA"))
Note: See TracBrowser for help on using the repository browser.