adjust build to update "raco.exe" when needed

This commit is contained in:
Matthew Flatt 2019-07-27 09:54:22 -06:00
parent 7d6e2fc89b
commit cf0717b855
2 changed files with 10 additions and 7 deletions

View File

@ -1066,15 +1066,17 @@
(define (racket-launcher-up-to-date? dest [aux null]) (define (racket-launcher-up-to-date? dest [aux null])
(cond (cond
;; When running Setup PLT under Windows, the ;; When running "raco.exe" under Windows, the
;; launcher process stays running until Racket ;; launcher process stays running until Racket
;; completes, which means that it cannot be ;; completes, which means that it cannot be
;; overwritten at that time. So we assume ;; overwritten at that time. Only update that
;; that a Setup-PLT-style independent launcher ;; kind of launcher if the environment variable
;; is always up-to-date. ;; `PLT_REPLACE_INDEPENDENT_LAUNCHERS` is set.
[(eq? 'windows (cross-system-type)) [(and (eq? 'windows (system-type))
(and (let ([m (assq 'independent? aux)]) (and m (cdr m))) (let ([m (assq 'independent? aux)]) (and m (cdr m)))
(file-exists? dest))] (file-exists? dest)
(not (getenv "PLT_REPLACE_INDEPENDENT_LAUNCHERS")))
#t]
;; For any other setting, we could implement ;; For any other setting, we could implement
;; a fancy check, but for now always re-create ;; a fancy check, but for now always re-create
;; launchers. ;; launchers.

View File

@ -78,6 +78,7 @@ if errorlevel 1 exit /B 1
copy ..\COPYING.txt ..\..\share\ copy ..\COPYING.txt ..\..\share\
if errorlevel 1 exit /B 1 if errorlevel 1 exit /B 1
set PLT_REPLACE_INDEPENDENT_LAUNCHERS=yes
..\..\racket -G %BUILD_CONFIG% -N "raco" %SELF_RACKET_FLAGS% -l- setup %PLT_SETUP_OPTIONS% ..\..\racket -G %BUILD_CONFIG% -N "raco" %SELF_RACKET_FLAGS% -l- setup %PLT_SETUP_OPTIONS%
if errorlevel 1 exit /B 1 if errorlevel 1 exit /B 1