Skip to content

Commit

Permalink
Working build in normal command prompt on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin committed Sep 27, 2024
1 parent 859fc89 commit 7ef2ea7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bundle/init.janet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(defn install [m &]
(bundle/add-file m "src/tarray.h" "tarray.h")
(bundle/add m "spork")
(when (dyn 'bundle/add-bin)
(compwhen (dyn 'bundle/add-bin)
(bundle/add-bin m "bin/janet-format")
(bundle/add-bin m "bin/janet-netrepl"))
(each file (os/dir "build")
Expand Down
7 changes: 4 additions & 3 deletions spork/cc.janet
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,11 @@
(set found-path path)
(break)))
(unless found-path (error "Could not find vcvarsall.bat"))
(def arg (string `"` found-path `" ` arch ` && echo ` tag ` && set`))
(when (dyn :verbose)
(print "found " found-path))
(def arg (string (string/replace-all " " "^ " found-path) ` ` arch ` && echo ` tag ` && set`))
(def output (sh/exec-slurp "cmd" "/s" "/c" arg))
(def parsed-block (last (string/split tag output)))
(def kvpairs (peg/match vcvars-grammar parsed-block))
(def kvpairs (peg/match vcvars-grammar output))
(assert kvpairs)
(each [k v] kvpairs
(os/setenv (string/trim k) (string/trim v)))
Expand Down

0 comments on commit 7ef2ea7

Please sign in to comment.