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

Revised windows init #20

Closed
wants to merge 24 commits into from
Closed

Revised windows init #20

wants to merge 24 commits into from

Conversation

dra27
Copy link
Owner

@dra27 dra27 commented Jun 5, 2024

No description provided.

@dra27 dra27 force-pushed the revised-windows-init branch 4 times, most recently from 77ce5ee to e0d50ed Compare June 5, 2024 22:30
dra27 added 4 commits June 6, 2024 09:36
Stops a previously non-registered installation from becoming registered
and shouldn't affect existing installations.
Deals with old installations of mingw64, in particular on GitHub
Actions.
@dra27 dra27 force-pushed the revised-windows-init branch from e0d50ed to 2f75a2e Compare June 6, 2024 08:56
dra27 and others added 20 commits June 6, 2024 10:40
Harden OpamStd.Sys.check_dll
Always pass `--no-write-registry` to Cygwin setup
Don't allow make to become shadowed
Wind CI forwards to the Windows compilers
Although it's not clear that this note is at all necessary - if the user
specifies a CLI option, who cares?
Previously, --git-location was treated as a default answer for the Git
menu. Fix this and validate either --git-location argument or the
git-location opamrc field as referring to a directory which contains
Git.
Rather than filtering git out of the package list, instead add it when
required.
Make the ~cygbin parameter to the various executable identification
functions optional. The parameter is renamed to search_in_first with a
slightly revised semantics - if cygcheck.exe is not found in the
directory, then PATH is still searched.

This has a key benefit early on in opam init, as it allows cygbin to be
set for an internal Cygwin installation which has not yet happened, but
still permits curl (et al) to be used from PATH (e.g. when running opam
init from an MSYS2 shell).

Where before ~cygbin implied that cygcheck _must_ be used from the
directory, the new parameter effectively prepends an additional
directory to PATH.
Previously, MSYS2 required os-distribution to be overridden in
global-variables. Now, as with Cygwin, it is inferred in the same way
from cygcheck.

In this commit, opam init still sets os-distribution, however, if it is
manually removed from the root config file, previously `opam var
os-distribution` would return `win32` but now returns `msys2`.

Additionally, sys_pkg_manager_cmd is handled in the same way for MSYS2
as for Cygwin, allowing MSYS2 to be automatically added in the same way
as Cygwin.
Single argument function with a non-base type.
Includes more checks and also returns the kind of installation which was
found.
@dra27 dra27 force-pushed the revised-windows-init branch from 2f75a2e to a300115 Compare June 6, 2024 11:00
@dra27 dra27 closed this Jun 6, 2024
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.

2 participants