Move "src/worksp/extradlls" to libs.

This commit is contained in:
Eli Barzilay 2010-11-08 11:22:54 -05:00
parent 689f2ac5c8
commit 614f100e8f
11 changed files with 66 additions and 80 deletions

View File

@ -373,8 +373,7 @@ mz-tests := (tests: "racket/" "info.rkt" "utils/" "match/" "eli-tester.rkt" "str
mz-src := (+ (- (src: "README" "Makefile.in" "configure" "lt/" "racket/" "utils/" mz-src := (+ (- (src: "README" "Makefile.in" "configure" "lt/" "racket/" "utils/"
(cond win => "worksp/{README|mzconfig.h}" (cond win => "worksp/{README|mzconfig.h}"
"worksp/{racket|libracket|libmzgc|gc2}/" "worksp/{racket|libracket|libmzgc|gc2}/"
"worksp/{mzstart|starters}/" "worksp/{mzstart|starters}/"))
"worksp/extradlls/"))
(cond (not mr) => (src: "worksp/starters/mrstart.ico"))) (cond (not mr) => (src: "worksp/starters/mrstart.ico")))
foreign-src) foreign-src)

1
src/.gitattributes vendored
View File

@ -11,7 +11,6 @@
/racket/gc/BCC_MAKEFILE -crlf /racket/gc/BCC_MAKEFILE -crlf
/racket/gc/digimars.mak -crlf /racket/gc/digimars.mak -crlf
/worksp/README -crlf /worksp/README -crlf
/worksp/extradlls/README.TXT -crlf
/worksp/gracket/gracket.manifest -crlf /worksp/gracket/gracket.manifest -crlf
/worksp/mzcom/mzcom.def -crlf /worksp/mzcom/mzcom.def -crlf
/worksp/mzcom/mzcom.rgs -crlf /worksp/mzcom/mzcom.rgs -crlf

View File

@ -14,8 +14,7 @@
[("--install") "install mode" (mode 'install)] [("--install") "install mode" (mode 'install)]
#:once-each #:once-each
[("--ready") n "touch `ready<n>' on download success" (touch-ready n)] [("--ready") n "touch `ready<n>' on download success" (touch-ready n)]
#:args #:args (src-dir dest-dir)
(src-dir dest-dir)
(values src-dir dest-dir))) (values src-dir dest-dir)))
(define url-host "download.racket-lang.org") (define url-host "download.racket-lang.org")
@ -72,7 +71,13 @@
["libpng14.14.dylib" 505920] ["libpng14.14.dylib" 505920]
["PSMTabBarControl.tgz" 95862])])] ["PSMTabBarControl.tgz" 95862])])]
[(windows) [(windows)
(let ([basic '(["libjpeg-7.dll" 233192] (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] ["libcairo-2.dll" 921369]
["libpango-1.0-0.dll" 336626] ["libpango-1.0-0.dll" 336626]
["libexpat-1.dll" 143096] ["libexpat-1.dll" 143096]
@ -129,10 +134,8 @@
(path->string name)))) (path->string name))))
(define (download-if-needed dest-dir file size) (define (download-if-needed dest-dir file size)
(let ([dest (build-path dest-dir file)] (define dest (build-path dest-dir file))
[tmp (build-path dest-dir (format "~a.download" file))]) (if (and (file-exists? dest) (= (file-size dest) size))
(if (and (file-exists? dest)
(= (file-size dest) size))
(printf " ~a is ready\n" file) (printf " ~a is ready\n" file)
(let* ([sub (unixize (system-library-subpath #f))] (let* ([sub (unixize (system-library-subpath #f))]
[src (format "~a~a/~a" url-path sub file)]) [src (format "~a~a/~a" url-path sub file)])
@ -144,31 +147,27 @@
(printf ">> ~a\n" (path->complete-path dest-dir))) (printf ">> ~a\n" (path->complete-path dest-dir)))
(printf " ~a downloading..." file) (printf " ~a downloading..." file)
(flush-output) (flush-output)
(let-values ([(i o) (tcp-connect url-host 80)]) (define-values [i o] (tcp-connect url-host 80))
(fprintf o "GET ~a HTTP/1.0\r\n" (string-append src)) (fprintf o "GET ~a HTTP/1.0\r\n" (string-append src))
(fprintf o "Host: ~a\r\n" url-host) (fprintf o "Host: ~a\r\n" url-host)
(fprintf o "\r\n") (fprintf o "\r\n")
(flush-output o) (flush-output o)
(tcp-abandon-port o) (tcp-abandon-port o)
(purify-port i) (purify-port i)
(call-with-output-file tmp (define tmp (build-path dest-dir (format "~a.download" file)))
#:exists 'truncate/replace (call-with-output-file tmp #:exists 'truncate/replace
(lambda (out) (lambda (out) (copy-port i out)))
(copy-port i out)))
(rename-file-or-directory tmp dest #t) (rename-file-or-directory tmp dest #t)
(let ([sz (file-size dest)]) (let ([sz (file-size dest)])
(unless (= size sz) (unless (= size sz)
(raise-user-error (raise-user-error
'get-libs 'get-libs "size of ~a is ~a; doesn't match expected size ~a"
"size of ~a is ~a; doesn't match expected size ~a"
dest sz size))) dest sz size)))
(printf "done\n")))))) (printf "done\n"))))
(define (same-content? f1 f2) (define (same-content? f1 f2)
;; approximate: ;; approximate:
(and (file-exists? f1) (and (file-exists? f1) (file-exists? f2) (= (file-size f1) (file-size f2))))
(file-exists? f2)
(= (file-size f1) (file-size f2))))
(define (install-file src dest) (define (install-file src dest)
(if (regexp-match? #rx"[.]tgz" (path->string src)) (if (regexp-match? #rx"[.]tgz" (path->string src))
@ -177,35 +176,31 @@
;; Plain copy: ;; Plain copy:
(unless (same-content? src dest) (unless (same-content? src dest)
(printf "Updating ~a\n" dest) (printf "Updating ~a\n" dest)
(when (file-exists? dest) (when (file-exists? dest) (delete-file dest))
(delete-file dest))
(copy-file src dest)))) (copy-file src dest))))
(define (unpack-tgz src dest) (define (unpack-tgz src* dest)
(let ([src (path->string (path->complete-path src))]) (define src (path->string (path->complete-path src*)))
(parameterize ([current-directory (parameterize ([current-directory
(let-values ([(base name dir?) (split-path dest)]) base)]) (let-values ([(base name dir?) (split-path dest)]) base)])
(define-values [p pout pin perr] (define-values [p pout pin perr]
(subprocess (subprocess
(current-output-port) (current-input-port) (current-error-port) (current-output-port) (current-input-port) (current-error-port)
(find-executable-path "tar") "zxf" src)) (find-executable-path "tar") "zxf" src))
(subprocess-wait p)))) (subprocess-wait p)))
(case (mode) (case (mode)
[(download) [(download)
(let ([libs dest-dir]) (let ([libs dest-dir])
(unless (directory-exists? libs) (unless (directory-exists? libs)
(make-directory libs)) (make-directory libs))
(for-each (lambda (file+size) (for ([file+size (in-list needed-files+sizes)])
(download-if-needed libs (car file+size) (cadr file+size))) (download-if-needed libs (car file+size) (cadr file+size)))
needed-files+sizes)
(when (touch-ready) (when (touch-ready)
(let ([ok (build-path libs (format "ready~a" (touch-ready)))]) (define ok (build-path libs (format "ready~a" (touch-ready))))
(unless (file-exists? ok) (unless (file-exists? ok) (with-output-to-file ok void))))]
(with-output-to-file ok void)))))]
[(install) [(install)
(for-each (lambda (file+size) (for ([file+size (in-list needed-files+sizes)])
(let ([file (car file+size)]) (define file (car file+size))
(install-file (build-path src-dir "libs" file) (install-file (build-path src-dir "libs" file)
(build-path dest-dir file)))) (build-path dest-dir file)))])
needed-files+sizes)])

