From 152ece97bcb140fa1db3becc34e78ad3dc1b12f8 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 23 Apr 2006 22:25:34 +0000 Subject: [PATCH] use --script when relaunching copy svn: r2753 --- collects/setup/winvers.ss | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/collects/setup/winvers.ss b/collects/setup/winvers.ss index 152adcb492..b0b063337f 100644 --- a/collects/setup/winvers.ss +++ b/collects/setup/winvers.ss @@ -1,28 +1,27 @@ ;; This is a wrapper around `winvers-change.ss' to patch binary files with the ;; current version number. (module winvers mzscheme - (require (lib "file.ss") - "plthome.ss") + (require (lib "file.ss") "plthome.ss") (define (make-copy) - (let ([tmpdir (find-system-path 'temp-dir)]) - (let ([vers (build-path tmpdir "setvers")]) - (unless (directory-exists? vers) - (make-directory vers)) - (for-each - (lambda (p) - (let ([dest (build-path vers p)]) - (when (file-exists? dest) - (delete-file dest)) - (copy-file (build-path plthome p) dest))) - '("mzscheme.exe" "libmzgcxxxxxxx.dll" "libmzschxxxxxxx.dll")) - (build-path vers "mzscheme.exe")))) + (let* ([tmpdir (find-system-path 'temp-dir)] + [vers (build-path tmpdir "setvers")]) + (unless (directory-exists? vers) (make-directory vers)) + (for-each (lambda (p) + (let ([dest (build-path vers p)]) + (when (file-exists? dest) (delete-file dest)) + (copy-file (build-path plthome p) dest))) + '("mzscheme.exe" "libmzgcxxxxxxx.dll" "libmzschxxxxxxx.dll")) + (build-path vers "mzscheme.exe"))) (define (patch-files) (parameterize ((current-command-line-arguments (vector (path->string plthome)))) (dynamic-require `(lib "winvers-change.ss" "setup") #f))) + (define collects-dir + (path->string (simplify-path (build-path (collection-path "mzlib") 'up)))) + (let ([argv (current-command-line-arguments)]) (cond [(equal? argv #()) @@ -31,7 +30,8 @@ (printf "re-launching first time...~n") (subprocess (current-output-port) (current-input-port) (current-error-port) - exe "-mvqL-" "winvers.ss" "setup" "patch"))] + exe "--collects" collects-dir + "-mvqL-" "winvers.ss" "setup" "patch"))] [(equal? argv #("patch")) (sleep 1) ; time for other process to end (patch-files)