Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows support #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/backend/check.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let cache ~conf =
| "freebsd"
| "linux" -> Some (Obuilder_spec.Cache.v "opam-archives" ~target:"/home/opam/.opam/download-cache")
| "macos" -> Some (Obuilder_spec.Cache.v "opam-archives" ~target:"/Users/mac1000/.opam/download-cache")
| "windows" -> Some (Obuilder_spec.Cache.v "opam-archives" ~target:"c:\\Users\\opam\\AppData\\Local\\opam\\download-cache")
| os -> failwith ("Opam cache not supported on '" ^ os) (* TODO: Should other platforms simply take the same ocurrent/opam: prefix? *)
in
let brew_cache = match os with
Expand Down Expand Up @@ -251,17 +252,20 @@ let get_obuilder ~conf ~opam_repo ~opam_repo_commit ~extra_repos switch =
| "linux" -> "ocaml/opam:"^distribution (* typically this is 'debian-unstable' which is 5.0.0 *)
| "freebsd" -> distribution
| "macos" -> "macos-"^distribution
| "windows" -> distribution
| os -> failwith ("OS '"^os^"' not supported") (* TODO: Should other platforms simply take the same ocurrent/opam: prefix? *)
in
let ln_opam = match os with
| "linux" -> "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"
| "freebsd" -> "sudo ln -f /usr/local/bin/opam-dev /usr/local/bin/opam"
| "macos" -> "ln -f ~/local/bin/opam-dev ~/local/bin/opam"
| "windows" -> "ln -f /usr/bin/opam-dev.exe /usr/bin/opam.exe"
| os -> failwith ("OS '"^os^"' not supported")
in
let opam_init_options = match os with
| "linux" -> " --config ~/.opamrc-sandbox"
| "freebsd"
| "windows"
| "macos" -> ""
| os -> failwith ("OS '"^os^"' not supported")
in
Expand Down