File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ let run_vc ~arch fmt =
2828 match arch with
2929 | `I386 -> " x86"
3030 | `X86_64 -> " amd64"
31- | `Aarch64 | `Aarch32 | `Ppc64le | `S390x | `Riscv64 ->
32- invalid_arg " Unsupported architecture"
31+ | _ -> invalid_arg " Unsupported architecture"
3332 in
3433 ksprintf
3534 (run {| cd C :\BuildTools \VC \Auxiliary \Build && vcvarsall.bat % s && % s| } arch)
@@ -41,15 +40,26 @@ let run_ocaml_env args fmt =
4140let cleanup t = t @@ run_powershell {| Remove - Item 'C :\TEMP ' - Recurse | } |> crunch
4241
4342(* VC redist is needed to run WinGet. *)
44- let install_vc_redist ?(vs_version = " 16" ) () =
43+ let install_vc_redist ?(vs_version = " 17" ) ?(arch = `X86_64 ) () =
44+ let arch =
45+ match arch with
46+ | `I386 -> " x86"
47+ | `X86_64 -> " x64"
48+ | `Aarch64 -> " arm64"
49+ | _ -> invalid_arg " Unsupported architecture"
50+ in
4551 add
46- ~src: [ " https://aka.ms/vs/" ^ vs_version ^ " /release/vc_redist.x64.exe" ]
52+ ~src:
53+ [
54+ sprintf " https://aka.ms/vs/%s/release/vc_redist.%s.exe" vs_version arch;
55+ ]
4756 ~dst: {| C :\TEMP \| } ()
4857 @@ run
49- {| C :\TEMP \vc_redist.x64.exe / install / passive / norestart / log C :\TEMP \vc_redist.log| }
58+ {| C :\TEMP \vc_redist.% s.exe / install / passive / norestart / log C :\TEMP \vc_redist.log| }
59+ arch
5060 |> cleanup
5161
52- let install_visual_studio_build_tools ?(vs_version = " 16 " ) components =
62+ let install_visual_studio_build_tools ?(vs_version = " 17 " ) components =
5363 let install =
5464 let fmt =
5565 format_of_string
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ val sanitize_reg_path : unit -> t
5151/usr/bin/bash: -c: line 1: syntax error: unexpected end of file
5252 v} |}]
5353
54- val install_vc_redist : ?vs_version :string -> unit -> t
54+ val install_vc_redist : ?vs_version :string -> ? arch : Ocaml_version. arch -> unit -> t
5555(* * Install Microsoft Visual C++ Redistributable.
5656 @see <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads> *)
5757
You can’t perform that action at this time.
0 commit comments