Skip to content

Commit

Permalink
1. Refactored GEM / Opal interface trying to remove circular dependen…
Browse files Browse the repository at this point in the history
…cies. Still some work to do on this. Besides that, there's a triangular dependency between GEM, the Interactors and Opal that will probably always be there. That is, GEM calls Interactor code that calls Opal code. I think this is OK but I haven't really thought about it.

2. Added CCL support. The system builds but breaks at the end on a type error that I will have to track down. The system will load with "garnet-load" and run most of the demos OK.



git-svn-id: svn://svn.code.sf.net/p/garnetlisp/svn/branches/3.3-devel@7 8c52f7fe-b2e1-4dd8-9948-e05ad466d5bd
  • Loading branch information
rotgut committed Jun 12, 2013
1 parent 76d1fb0 commit bebf5dd
Show file tree
Hide file tree
Showing 30 changed files with 506 additions and 3,223 deletions.
7 changes: 7 additions & 0 deletions build-garnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
SBCL=/usr/local/bin/sbcl
CMUCL=/usr/local/bin/lisp
ACL=/usr/local/allegro/8.1/alisp
CCL=/usr/local/bin/ccl

usage()
{
Expand Down Expand Up @@ -40,6 +41,12 @@ case $1 in
QUIT="(quit)"
IMAGE=garnet
;;
ccl)
BUILD="$CCL --batch"
LOAD=$CCL
QUIT="(quit)"
IMAGE=garnet
;;
cmucl)
BUILD="$CMUCL -batch"
LOAD=$CMUCL
Expand Down
8 changes: 7 additions & 1 deletion garnet-loader.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,10 @@ directory."
(defun Get-Garnet-Binary-Pathname ()
(let ((directory-name
#+sbcl "bin.sbcl"
#+ccl "bin.ccl"
#+cmu "bin.cmu"
#+allegro "bin.allegro"
#-(or sbcl cmu allegro) (error "~S is an invalid garnet-version" version)))
#-(or sbcl ccl cmu allegro) (error "~S is an invalid garnet-version" version)))
(unless multiple-garnet-bin-dirs (setq directory-name "bin"))
(append-directory Your-Garnet-Pathname directory-name)))

Expand Down Expand Up @@ -887,6 +888,7 @@ directory."
#+cmu (cdr (assoc :DISPLAY lisp::*environment-list*))
#+allegro (sys::getenv "DISPLAY")
#+sbcl (sb-posix:getenv "DISPLAY")
#+ccl (ccl:getenv "DISPLAY")
;; RGA hope this works as a sensible default. Need a new function to
;; support other Lisp.
":0"
Expand Down Expand Up @@ -1127,6 +1129,10 @@ running Garnet."
#+cmu
(ext:process-output (ext:run-program "/bin/sh" (list "-c" command)
:wait NIL :output :stream))

#+ccl
(external-process-output-stream (run-program "/bin/sh" (list "-c" command)
:wait NIL :output :stream))
#+sbcl
(sb-ext:process-output (sb-ext:run-program "/bin/sh" (list "-c" command)
:wait NIL :output :stream)))
Expand Down
2 changes: 2 additions & 0 deletions garnet-mac.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

XXX FMG This no longer is maintained and won't work with the current code.

MACINTOSH INSTRUCTIONS FOR GARNET 3.0
December 10, 1994

Expand Down
11 changes: 7 additions & 4 deletions readme-build-garnet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ Instructions for building Garnet.
The Garnet directory tree (the directory containing this file) should be placed where you want
it to live. For example, if you want to keep it with your SBCL distribution, you can place this entire tree in /usr/local/lib/sbcl/garnet (assuming you use the default location for SBCL).

The tree is self-contained and you can basically put it anywhere.

2. CLX
2. Install quicklisp (www.quicklisp.org). I have made this a requirement because it will be needed for the truetype support that is the whole point of my current work on Garnet. It also makes installing CLX (step 3) more convenient.

3. CLX

Garnet requires CLX. This setup assumes that you can do the following:

Expand All @@ -18,7 +21,7 @@ nova:~/bin > sbcl
<ask your lisp to load CLX>
CL-USER(1): (require :clx)

You should not get an error. If you do, you must install CLX. I recommend using Quicklisp (www.quicklisp.org) as a convenient way to do this. Quicklisp is useful in itself because it allows convenient access to hundreds of packages. NOTE ALSO that if you want to build the truetype stuff (currently NOT working) you must have Quicklisp installed.
You should not get an error. If you do, you must install CLX. I recommend using Quicklisp (www.quicklisp.org) as a convenient way to do this (which you should have installed in step 2).

CL-USER(1): (ql:quickload :clx)
To load "clx":
Expand All @@ -32,7 +35,7 @@ CL-USER(2):
If CLX isn't already on your system it will download it and compile it.


3. Configure the build-garnet script.
4. Configure the build-garnet script.

Simply add the path to your lisp executable (or executables) to the beginning of the build-garnet script where indicated:

Expand All @@ -48,7 +51,7 @@ ACL=/usr/local/allegro/8.1/alisp

I have tested this setup with the above three Lisp implementations and they all work (modulo some Allegro weirdness with pixmaps that has been there forever).

4. Building Garnet
5. Building Garnet

To build garnet all the way to a lisp image with a single command do the following:

Expand Down
10 changes: 5 additions & 5 deletions src/debug/debug-fns.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ ChangeLog:
(when (opal:main-event-loop-process-running-p)
(setf suspend-process T)
(opal:kill-main-event-loop-process))
(setf opal-display (the opal::DISPLAY-INFO
(setf opal-display (the gem:DISPLAY-INFO
(g-value a-window :display-info)))
(setf display-info (opal::display-info-display
(setf display-info (gem:display-info-display
opal-display))
#+apple
(unwind-protect
Expand Down Expand Up @@ -618,8 +618,8 @@ ChangeLog:
(setf loc-x x)
(setf loc-y y)
(setf garnet-code (interactors::translate-character
(opal::display-info-display
(the opal::DISPLAY-INFO
(gem:display-info-display
(the gem:DISPLAY-INFO
(g-value window :display-info)))
code state))
(cond (garnet-code
Expand Down Expand Up @@ -746,7 +746,7 @@ ChangeLog:
(and (schema-p value)
(is-a-p value opal:filling-style))))
(:draw-function
(assoc value opal::*function-alist*))
(assoc value gem:*function-alist*))
((:angle1 :angle2)
(numberp value))
(:point-list
Expand Down
Loading

0 comments on commit bebf5dd

Please sign in to comment.