Make get-libs retreive core racket libraries too.
Also move it up a level, since it's a more generic tool now.
This commit is contained in:
parent
614f100e8f
commit
6a997be578
|
@ -1356,7 +1356,8 @@ DO_WIN32_BUILD() {
|
|||
build_w32step VSNET "mrstart"
|
||||
|
||||
_cd "$PLTHOME"
|
||||
build_w32step RKT "get-libs" src/gracket/get-libs.rkt src/gracket lib
|
||||
build_w32step RKT "get-libs (gui)" src/get-libs.rkt core src/gracket lib
|
||||
build_w32step RKT "get-libs (gui)" src/get-libs.rkt gui src/gracket lib
|
||||
|
||||
separator "win32: Building libraries"
|
||||
_cd "$PLTHOME"
|
||||
|
|
|
@ -167,8 +167,9 @@
|
|||
(define (initialize)
|
||||
(when *release?* (*environment* (cons 'release (*environment*))))
|
||||
(define (find-exe name)
|
||||
(or (find-executable-path name #f)
|
||||
(error (format "error: couldn't find a `~a' executable" name))))
|
||||
(path->string
|
||||
(or (find-executable-path name #f)
|
||||
(error (format "error: couldn't find a `~a' executable" name)))))
|
||||
(set! /pax (find-exe "pax"))
|
||||
(set! /tar (find-exe "gtar"))
|
||||
(set! /fakeroot (find-exe "fakeroot"))
|
||||
|
|
|
@ -365,12 +365,14 @@ dr-extras :=
|
|||
plt-extras :=
|
||||
|
||||
;; Tests definitions
|
||||
mz-tests := (tests: "racket/" "info.rkt" "utils/" "match/" "eli-tester.rkt" "stress.rkt")
|
||||
mz-tests := (tests: "info.rkt" "racket/" "utils/" "match/"
|
||||
"eli-tester.rkt" "stress.rkt")
|
||||
|
||||
;; ============================================================================
|
||||
;; Source definitions
|
||||
|
||||
mz-src := (+ (- (src: "README" "Makefile.in" "configure" "lt/" "racket/" "utils/"
|
||||
mz-src := (+ (- (src: "README" "configure" "Makefile.in" "lt/" "racket/"
|
||||
"get-libs.rkt" "utils/"
|
||||
(cond win => "worksp/{README|mzconfig.h}"
|
||||
"worksp/{racket|libracket|libmzgc|gc2}/"
|
||||
"worksp/{mzstart|starters}/"))
|
||||
|
|
210
src/get-libs.rkt
Normal file
210
src/get-libs.rkt
Normal file
|
@ -0,0 +1,210 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/cmdline racket/tcp)
|
||||
|
||||
;; This program avoids racket/port and net/url, because it is loaded
|
||||
;; without using bytecode.
|
||||
|
||||
(define mode 'download)
|
||||
(define touch #f)
|
||||
|
||||
(define url-host "download.racket-lang.org")
|
||||
(define url-path "/libs/1/")
|
||||
(define url-base (string-append "http://" url-host url-path))
|
||||
|
||||
(define all-files+sizes
|
||||
`(;; Core Libraries
|
||||
[core
|
||||
[win32/i386
|
||||
["UnicoWS.dll" 245408]
|
||||
["iconv.dll" 892928]
|
||||
["libeay32.dll" 1089536]
|
||||
["ssleay32.dll" 237568]]]
|
||||
;; GUI Libraries
|
||||
[gui
|
||||
[i386-macosx
|
||||
["libcairo.2.dylib" 848488]
|
||||
["libintl.8.dylib" 57536]
|
||||
["libgio-2.0.0.dylib" 748360]
|
||||
["libjpeg.62.dylib" 412024]
|
||||
["libglib-2.0.0.dylib" 1015008]
|
||||
["libpango-1.0.0.dylib" 347180]
|
||||
["libgmodule-2.0.0.dylib" 19016]
|
||||
["libpangocairo-1.0.0.dylib" 84340]
|
||||
["libgobject-2.0.0.dylib" 288252]
|
||||
["libpixman-1.0.dylib" 459304]
|
||||
["libgthread-2.0.0.dylib" 24592]
|
||||
["libpng14.14.dylib" 182992]
|
||||
["PSMTabBarControl.tgz" 89039]]
|
||||
[x86_64-macosx
|
||||
["libcairo.2.dylib" 944552]
|
||||
["libintl.8.dylib" 61016]
|
||||
["libgio-2.0.0.dylib" 897624]
|
||||
["libjpeg.62.dylib" 153360]
|
||||
["libglib-2.0.0.dylib" 1162256]
|
||||
["libpango-1.0.0.dylib" 394768]
|
||||
["libgmodule-2.0.0.dylib" 19832]
|
||||
["libpangocairo-1.0.0.dylib" 94952]
|
||||
["libgobject-2.0.0.dylib" 344024]
|
||||
["libpixman-1.0.dylib" 499440]
|
||||
["libgthread-2.0.0.dylib" 21728]
|
||||
["libpng14.14.dylib" 192224]
|
||||
["PSMTabBarControl.tgz" 105765]]
|
||||
[ppc-macosx
|
||||
["libcairo.2.dylib" 2716096]
|
||||
["libintl.8.dylib" 133156]
|
||||
["libgio-2.0.0.dylib" 936176]
|
||||
["libjpeg.62.dylib" 209688]
|
||||
["libglib-2.0.0.dylib" 1242368]
|
||||
["libpango-1.0.0.dylib" 761292]
|
||||
["libgmodule-2.0.0.dylib" 19872]
|
||||
["libpangocairo-1.0.0.dylib" 199440]
|
||||
["libgobject-2.0.0.dylib" 352728]
|
||||
["libpixman-1.0.dylib" 1366816]
|
||||
["libgthread-2.0.0.dylib" 25416]
|
||||
["libpng14.14.dylib" 505920]
|
||||
["PSMTabBarControl.tgz" 95862]]
|
||||
[win32/i386
|
||||
["libjpeg-7.dll" 233192]
|
||||
["libcairo-2.dll" 921369]
|
||||
["libpango-1.0-0.dll" 336626]
|
||||
["libexpat-1.dll" 143096]
|
||||
["libpng14-14.dll" 219305]
|
||||
["zlib1.dll" 55808]
|
||||
["freetype6.dll" 535264]
|
||||
["libfontconfig-1.dll" 279059]
|
||||
["libglib-2.0-0.dll" 1110713]
|
||||
["libgobject-2.0-0.dll" 316586]
|
||||
["libgmodule-2.0-0.dll" 31692]
|
||||
["libpangocairo-1.0-0.dll" 94625]
|
||||
["libpangowin32-1.0-0.dll" 102210]
|
||||
["libpangoft2-1.0-0.dll" 679322]
|
||||
["libplplot.dll" 245760]
|
||||
["libfit.dll" 73728]
|
||||
,@(if (getenv "PLT_WIN_GTK")
|
||||
'(["libatk-1.0-0.dll" 153763]
|
||||
["libgtk-win32-2.0-0.dll" 4740156]
|
||||
["libgdk-win32-2.0-0.dll" 827670]
|
||||
["libgdk_pixbuf-2.0-0.dll" 252150]
|
||||
["libgio-2.0-0.dll" 669318]
|
||||
["libwimp.dll" 69632]
|
||||
["gtkrc" 1181])
|
||||
'())]]))
|
||||
|
||||
(define-values (package src-dir dest-dir)
|
||||
(command-line
|
||||
#:once-any
|
||||
[("--download") "download mode (the default)" (set! mode 'download)]
|
||||
[("--install") "install mode" (set! mode 'install)]
|
||||
#:once-each
|
||||
[("--touch") file "touch `<file>' on download success" (set! touch file)]
|
||||
#:args [package src-dir dest-dir]
|
||||
(values (string->symbol package) src-dir dest-dir)))
|
||||
|
||||
(define (unixize p)
|
||||
(let-values ([(base name dir?) (split-path p)])
|
||||
(if (path? base)
|
||||
(string-append (unixize base) "/" (path->string name))
|
||||
(path->string name))))
|
||||
|
||||
(define needed-files+sizes
|
||||
(let* ([files+sizes
|
||||
(cdr (or (assq package all-files+sizes)
|
||||
(error 'get-libs "bad package: ~s, expecting one of ~s"
|
||||
package (map car all-files+sizes))))]
|
||||
[arch (unixize (system-library-subpath))]
|
||||
[arch (string->symbol (regexp-replace #rx"/3m$" arch ""))])
|
||||
(cond [(assq arch files+sizes) => cdr]
|
||||
[else '()])))
|
||||
|
||||
(define explained? #f)
|
||||
|
||||
(define (purify-port port)
|
||||
(let ([m (regexp-match-peek-positions #rx#"^HTTP/.*?(?:\r\n\r\n|\n\n|\r\r)"
|
||||
port)])
|
||||
(if m (read-bytes (cdar m) port) "")))
|
||||
|
||||
(define (copy-port src dest)
|
||||
(let ([s (make-bytes 4096)])
|
||||
(let loop ()
|
||||
(let ([c (read-bytes-avail! s src)])
|
||||
(cond [(number? c)
|
||||
(let loop ([start 0])
|
||||
(unless (= start c)
|
||||
(let ([c2 (write-bytes-avail s dest start c)])
|
||||
(loop (+ start c2)))))
|
||||
(loop)]
|
||||
;; Must be EOF
|
||||
[else (void)])))))
|
||||
|
||||
(define (download-if-needed dest-dir file size)
|
||||
(define dest (build-path dest-dir file))
|
||||
(if (and (file-exists? dest) (= (file-size dest) size))
|
||||
(printf " ~a is ready\n" file)
|
||||
(let* ([sub (unixize (system-library-subpath #f))]
|
||||
[src (format "~a~a/~a" url-path sub file)])
|
||||
(unless explained?
|
||||
(set! explained? #t)
|
||||
(printf ">> Downloading files from\n>> ~a~a\n" url-base sub)
|
||||
(printf ">> If you don't want automatic download, download each file\n")
|
||||
(printf ">> yourself from there to\n")
|
||||
(printf ">> ~a\n" (path->complete-path dest-dir)))
|
||||
(printf " ~a downloading..." file)
|
||||
(flush-output)
|
||||
(define-values [i o] (tcp-connect url-host 80))
|
||||
(fprintf o "GET ~a HTTP/1.0\r\n" src)
|
||||
(fprintf o "Host: ~a\r\n" url-host)
|
||||
(fprintf o "\r\n")
|
||||
(flush-output o)
|
||||
(tcp-abandon-port o)
|
||||
(purify-port i)
|
||||
(define tmp (build-path dest-dir (format "~a.download" file)))
|
||||
(call-with-output-file tmp #:exists 'truncate/replace
|
||||
(lambda (out) (copy-port i out)))
|
||||
(rename-file-or-directory tmp dest #t)
|
||||
(let ([sz (file-size dest)])
|
||||
(unless (= size sz)
|
||||
(eprintf "\n")
|
||||
(raise-user-error
|
||||
'get-libs "size of ~a is ~a; doesn't match expected size ~a"
|
||||
dest sz size)))
|
||||
(printf "done\n"))))
|
||||
|
||||
(define (same-content? f1 f2)
|
||||
;; approximate:
|
||||
(and (file-exists? f1) (file-exists? f2) (= (file-size f1) (file-size f2))))
|
||||
|
||||
(define (install-file src dest)
|
||||
(if (regexp-match? #rx"[.]tgz" (path->string src))
|
||||
;; Unpack tar file:
|
||||
(unpack-tgz src dest)
|
||||
;; Plain copy:
|
||||
(unless (same-content? src dest)
|
||||
(printf "Updating ~a\n" dest)
|
||||
(when (file-exists? dest) (delete-file dest))
|
||||
(copy-file src dest))))
|
||||
|
||||
(define (unpack-tgz src* dest)
|
||||
(define src (path->string (path->complete-path src*)))
|
||||
(parameterize ([current-directory
|
||||
(let-values ([(base name dir?) (split-path dest)]) base)])
|
||||
(define-values [p pout pin perr]
|
||||
(subprocess
|
||||
(current-output-port) (current-input-port) (current-error-port)
|
||||
(find-executable-path "tar") "zxf" src))
|
||||
(subprocess-wait p)))
|
||||
|
||||
(case mode
|
||||
[(download)
|
||||
(unless (directory-exists? dest-dir) (make-directory dest-dir))
|
||||
(for ([file+size (in-list needed-files+sizes)])
|
||||
(download-if-needed dest-dir (car file+size) (cadr file+size)))
|
||||
(when touch
|
||||
(define ok (build-path dest-dir touch))
|
||||
(when (file-exists? ok) (delete-file ok))
|
||||
(unless (file-exists? ok) (with-output-to-file ok void)))]
|
||||
[(install)
|
||||
(for ([file+size (in-list needed-files+sizes)])
|
||||
(define file (car file+size))
|
||||
(install-file (build-path src-dir "libs" file)
|
||||
(build-path dest-dir file)))])
|
|
@ -75,11 +75,11 @@ bin:
|
|||
$(MAKE) @MAIN_VARIANT@
|
||||
|
||||
3m:
|
||||
$(MAKE) libs/ready$(DOWNLOAD_BIN_VERSION)
|
||||
$(MAKE) libs/gui-ready$(DOWNLOAD_BIN_VERSION)
|
||||
cd gc2; $(MAKE) 3m
|
||||
|
||||
cgc:
|
||||
$(MAKE) libs/ready$(DOWNLOAD_BIN_VERSION)
|
||||
$(MAKE) libs/gui-ready$(DOWNLOAD_BIN_VERSION)
|
||||
$(MAKE) $(LINKRESULT)
|
||||
|
||||
both:
|
||||
|
@ -126,8 +126,8 @@ grmain_ee.@LTO@ : gracket.@LTO@
|
|||
ee-main:
|
||||
$(MAKE) grmain_ee.@LTO@
|
||||
|
||||
libs/ready$(DOWNLOAD_BIN_VERSION):
|
||||
$(RACKET) -c "$(srcdir)/get-libs.rkt" --ready $(DOWNLOAD_BIN_VERSION) "$(srcdir)" libs
|
||||
libs/gui-ready$(DOWNLOAD_BIN_VERSION):
|
||||
$(RACKET) -c "$(srcdir)/../get-libs.rkt" --touch gui-ready$(DOWNLOAD_BIN_VERSION) gui "$(srcdir)" libs
|
||||
|
||||
clean:
|
||||
rm -f *.@LTO@ *.d core gracket gracket3m
|
||||
|
@ -163,7 +163,7 @@ install-post-collects:
|
|||
$(MAKE) install-@WXVARIANT@-post-collects
|
||||
|
||||
install-common:
|
||||
$(RACKET) -c "$(srcdir)/get-libs.rkt" --install . "$(DESTDIR)$(libpltdir)"
|
||||
$(RACKET) -c "$(srcdir)/../get-libs.rkt" --install gui . "$(DESTDIR)$(libpltdir)"
|
||||
|
||||
# X11 ----------------------------------------
|
||||
|
||||
|
|
|
@ -1,206 +0,0 @@
|
|||
#lang racket/base
|
||||
(require racket/cmdline
|
||||
racket/tcp)
|
||||
;; This program avoids racket/port and net/url, because
|
||||
;; it is loaded without using bytecode.
|
||||
|
||||
(define mode (make-parameter 'download))
|
||||
(define touch-ready (make-parameter #f))
|
||||
|
||||
(define-values (src-dir dest-dir)
|
||||
(command-line
|
||||
#:once-any
|
||||
[("--download") "download mode (the default)" (mode 'download)]
|
||||
[("--install") "install mode" (mode 'install)]
|
||||
#:once-each
|
||||
[("--ready") n "touch `ready<n>' on download success" (touch-ready n)]
|
||||
#:args (src-dir dest-dir)
|
||||
(values src-dir dest-dir)))
|
||||
|
||||
(define url-host "download.racket-lang.org")
|
||||
(define url-path "/libs/1/")
|
||||
(define url-base (string-append "http://" url-host url-path))
|
||||
|
||||
(define needed-files+sizes
|
||||
(case (system-type)
|
||||
[(unix)
|
||||
;; Pre-built binaries are for Windows and Mac only
|
||||
null]
|
||||
[(macosx)
|
||||
(case (string->symbol (path->string (system-library-subpath)))
|
||||
[(i386-macosx)
|
||||
'(["libcairo.2.dylib" 848488]
|
||||
["libintl.8.dylib" 57536]
|
||||
["libgio-2.0.0.dylib" 748360]
|
||||
["libjpeg.62.dylib" 412024]
|
||||
["libglib-2.0.0.dylib" 1015008]
|
||||
["libpango-1.0.0.dylib" 347180]
|
||||
["libgmodule-2.0.0.dylib" 19016]
|
||||
["libpangocairo-1.0.0.dylib" 84340]
|
||||
["libgobject-2.0.0.dylib" 288252]
|
||||
["libpixman-1.0.dylib" 459304]
|
||||
["libgthread-2.0.0.dylib" 24592]
|
||||
["libpng14.14.dylib" 182992]
|
||||
["PSMTabBarControl.tgz" 89039])]
|
||||
[(x86_64-macosx)
|
||||
'(["libcairo.2.dylib" 944552]
|
||||
["libintl.8.dylib" 61016]
|
||||
["libgio-2.0.0.dylib" 897624]
|
||||
["libjpeg.62.dylib" 153360]
|
||||
["libglib-2.0.0.dylib" 1162256]
|
||||
["libpango-1.0.0.dylib" 394768]
|
||||
["libgmodule-2.0.0.dylib" 19832]
|
||||
["libpangocairo-1.0.0.dylib" 94952]
|
||||
["libgobject-2.0.0.dylib" 344024]
|
||||
["libpixman-1.0.dylib" 499440]
|
||||
["libgthread-2.0.0.dylib" 21728]
|
||||
["libpng14.14.dylib" 192224]
|
||||
["PSMTabBarControl.tgz" 105765])]
|
||||
[(ppc-macosx)
|
||||
'(["libcairo.2.dylib" 2716096]
|
||||
["libintl.8.dylib" 133156]
|
||||
["libgio-2.0.0.dylib" 936176]
|
||||
["libjpeg.62.dylib" 209688]
|
||||
["libglib-2.0.0.dylib" 1242368]
|
||||
["libpango-1.0.0.dylib" 761292]
|
||||
["libgmodule-2.0.0.dylib" 19872]
|
||||
["libpangocairo-1.0.0.dylib" 199440]
|
||||
["libgobject-2.0.0.dylib" 352728]
|
||||
["libpixman-1.0.dylib" 1366816]
|
||||
["libgthread-2.0.0.dylib" 25416]
|
||||
["libpng14.14.dylib" 505920]
|
||||
["PSMTabBarControl.tgz" 95862])])]
|
||||
[(windows)
|
||||
(let ([basic '(;; basic libraries
|
||||
["UnicoWS.dll" 245408]
|
||||
["iconv.dll" 892928]
|
||||
["libeay32.dll" 1089536]
|
||||
["ssleay32.dll" 237568]
|
||||
;; gracket libraries
|
||||
["libjpeg-7.dll" 233192]
|
||||
["libcairo-2.dll" 921369]
|
||||
["libpango-1.0-0.dll" 336626]
|
||||
["libexpat-1.dll" 143096]
|
||||
["libpng14-14.dll" 219305]
|
||||
["zlib1.dll" 55808]
|
||||
["freetype6.dll" 535264]
|
||||
["libfontconfig-1.dll" 279059]
|
||||
["libglib-2.0-0.dll" 1110713]
|
||||
["libgobject-2.0-0.dll" 316586]
|
||||
["libgmodule-2.0-0.dll" 31692]
|
||||
["libpangocairo-1.0-0.dll" 94625]
|
||||
["libpangowin32-1.0-0.dll" 102210]
|
||||
["libpangoft2-1.0-0.dll" 679322]
|
||||
["libplplot.dll" 245760]
|
||||
["libfit.dll" 73728])])
|
||||
(if (getenv "PLT_WIN_GTK")
|
||||
(append
|
||||
basic
|
||||
'(["libatk-1.0-0.dll" 153763]
|
||||
["libgtk-win32-2.0-0.dll" 4740156]
|
||||
["libgdk-win32-2.0-0.dll" 827670]
|
||||
["libgdk_pixbuf-2.0-0.dll" 252150]
|
||||
["libgio-2.0-0.dll" 669318]
|
||||
["libwimp.dll" 69632]
|
||||
["gtkrc" 1181]))
|
||||
basic))]))
|
||||
|
||||
(define explained? #f)
|
||||
|
||||
(define (purify-port port)
|
||||
(let ([m (regexp-match-peek-positions
|
||||
#rx"^HTTP/.*?(?:\r\n\r\n|\n\n|\r\r)" port)])
|
||||
(if m (read-string (cdar m) port) "")))
|
||||
|
||||
(define (copy-port src dest)
|
||||
(let ([s (make-bytes 4096)])
|
||||
(let loop ()
|
||||
(let ([c (read-bytes-avail! s src)])
|
||||
(cond
|
||||
[(number? c)
|
||||
(let loop ([start 0])
|
||||
(unless (= start c)
|
||||
(let ([c2 (write-bytes-avail s dest start c)])
|
||||
(loop (+ start c2)))))
|
||||
(loop)]
|
||||
[else
|
||||
;; Must be EOF
|
||||
(void)])))))
|
||||
|
||||
(define (unixize p)
|
||||
(let-values ([(base name dir?) (split-path p)])
|
||||
(if (path? base)
|
||||
(string-append (unixize base) "/" (path->string name))
|
||||
(path->string name))))
|
||||
|
||||
(define (download-if-needed dest-dir file size)
|
||||
(define dest (build-path dest-dir file))
|
||||
(if (and (file-exists? dest) (= (file-size dest) size))
|
||||
(printf " ~a is ready\n" file)
|
||||
(let* ([sub (unixize (system-library-subpath #f))]
|
||||
[src (format "~a~a/~a" url-path sub file)])
|
||||
(unless explained?
|
||||
(set! explained? #t)
|
||||
(printf ">> Downloading files from\n>> ~a~a\n" url-base sub)
|
||||
(printf ">> If you don't want automatic download, download each file\n")
|
||||
(printf ">> yourself from there to\n")
|
||||
(printf ">> ~a\n" (path->complete-path dest-dir)))
|
||||
(printf " ~a downloading..." file)
|
||||
(flush-output)
|
||||
(define-values [i o] (tcp-connect url-host 80))
|
||||
(fprintf o "GET ~a HTTP/1.0\r\n" (string-append src))
|
||||
(fprintf o "Host: ~a\r\n" url-host)
|
||||
(fprintf o "\r\n")
|
||||
(flush-output o)
|
||||
(tcp-abandon-port o)
|
||||
(purify-port i)
|
||||
(define tmp (build-path dest-dir (format "~a.download" file)))
|
||||
(call-with-output-file tmp #:exists 'truncate/replace
|
||||
(lambda (out) (copy-port i out)))
|
||||
(rename-file-or-directory tmp dest #t)
|
||||
(let ([sz (file-size dest)])
|
||||
(unless (= size sz)
|
||||
(raise-user-error
|
||||
'get-libs "size of ~a is ~a; doesn't match expected size ~a"
|
||||
dest sz size)))
|
||||
(printf "done\n"))))
|
||||
|
||||
(define (same-content? f1 f2)
|
||||
;; approximate:
|
||||
(and (file-exists? f1) (file-exists? f2) (= (file-size f1) (file-size f2))))
|
||||
|
||||
(define (install-file src dest)
|
||||
(if (regexp-match? #rx"[.]tgz" (path->string src))
|
||||
;; Unpack tar file:
|
||||
(unpack-tgz src dest)
|
||||
;; Plain copy:
|
||||
(unless (same-content? src dest)
|
||||
(printf "Updating ~a\n" dest)
|
||||
(when (file-exists? dest) (delete-file dest))
|
||||
(copy-file src dest))))
|
||||
|
||||
(define (unpack-tgz src* dest)
|
||||
(define src (path->string (path->complete-path src*)))
|
||||
(parameterize ([current-directory
|
||||
(let-values ([(base name dir?) (split-path dest)]) base)])
|
||||
(define-values [p pout pin perr]
|
||||
(subprocess
|
||||
(current-output-port) (current-input-port) (current-error-port)
|
||||
(find-executable-path "tar") "zxf" src))
|
||||
(subprocess-wait p)))
|
||||
|
||||
(case (mode)
|
||||
[(download)
|
||||
(let ([libs dest-dir])
|
||||
(unless (directory-exists? libs)
|
||||
(make-directory libs))
|
||||
(for ([file+size (in-list needed-files+sizes)])
|
||||
(download-if-needed libs (car file+size) (cadr file+size)))
|
||||
(when (touch-ready)
|
||||
(define ok (build-path libs (format "ready~a" (touch-ready))))
|
||||
(unless (file-exists? ok) (with-output-to-file ok void))))]
|
||||
[(install)
|
||||
(for ([file+size (in-list needed-files+sizes)])
|
||||
(define file (car file+size))
|
||||
(install-file (build-path src-dir "libs" file)
|
||||
(build-path dest-dir file)))])
|
|
@ -1,18 +1,18 @@
|
|||
This directory contains
|
||||
|
||||
- solution files and project files for building Racket and GRacket
|
||||
with Microsoft Visual Studio 8.0 and up (which work with the
|
||||
Express 2005 version of Visual Studio);
|
||||
- solution files and project files for building Racket and GRacket
|
||||
with Microsoft Visual Studio 8.0 and up (which work with the Express
|
||||
2005 version of Visual Studio);
|
||||
|
||||
- mzconfig.h which is a manual version of information that is
|
||||
gathered automatically when using the "configure" script;
|
||||
- mzconfig.h which is a manual version of information that is gathered
|
||||
automatically when using the "configure" script;
|
||||
|
||||
- scripts for building 3m variants of Racket and GRacket using
|
||||
Visual Studio command-line tools; and
|
||||
- scripts for building 3m variants of Racket and GRacket using Visual
|
||||
Studio command-line tools; and
|
||||
|
||||
- solution files and project files for building MzCOM and MysterX
|
||||
with Microsoft Visual Studio 8.0 (not Express, which doesn't
|
||||
support ATL and MFC).
|
||||
- solution files and project files for building MzCOM and MysterX with
|
||||
Microsoft Visual Studio 8.0 (not Express, which doesn't support ATL
|
||||
and MFC).
|
||||
|
||||
Visual Studio Express is available for free from Microsoft; it can be
|
||||
used to build Racket and GRacket, but not MzCOM and MysterX.
|
||||
|
@ -43,20 +43,17 @@ Building Racket and GRacket
|
|||
|
||||
If you're using MSVC 8.0 (not Express), and if `devenv.exe' is in your
|
||||
path, then you can just run
|
||||
racket\src\worksp\build.bat
|
||||
racket\src\worksp\build.bat
|
||||
from its own directory to perform all steps up to "Versioning",
|
||||
including the MzCOM and MysterX steps.
|
||||
|
||||
The CGC variants of Racket, MzCOM, GRacket, and MysterX can be built via
|
||||
The CGC variants of Racket, GRacket, MzCOM, and MysterX can be built via
|
||||
Visual Studio projects. The 3m variants are built by a Racket script
|
||||
that runs the MSVC command-line tools. (See "CGC versus 3m" in
|
||||
racket\src\README if you don't know about the two variants.)
|
||||
|
||||
The 3m build requires some parts of the CGC build:
|
||||
racket\src\worksp\racket
|
||||
racket\src\worksp\jpeg
|
||||
racket\src\worksp\png
|
||||
racket\src\worksp\zlib
|
||||
The 3m build requires:
|
||||
racket\src\worksp\racket
|
||||
It's simplest to just build the main CGC solutions, which automatically
|
||||
build all of the above projects, and then build 3m.
|
||||
|
||||
|
@ -68,38 +65,37 @@ projects that are grouped into a few solutions. To build the `X'
|
|||
solution with Visual Studio, open the file racket\src\worksp\X\X.sln.
|
||||
|
||||
To build RacketCGC, build the Racket solution in
|
||||
racket\src\worksp\racket - makes racket\RacketCGC.exe
|
||||
racket\src\worksp\racket - makes racket\RacketCGC.exe
|
||||
|
||||
[When you open the solution, it may default to "Debug"
|
||||
configuration. Switch to "Release" before building.]
|
||||
[When you open the solution, it may default to "Debug"
|
||||
configuration. Switch to "Release" before building.]
|
||||
|
||||
To build GRacketCGC, build the GRacket solution:
|
||||
racket\src\worksp\gracket - makes racket\GRacketCGC.exe
|
||||
racket\src\worksp\gracket - makes racket\GRacketCGC.exe
|
||||
|
||||
[Again, switch to the "Release" configuration if necessary.]
|
||||
[Again, switch to the "Release" configuration if necessary.]
|
||||
|
||||
The build processes for RacketCGC and GRacketCGC automatically
|
||||
builds
|
||||
libmzgc - makes racket\lib\libmzgcxxxxxxx.dll and
|
||||
racket\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib
|
||||
libracket - makes racket\lib\libracketxxxxxxx.dll and
|
||||
racket\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib
|
||||
The build processes for RacketCGC and GRacketCGC automatically builds
|
||||
libmzgc - makes racket\lib\libmzgcxxxxxxx.dll and
|
||||
racket\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib
|
||||
libracket - makes racket\lib\libracketxxxxxxx.dll and
|
||||
racket\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib
|
||||
|
||||
In addition, building RacketCGC executes
|
||||
racket\src\racket\dynsrc\mkmzdyn.bat
|
||||
racket\src\racket\dynsrc\mkmzdyn.bat
|
||||
which copies .exp, .obj, and .lib files into racket\lib\.
|
||||
|
||||
Finally, you must install pre-build DLLs that GRacket needs to run.
|
||||
The DLLs are available from
|
||||
|
||||
http://download.racket-lang.org/libs/
|
||||
http://download.racket-lang.org/libs/
|
||||
|
||||
and they must be installed into
|
||||
|
||||
racket\lib
|
||||
racket\lib
|
||||
|
||||
The "get-libs.rkt" script in "racket\src\gracket" can download the
|
||||
libraries, and the script is used by "build.bat".
|
||||
The "get-libs.rkt" script in "racket\src" can download the libraries,
|
||||
and the script is used by "build.bat".
|
||||
|
||||
|
||||
Building Racket3m and GRacket3m
|
||||
|
@ -107,18 +103,18 @@ Building Racket3m and GRacket3m
|
|||
|
||||
After RacketCGC and GRacketCGC are built, you can can build 3m binaries:
|
||||
|
||||
1. Ensure that the Visual Studio command-line tools are in your path.
|
||||
You may need to run "vsvars32.bat" from your Visual Studio
|
||||
installation, so that PATH and other environment variables are set.
|
||||
1. Ensure that the Visual Studio command-line tools are in your path.
|
||||
You may need to run "vsvars32.bat" from your Visual Studio
|
||||
installation, so that PATH and other environment variables are set.
|
||||
|
||||
2. Change directories to racket\src\worksp\gc2 and run
|
||||
2. Change directories to racket\src\worksp\gc2 and run
|
||||
|
||||
..\..\..\racketcgc.exe -c make.rkt
|
||||
..\..\..\racketcgc.exe -c make.rkt
|
||||
|
||||
The resulting Racket.exe and GRacket.exe will appear in the top-level
|
||||
"racket" directory, along with DLLs libracket3mxxxxxxx.dll in
|
||||
racket\lib. (There is no corresponding libmzgc3mxxxxxxx.dll.
|
||||
Instead, it is merged with libracket3mxxxxxxx.dll.)
|
||||
racket\lib. (There is no corresponding libmzgc3mxxxxxxx.dll. Instead,
|
||||
it is merged with libracket3mxxxxxxx.dll.)
|
||||
|
||||
Building Collections and Other Executables
|
||||
------------------------------------------
|
||||
|
@ -127,16 +123,16 @@ If you're building from scratch, you'll also want the starter programs
|
|||
used by the launcher collection to create "raco.exe". Build the
|
||||
following solutions:
|
||||
|
||||
racket\src\worksp\mzstart - makes racket\collects\launcher\mzstart.exe
|
||||
racket\src\worksp\mrstart - makes racket\collects\launcher\mrstart.exe
|
||||
racket\src\worksp\mzstart - makes racket\collects\launcher\mzstart.exe
|
||||
racket\src\worksp\mrstart - makes racket\collects\launcher\mrstart.exe
|
||||
|
||||
[The "mzstart" and "mrstart" programs have no CGC versus 3m
|
||||
distinction.]
|
||||
[The "mzstart" and "mrstart" programs have no CGC versus 3m
|
||||
distinction.]
|
||||
|
||||
Then, set up all the other executables (besides GRacket[CGC].exe and
|
||||
Racket[CGC].exe) by running
|
||||
|
||||
racket.exe -l- setup
|
||||
racket.exe -l- setup
|
||||
|
||||
This last step makes the .zo files, too. To skip compiling .zos, add
|
||||
`-n' to the end of the above command.
|
||||
|
@ -160,7 +156,7 @@ be replaced with a specific version.
|
|||
|
||||
To replace the "xxxxxxx" with a specific version, run
|
||||
|
||||
racket -l setup/winvers
|
||||
racket -l setup/winvers
|
||||
|
||||
in a shell.
|
||||
|
||||
|
@ -182,20 +178,20 @@ Building MzCOM
|
|||
--------------
|
||||
|
||||
To build MzCOMCGC, make the MzCOM solution in
|
||||
racket\src\worksp\mzcom - makes racket\MzCOMCGC.exe
|
||||
racket\src\worksp\mzcom - makes racket\MzCOMCGC.exe
|
||||
|
||||
Use the "Release" configuration.
|
||||
|
||||
After building MzCOMCGC, you can build the 3m variant by
|
||||
|
||||
1. Change directories to racket\src\worksp\mzcom and run
|
||||
1. Change directories to racket\src\worksp\mzcom and run
|
||||
|
||||
..\..\..\racketcgc.exe -cu xform.rkt
|
||||
..\..\..\racketcgc.exe -cu xform.rkt
|
||||
|
||||
2. Switch to the "3m" configuration in the MzCOM solution (in Visual
|
||||
Studio).
|
||||
2. Switch to the "3m" configuration in the MzCOM solution (in Visual
|
||||
Studio).
|
||||
|
||||
3. Build (in Visual Studio).
|
||||
3. Build (in Visual Studio).
|
||||
|
||||
The result is racket\MzCOM.exe.
|
||||
|
||||
|
@ -203,25 +199,25 @@ Building MysterX
|
|||
----------------
|
||||
|
||||
To build MysterXCGC, make the MysterX solution in
|
||||
racket\src\worksp\libmysterx - makes racket\lib\myssink.dll,
|
||||
racket\lib\myspage.dll, and mxmain.dll in
|
||||
collects\mysterx\private\compiled\native\win32\i386
|
||||
racket\src\worksp\libmysterx - makes racket\lib\myssink.dll,
|
||||
racket\lib\myspage.dll, and mxmain.dll in
|
||||
collects\mysterx\private\compiled\native\win32\i386
|
||||
|
||||
Use the "Release" configuration.
|
||||
|
||||
After building MysterXCGC, you can build the 3m variant by
|
||||
|
||||
1. Change directories to racket\src\worksp\libmysterx and run
|
||||
1. Change directories to racket\src\worksp\libmysterx and run
|
||||
|
||||
..\..\..\racketcgc.exe -cu xform.rkt
|
||||
..\..\..\racketcgc.exe -cu xform.rkt
|
||||
|
||||
2. Switch to the "3m" configuration in the libmysterx solution (in
|
||||
Visual Studio).
|
||||
2. Switch to the "3m" configuration in the libmysterx solution (in
|
||||
Visual Studio).
|
||||
|
||||
3. Build (in Visual Studio).
|
||||
3. Build (in Visual Studio).
|
||||
|
||||
The result is mxmain.dll (no 3m suffix) in
|
||||
collects\mysterx\private\compiled\native\win32\i386\3m
|
||||
collects\mysterx\private\compiled\native\win32\i386\3m
|
||||
|
||||
------------
|
||||
Finding DLLs
|
||||
|
|
|
@ -8,7 +8,8 @@ cd gc2
|
|||
..\..\..\racketcgc -cu make.rkt
|
||||
cd ..
|
||||
|
||||
..\..\racket -cu ..\gracket\get-libs.rkt ..\gracket ..\..\lib
|
||||
..\..\racket -cu ..\get-libs.rkt core ..\racket ..\..\lib
|
||||
..\..\racket -cu ..\get-libs.rkt gui ..\gracket ..\..\lib
|
||||
|
||||
cd mzstart
|
||||
devenv mzstart.sln /Build Release
|
||||
|
|
Loading…
Reference in New Issue
Block a user