From c24680b93d8f677d6f62fe6ceb8aa1e24cb55ea9 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 15 Sep 2017 17:25:16 -0500 Subject: [PATCH] zealot: tweak to make it work on windows. mason uses build.cmd to build factor, but that's super slow for some reason. using nmake gives you normal speeds! --- extra/zealot/factor/factor.factor | 10 +++++++--- extra/zealot/zealot.factor | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/extra/zealot/factor/factor.factor b/extra/zealot/factor/factor.factor index 6a79a7b94d..23f35eee87 100644 --- a/extra/zealot/factor/factor.factor +++ b/extra/zealot/factor/factor.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays bootstrap.image cli.git combinators formatting fry http.client io.directories io.launcher kernel math.parser -sequences system-info zealot ; +sequences system system-info zealot ; IN: zealot.factor : download-boot-checksums ( path branch -- ) @@ -14,9 +14,13 @@ IN: zealot.factor : download-my-boot-image ( path branch -- ) my-boot-image-name download-boot-image ; -: compile-factor ( path -- process ) +HOOK: compile-factor os ( path -- process ) +M: unix compile-factor ( path -- process ) [ { "make" "-j" } cpus number>string suffix run-process ] with-directory ; +M: windows compile-factor ( path -- process ) + [ { "nmake" "/f" "NMakefile" "x86-64" } run-process ] with-directory ; + : bootstrap-factor ( path -- ) [ "./factor" "-i=" my-boot-image-name append 2array try-output-process ] with-directory ; @@ -25,7 +29,7 @@ IN: zealot.factor : factor-load-all ( path -- ) [ - "./factor" "-e=\"USE: vocabs.hierarchy load-all USE: memory save\"" 2array + "./factor" "-e=\"USE: vocabs.hierarchy load-all USE: memory \"factor.image.load-all\" save-image\"" 2array run-process drop ] with-directory ; diff --git a/extra/zealot/zealot.factor b/extra/zealot/zealot.factor index 9664313622..f36bdb14fa 100644 --- a/extra/zealot/zealot.factor +++ b/extra/zealot/zealot.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2017 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: cli.git fry io.directories io.pathnames kernel sequences -web-services.github zealot.utils uuid ; +web-services.github uuid ; IN: zealot : default-zealot-directory ( chunk -- path ) [ home ".zealot" ] dip 3append-path ;