View File

@ -4,4 +4,3 @@ mkdir ..\..\..\lib
mkdir ..\..\..\lib\msvc mkdir ..\..\..\lib\msvc
copy mzdyn.exp ..\..\..\lib\msvc copy mzdyn.exp ..\..\..\lib\msvc
copy mzdyn.obj ..\..\..\lib\msvc copy mzdyn.obj ..\..\..\lib\msvc
copy ..\..\worksp\extradlls\*.dll ..\..\..\lib

View File

@ -7,4 +7,3 @@ copy mzdyn.exp ..\..\..\lib\msvc
copy mzdyn.obj ..\..\..\lib\msvc copy mzdyn.obj ..\..\..\lib\msvc
copy ..\..\worksp\libmzsch\debug\libmzschxxxxxxx.lib ..\..\..\lib\msvc copy ..\..\worksp\libmzsch\debug\libmzschxxxxxxx.lib ..\..\..\lib\msvc
copy ..\..\worksp\libmzgc\debug\libmzgcxxxxxxx.lib ..\..\..\lib\msvc copy ..\..\worksp\libmzgc\debug\libmzgcxxxxxxx.lib ..\..\..\lib\msvc
copy ..\..\worksp\extradlls\*.dll ..\..\..\lib

View File

@ -87,8 +87,7 @@ builds
In addition, building RacketCGC executes 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\, and also which copies .exp, .obj, and .lib files into racket\lib\.
copies DLLs from the "extradlls" directory to to racket\lib\.
Finally, you must install pre-build DLLs that GRacket needs to run. Finally, you must install pre-build DLLs that GRacket needs to run.
The DLLs are available from The DLLs are available from

View File

@ -1,4 +0,0 @@
This directory contains extra DLLs that are needed for running
Racket. The DLL files are moved into the Racket/lib folder by
plt/src/racket/dynsrc/mkmzdyn.bat
which is, in turn, called by the MSVC projects.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.