recursive-directory-files
[ file-name >lower ".dll" tail? ] filter ;
+ERROR: no-output-file path ;
: copy-output-file-as ( name new-name -- )
- [ prepend-current-path ]
+ [ prepend-current-path dup file-exists? [ no-output-file ] unless ]
[ dll-out-directory prepend-path ] bi* copy-file ;
: copy-vm-file-as ( name new-name -- )
USING: accessors build-from-source environment html.parser
html.parser.analyzer http.client io.directories
io.encodings.utf8 io.files io.files.temp io.launcher
-io.pathnames kernel multiline sequences windows.shell32 ;
+io.pathnames kernel multiline sequences sorting.human
+sorting.slots windows.shell32 ;
IN: build-from-source.windows
! From `choco install -y nasm`
: check-cmake ( -- ) { "cmake" "-h" } try-process ;
: check-msbuild ( -- ) { "msbuild" "-h" } try-process ;
+: latest-fftw ( -- path )
+ "http://ftp.fftw.org/pub/fftw/" [
+ http-get nip
+ parse-html find-links concat
+ [ name>> text = ] filter
+ [ text>> ] map
+ [ "fftw-" head? ] filter
+ [ ".tar.gz" tail? ] filter
+ { human<=> } sort-by last
+ ] keep prepend-path ;
+
+: build-fftw ( -- )
+ latest-fftw [
+ [
+ { "cmake" "-DBUILD_SHARED_LIBS=ON" ".." } try-process
+ { "msbuild" "fftw.sln" "/m" "/property:Configuration=Release" } try-process
+ "Release/fftw3.dll" copy-output-file
+ ] with-build-directory
+ ] with-tar-gz ;
+
: build-winflexbison ( -- )
"https://github.com/lexxmark/winflexbison.git" [
[