Skip to content

cygwin: embed setup.exe to use it as a fallback as a last resort#6523

Closed
rjbou wants to merge 1 commit intoocaml:masterfrom
rjbou:embed-cygwin
Closed

cygwin: embed setup.exe to use it as a fallback as a last resort#6523
rjbou wants to merge 1 commit intoocaml:masterfrom
rjbou:embed-cygwin

Conversation

@rjbou
Copy link
Copy Markdown
Collaborator

@rjbou rjbou commented May 23, 2025

fix #6498

Comment on lines +27 to +37
(rule
(enabled_if (= %{os_type} "Win32"))
(targets setup.exe)
(action
(run curl --silent -Lo %{targets} https://cygwin.com/setup-x86_64.exe)))

(rule
(enabled_if (= %{os_type} "Win32"))
(targets opamEmbedCygwinSetup.ml)
(deps ../../shell/embedCygwin.ml setup.exe)
(action (with-stdout-to %{targets} (run ocaml %{deps}))))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should we factorise these 2 rules ?

if dst_exists then
OpamConsole.warning "%s failed to update" setupexe
else
OpamEmbedCygwinSetup.drop (OpamFilename.to_string dst);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Do we want to display a note in that case ?

(name opam_state)
(public_name opam-state)
(libraries opam-repository re spdx_licenses)
(libraries opam-repository re spdx_licenses base64)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The dependency is added for all OSes, make it conditional ?

@kit-ty-kate
Copy link
Copy Markdown
Member

Superseded by #6526

@kit-ty-kate kit-ty-kate closed this Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup.exe: embed in Windows binary

2 participants