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

Installation instructions #21

Open
ilyagr opened this issue Aug 13, 2024 · 14 comments
Open

Installation instructions #21

ilyagr opened this issue Aug 13, 2024 · 14 comments

Comments

@ilyagr
Copy link

ilyagr commented Aug 13, 2024

It would be nice if the docs contained an easy command to download wcurl on systems where it's not preinstalled and/or doesn't come with curl (e.g. Mac OS). For example, the following would work, but it would download the development version of wcurl. Ideally, there would be some stable URL where the last stable version of wcurl can be found.

curl -fLO https://raw.githubusercontent.com/curl/wcurl/main/wcurl
chmod +x wcurl
@samueloph
Copy link
Member

Hello @ilyagr,

Thank you for the suggestion, I definitely think it's a good idea and I'll look into that.

I would also like to ask that if wcurl is not provided in the official repositories of the OS you use, please consider requesting them to package it.

wcurl is a simple script and packaging it won't take much work. You could also ask them to make wcurl be installed together with curl automatically (as in, either the curl package depends on wcurl or wcurl is bundled into the curl package).

@andylima
Copy link

On macOS, if you use Homebrew, brew install wcurl works.

@ilyagr
Copy link
Author

ilyagr commented Aug 23, 2024

On macOS, if you use Homebrew, brew install wcurl works.

Depending on your goals, brew install wget also works at that point. I was mostly thinking about a brand-new VM or something along those lines.

@ryandesign
Copy link
Contributor

On macOS, if you use MacPorts, sudo port install wcurl works.

After a brand new install of macOS (whether in a VM or on real hardware), neither Homebrew nor MacPorts nor wcurl will be installed, of course. If you would like Apple to include wcurl in macOS, you can submit feedback to Apple. I expect you will get no response and that Apple won't change anything.

On GitHub Actions macOS runners, Homebrew is preinstalled and several software packages are preinstalled using Homebrew, including wget. If you want GitHub to include wcurl in GitHub Actions runners, you could file an issue. I expect you will get the response that those who want wcurl should program their workflows to install it.

Providing a predictable URL to download the latest stable version is reasonable. The first step toward that goal would be for wcurl to create a GitHub release for each tag. That will enable the unchanging URL https://github.com/curl/wcurl/releases/latest for accessing the latest release that is marked stable. It would then be fairly simple to write a short script that can download the latest wcurl script or wcurl.1 manpage using just two curl invocations (or download both with just three). A second step would be to attach assets to each of those releases. Typically one would attach the compressed release tarball. Additionally, one could attach the wcurl script and the wcurl.1 manpage so that they could each be downloaded with a single predictable curl call.

@samueloph
Copy link
Member

I like @ryandesign's idea: to create a release (so we can get the latest link), and also to provide custom assets for releases (so we can get direct links to the script and manpage).

@jmckenna
Copy link

jmckenna commented Sep 5, 2024

Also instructions for Windows would be helpful. (I am a packager, I came here to see how to package this for Windows users) Background: I compile cURL with MSVC 2022

@samueloph
Copy link
Member

@jmckenna packaging should be straightforward, since wcurl is just a scritpt, you just need to ship it, there's no build process.

You can also decide to ship the manpage (not sure how that's handled in Windows), and you can decide to run the unit tests we ship, but that's really extra.

Overall just ship the script in a place where the user can call it and it's done (that's what we do on Debian, we ship the script as part of the curl package).

@jmckenna
Copy link

jmckenna commented Sep 5, 2024

@samueloph I guess I need to re-read your script, as I assumed it was a shell script (for unix - meaning: it cannot be run on Windows through PowerShell or cmd).

Said differently: I wonder, if my assumptions above are correct, if somehow has forked this shell script and adapted it for PowerShell).

@samueloph
Copy link
Member

@jmckenna Oh, you're right, I thought a POSIX script would be fine for Windows but it doesn't look like it.

@samueloph
Copy link
Member

@jmckenna wcurl is packaged for MSYS2, does that solve the Windows usecase?

https://packages.msys2.org/package/wcurl?repo=msys&variant=x86_64

I mean, it carries a dependency on bash, but might be ok for most users.
It's unlikely we would rewrite it in Powershell ourselves.

@jmckenna
Copy link

jmckenna commented Sep 6, 2024

@samueloph Thanks. (my build environment is Visual Studio 2022 for cURL etc). So my short answer to your question is unfortunately: no. It solves for those packagers in the MSYS2 space indeed.

I'll look around for this tool as a Powershell/cmd wrapper. If all else fails, I'll have to create my own wrapper, and build an .exe in the Visual Studio space.

@ryandesign
Copy link
Contributor

Can wcurl not be used as is on Windows using the Windows Subsystem for Linux? I have no personal experience with WSL but I assume that is what it would let you do.

@jmckenna
Copy link

jmckenna commented Sep 6, 2024

@ryandesign indeed, and I anticipated this response here. In my case I will look for a wrapper, and continue on that way. As you said here, there are several other ways that Windows users can use this script as-is.

@bagder
Copy link
Member

bagder commented Sep 10, 2024

Maybe writing a separate implementation of wcurl in C just for the purpose of running on more places (without shell) could be an idea. That still invokes the curl command line tool.

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

No branches or pull requests

6 participants