Skip to content

Commit

Permalink
Add support for Visual Studio 2022 installations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jan 27, 2022
1 parent 5309674 commit ca1f786
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`
import $ivy.`io.get-coursier::coursier-launcher:2.1.0-M2`
import $ivy.`io.github.alexarchambault.mill::mill-native-image-upload:0.1.15`
import $ivy.`io.github.alexarchambault.mill::mill-native-image-upload:0.1.16`
import $file.project.deps, deps.{Deps, Docker, InternalDeps, Scala, TestDeps}
import $file.project.publish, publish.{ghOrg, ghName, ScalaCliPublishModule}
import $file.project.settings, settings.{
Expand Down Expand Up @@ -1030,13 +1030,17 @@ object ci extends Module {
def writeWixConfigExtra(dest: String = "wix-visual-cpp-redist.xml") = T.command {
val msmPath = {

val vcVersions = Seq("2019", "2017")
val vcEditions = Seq("Enterprise", "Community", "BuildTools")
val vsDir = os.Path("""C:\Program Files (x86)\Microsoft Visual Studio""")
val vcVersions = Seq("2022", "2019", "2017")
val vcEditions = Seq("Enterprise", "Community", "BuildTools")
val vsDirs = Seq(
os.Path("""C:\Program Files\Microsoft Visual Studio"""),
os.Path("""C:\Program Files (x86)\Microsoft Visual Studio""")
)
val fileNamePrefix = "Microsoft_VC".toLowerCase(Locale.ROOT)
val fileNameSuffix = "_CRT_x64.msm".toLowerCase(Locale.ROOT)
def candidatesIt =
for {
vsDir <- vsDirs.iterator
version <- vcVersions.iterator
edition <- vcEditions.iterator
dir = vsDir / version / edition
Expand Down
2 changes: 1 addition & 1 deletion project/settings.sc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $ivy.`com.goyeau::mill-scalafix::0.2.8`
import $ivy.`io.github.alexarchambault.mill::mill-native-image::0.1.15`
import $ivy.`io.github.alexarchambault.mill::mill-native-image::0.1.16`
import $file.deps, deps.{Deps, Docker, buildCsVersion}

import com.goyeau.mill.scalafix.ScalafixModule
Expand Down

0 comments on commit ca1f786

Please sign in to comment.