source: project/rgraph/rgraph.setup @ 1

Last change on this file since 1 was 1, checked in by azul, 15 years ago

Import everything.

File size: 1.4 KB
Line 
1;;;; rgraph.setup -*- Hen -*-
2
3; copied from chicken-setup.scm
4(define (yes-or-no? str . default)
5  (let ([def (:optional default #f)])
6    (let loop ()
7      (printf "~A (yes/no) " str)
8      (when def (printf "[~A] " def))
9      (flush-output)
10      (let ([ln (read-line)])
11        (when (and def (string=? "" ln))
12          (set! ln def) )
13        (cond [(string=? "yes" ln) #t]
14              [(string=? "no" ln) #f]
15              [else
16               (printf "~%Please enter \"yes\" or \"no\".~%")
17               (loop) ] ) ) ) ) )
18
19(print "Installing Rooster Graph (rgraph-0.3.0) ...")
20
21(cond
22  [(extension-info 'srfi-40)
23   (run (csc -R srfi-40 -s -O2 -d0 rgraph-base.scm))]
24  (else
25    (print "WARNING: The CHICKEN egg 'srfi-40 has not been installed.")
26    (print "         You will not be able to use the stream methods of")
27    (print "              rgraph if you install right now.")
28    (print "         We suggest that you run \"chicken-setup srfi-40\"")
29    (print "              first and then re-install rgraph.")
30    (unless (yes-or-no? "Do you want to install Rooster Graph now?" "no")
31      (exit))
32    (run (csc -s -O2 -d0 rgraph-base.scm))))
33
34(install-extension
35  'rgraph
36  '("rgraph.scm"
37    "rgraph-COPYRIGHT.txt"
38    "rgraph-test1.scm"
39    "rgraph-test2.scm"
40    "rgraph-test3.scm"
41    "rgraph-base.so")
42  '((syntax)
43    (version "0.3.0")
44    (require-at-runtime rgraph-base extras)))
45(print "Installation successful.")
Note: See TracBrowser for help on using the repository browser.