Skip to content

Commit

Permalink
Check program files x86 for visual studio tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin committed Sep 27, 2024
1 parent aaba76f commit b5048d9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spork/cc.janet
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,13 @@
[]
(when (msvc-setup?) (break))
(def arch (string (os/arch)))
(defn loc [y e]
(string `C:\Program Files\Microsoft Visual Studio\` y `\` e `\VC\Auxiliary\Build\vcvarsall.bat`))
(defn loc [pf y e]
(string `C:\` pf `\Microsoft Visual Studio\` y `\` e `\VC\Auxiliary\Build\vcvarsall.bat`))
(var found-path nil)
(loop [y :in [2022 2019 2017]
(loop [pf :in ["Program Files" "Program Files (x86)"]
y :in [2022 2019 2017]
e :in ["Enterprise" "Professional" "Community" "BuildTools"]]
(def path (loc y e))
(def path (loc pf y e))
(when (os/stat path :mode)
(set found-path path)
(break)))
Expand Down

0 comments on commit b5048d9

Please sign in to comment.