~ chicken-core (chicken-5) cd7a2666df9e8af5f06a31a1c7d70466c157f6bc
commit cd7a2666df9e8af5f06a31a1c7d70466c157f6bc
Author: Kooda <kooda@upyum.com>
AuthorDate: Mon Apr 10 16:58:00 2017 +0200
Commit: Kooda <kooda@upyum.com>
CommitDate: Mon Apr 10 16:58:00 2017 +0200
Make chicken-install scripts generation work on Windows
Replaced xcopy with copy in a few places to avoid the annoying “Is the target a file or directory” prompt.
Fixed a few whitespaces, backslash vs slash and escaping issues.
diff --git a/chicken-install.scm b/chicken-install.scm
index 44dd4bee..f7c87c21 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -91,7 +91,7 @@
(define no-deps #f)
(define platform
- (if (eq? 'mingw (build-platform))
+ (if (eq? 'mingw32 (build-platform))
'windows
'unix))
diff --git a/egg-compile.scm b/egg-compile.scm
index b93e394f..d56439f8 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -59,7 +59,7 @@
(define (copy-directory-command platform)
(case platform
((unix) "cp -r")
- ((windows) "xcopy /y")))
+ ((windows) "xcopy /y /i")))
(define (mkdir-command platform)
(case platform
@@ -69,12 +69,12 @@
(define (install-executable-command platform)
(case platform
((unix) "install -m755")
- ((windows) "xcopy /y")))
+ ((windows) "copy /y")))
(define (install-file-command platform)
(case platform
((unix) "install -m644")
- ((windows) "xcopy /y")))
+ ((windows) "copy /y")))
(define (remove-file-command platform)
(case platform
@@ -499,7 +499,7 @@
(out (quotearg (target-file (conc sname ext) mode)))
(outlnk (quotearg (target-file (conc sname ".link") mode)))
(dest (destination-repository mode))
- (dfile (quotearg dest))
+ (dfile (quotearg (slashify dest platform)))
(ddir (shell-variable "DESTDIR" platform)))
(print "\n" mkdir " " ddir dfile)
(print cmd " " out " " ddir (quotearg (slashify (conc dest "/"
@@ -648,7 +648,7 @@ EOF
))
((windows)
(printf #<<EOF
-@echo off
+@echo off~%
EOF
))))
@@ -701,7 +701,7 @@ mkdir ~a~a
echo ~a >~a~a~%
EOF
ddir qdir
- (string-intersperse (string-split infostr) "^\n")
+ (string-intersperse (string-split infostr "\n") "^\n\n")
ddir dest)))))
Trap