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/"
(cond win => "worksp/{README|mzconfig.h}"
"worksp/{racket|libracket|libmzgc|gc2}/"
"worksp/{mzstart|starters}/"
"worksp/extradlls/"))
"worksp/{mzstart|starters}/"))
(cond (not mr) => (src: "worksp/starters/mrstart.ico")))
foreign-src)

1
src/.gitattributes vendored
View File

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

View File

@ -14,8 +14,7 @@
[("--install") "install mode" (mode 'install)]
#:once-each
[("--ready") n "touch `ready<n>' on download success" (touch-ready n)]
#:args
(src-dir dest-dir)
#:args (src-dir dest-dir)
(values src-dir dest-dir)))
(define url-host "download.racket-lang.org")
@ -72,7 +71,13 @@
["libpng14.14.dylib" 505920]
["PSMTabBarControl.tgz" 95862])])]
[(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]
["libpango-1.0-0.dll" 336626]
["libexpat-1.dll" 143096]
@ -129,10 +134,8 @@
(path->string name))))
(define (download-if-needed dest-dir file size)
(let ([dest (build-path dest-dir file)]
[tmp (build-path dest-dir (format "~a.download" file))])
(if (and (file-exists? dest)
(= (file-size dest) 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)])
@ -144,31 +147,27 @@
(printf ">> ~a\n" (path->complete-path dest-dir)))
(printf " ~a downloading..." file)
(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 "Host: ~a\r\n" url-host)
(fprintf o "\r\n")
(flush-output o)
(tcp-abandon-port o)
(purify-port i)
(call-with-output-file tmp
#:exists 'truncate/replace
(lambda (out)
(copy-port i out)))
(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"
'get-libs "size of ~a is ~a; doesn't match expected size ~a"
dest sz size)))
(printf "done\n"))))))
(printf "done\n"))))
(define (same-content? f1 f2)
;; approximate:
(and (file-exists? f1)
(file-exists? f2)
(= (file-size f1) (file-size f2))))
(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))
@ -177,35 +176,31 @@
;; Plain copy:
(unless (same-content? src dest)
(printf "Updating ~a\n" dest)
(when (file-exists? dest)
(delete-file dest))
(when (file-exists? dest) (delete-file dest))
(copy-file src dest))))
(define (unpack-tgz src dest)
(let ([src (path->string (path->complete-path src))])
(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))))
(subprocess-wait p)))
(case (mode)
[(download)
(let ([libs dest-dir])
(unless (directory-exists? 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)))
needed-files+sizes)
(when (touch-ready)
(let ([ok (build-path libs (format "ready~a" (touch-ready)))])
(unless (file-exists? ok)
(with-output-to-file ok void)))))]
(define ok (build-path libs (format "ready~a" (touch-ready))))
(unless (file-exists? ok) (with-output-to-file ok void))))]
[(install)
(for-each (lambda (file+size)
(let ([file (car file+size)])
(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))))
needed-files+sizes)])
(build-path dest-dir file)))])

View File

@ -4,4 +4,3 @@ mkdir ..\..\..\lib
mkdir ..\..\..\lib\msvc
copy mzdyn.exp ..\..\..\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 ..\..\worksp\libmzsch\debug\libmzschxxxxxxx.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
racket\src\racket\dynsrc\mkmzdyn.bat
which copies .exp, .obj, and .lib files into racket\lib\, and also
copies DLLs from the "extradlls" directory to to racket\lib\.
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

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.