curl / curl-for-win

Reproducible curl binaries for Linux, macOS and Windows
https://curl.se/windows/
MIT License
686 stars 207 forks source link

curl.exe and libcurl.dll stored in zip file with executable bit set? #21

Closed nojb closed 3 years ago

nojb commented 3 years ago

Hello,

Thanks for the maintaining this repository, it really helps as building libcurl from source on Windows is not entirely straightforward due to the number of dependencies.

I had a small question: today in the bin directory, the executable curl.exe and the DLL libcurl-x64.dll do not have the executable bit set. As far as I know this bit could be set and stored in the archive (at least for ZIP) and it would make using the DLL (and the executable) a bit simpler under Cygwin.

Do you think this is something that could be done?

Thanks!

vszakats commented 3 years ago

@nojb: Thank you for your kind words and for bringing up Cygwin! The consequences of the executable flag are a little bit all over the place across platforms, e.g. on Linux it works correctly with wine installed, on macOS it causes an exec format error (cannot be configured AFAIK), and on native Windows, it doesn't matter. I did not think of Cygwin, though.

Now the build script explicitly removes the flag, but it seems reasonable and actually more useful to do the reverse. It may also bring MSYS2 builds closer to the rest of the build host platforms, because it considers .exe, .dll files executable without any way to chmod them.

nojb commented 3 years ago

Thank you for the quick fix!

nojb commented 3 years ago

Just to report back: I downloaded the artifact from AppVeyor https://ci.appveyor.com/api/buildjobs/1vc242hr2ahwlsh5/artifacts/curl-7.78.0_2-win64-mingw-test.zip and libcurl-x64.dll had the executble bit, as expected, but curl.exe did not (not sure why).

vszakats commented 3 years ago

@nojb: That was an early test build, and this issue was subsequently fixed before committing to the production branch. Try either here: https://ci.appveyor.com/project/curlorg/curl-for-win/build/artifacts, or at the official page https://curl.se/windows/.

nojb commented 3 years ago

@nojb: That was an early test build, and this issue was subsequently fixed before committing to the production branch.

Right, sorry for the noise!

vszakats commented 3 years ago

@nojb: no worries!