diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 20b128fca1..ff6fe3b843 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -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) diff --git a/src/.gitattributes b/src/.gitattributes index d9cfe6a8c2..1111788804 100644 --- a/src/.gitattributes +++ b/src/.gitattributes @@ -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 diff --git a/src/gracket/get-libs.rkt b/src/gracket/get-libs.rkt index 713b7b93dd..c331fab60e 100644 --- a/src/gracket/get-libs.rkt +++ b/src/gracket/get-libs.rkt @@ -14,8 +14,7 @@ [("--install") "install mode" (mode 'install)] #:once-each [("--ready") n "touch `ready' 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,83 +134,73 @@ (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)) - (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) - (let-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))) - (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 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)))) + (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)))) + ;; 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) - (let ([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)))) +(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-each (lambda (file+size) - (download-if-needed libs (car file+size) (cadr file+size))) - needed-files+sizes) + (for ([file+size (in-list needed-files+sizes)]) + (download-if-needed libs (car file+size) (cadr file+size))) (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)]) - (install-file (build-path src-dir "libs" file) - (build-path dest-dir file)))) - needed-files+sizes)]) + (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)))]) diff --git a/src/racket/dynsrc/mkmzdyn.bat b/src/racket/dynsrc/mkmzdyn.bat index 74a1553c44..ca549f5148 100644 --- a/src/racket/dynsrc/mkmzdyn.bat +++ b/src/racket/dynsrc/mkmzdyn.bat @@ -4,4 +4,3 @@ mkdir ..\..\..\lib mkdir ..\..\..\lib\msvc copy mzdyn.exp ..\..\..\lib\msvc copy mzdyn.obj ..\..\..\lib\msvc -copy ..\..\worksp\extradlls\*.dll ..\..\..\lib diff --git a/src/racket/dynsrc/mkmzdynd.bat b/src/racket/dynsrc/mkmzdynd.bat index f6bf710f5c..18fc7a474d 100644 --- a/src/racket/dynsrc/mkmzdynd.bat +++ b/src/racket/dynsrc/mkmzdynd.bat @@ -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 diff --git a/src/worksp/README b/src/worksp/README index b2b11f2caa..cdffa6b7bd 100644 --- a/src/worksp/README +++ b/src/worksp/README @@ -1,4 +1,4 @@ -This directory contains +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 @@ -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 diff --git a/src/worksp/extradlls/README.TXT b/src/worksp/extradlls/README.TXT deleted file mode 100644 index 4fb6fe3e95..0000000000 --- a/src/worksp/extradlls/README.TXT +++ /dev/null @@ -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. diff --git a/src/worksp/extradlls/UnicoWS.dll b/src/worksp/extradlls/UnicoWS.dll deleted file mode 100644 index 7f89c789c1..0000000000 Binary files a/src/worksp/extradlls/UnicoWS.dll and /dev/null differ diff --git a/src/worksp/extradlls/iconv.dll b/src/worksp/extradlls/iconv.dll deleted file mode 100644 index ef1baefdec..0000000000 Binary files a/src/worksp/extradlls/iconv.dll and /dev/null differ diff --git a/src/worksp/extradlls/libeay32.dll b/src/worksp/extradlls/libeay32.dll deleted file mode 100644 index 4a00a2b06f..0000000000 Binary files a/src/worksp/extradlls/libeay32.dll and /dev/null differ diff --git a/src/worksp/extradlls/ssleay32.dll b/src/worksp/extradlls/ssleay32.dll deleted file mode 100644 index 7ee117be29..0000000000 Binary files a/src/worksp/extradlls/ssleay32.dll and /dev/null differ