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

init: install cygwin internally #5545

Merged
merged 9 commits into from
Jul 21, 2023
Merged

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented May 10, 2023

At init, add an item in the cygwin menu to propose to have a cygwin install internal to opam. It is handled by opam itself (prefix stored in <opamroot>/.cygwin/root), when depext are requested, there is no confirmation requested.
It also adds some flags to init, to have a cywgin configuration non interactively: --no-cygwin-setup|--cygwin-internal-install|--cygwin-local-install and --cygwin-location <path>.
These are experimental as they can change name from the finale release.

TODO

@rjbou rjbou added PR: QUEUED Pending pull request, waiting for other work to be merged or closed PR: WAITING FOR REVIEW labels May 10, 2023
@rjbou rjbou added this to the 2.2.0~alpha milestone May 10, 2023
@rjbou rjbou force-pushed the cygwin-internal-install branch from 0d12eab to cf861fc Compare June 12, 2023 15:04
Copy link
Member

@AltGr AltGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need lots of foolproof testing, but the patch is good! I only propose a few message rewords.

src/client/opamClient.ml Outdated Show resolved Hide resolved
src/client/opamClient.ml Outdated Show resolved Hide resolved
let required_packages_for_cygwin =
[
"diffutils";
"git"; (* XXX hg & mercurial ? *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are so little used nowadays that we shouldn't bother with them by default

@rjbou rjbou removed this from the 2.2.0~alpha milestone Jun 16, 2023
@rjbou rjbou force-pushed the cygwin-internal-install branch from cf861fc to 83338d3 Compare July 17, 2023 16:52
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jul 17, 2023
Comment on lines 306 to 329
let cygwin_internal =
mk_vflag ~cli `none [
cli_from cli2_2, `internal, ["cygwin-internal-install"],
"Let opam setup and manage an internal Cygwin install";
cli_from cli2_2, `default_location, ["cygwin-local-install"],
"Use preexistent Cygwin install";
cli_from cli2_2, `no, ["no-cygwin-setup"],
"Don't setup Cygwin";
]
in
let cygwin_location =
mk_opt ~cli (cli_from cli2_2) ["cygwin-location"] "DIR"
"Specify Cygwin root location"
Arg.(some dirname) None
in
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other proposal: --cygwin [no|internal|default|<location>]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I like the proposal (but it's ok as is)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional question: do we make sure that the cygwin option don't show up on other OSes ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now, we do

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from the minor indentation change, lgtm (on a code standpoint only, i haven't tested on an actual windows machine)

@rjbou rjbou force-pushed the cygwin-internal-install branch from 29e4c17 to 66ba38f Compare July 20, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants