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

ci: bundle DLL dependencies for windows release #3469

Closed
wants to merge 2 commits into from

Conversation

develop7
Copy link
Collaborator

@develop7 develop7 commented May 1, 2024

This PR downloads the latest (so far) EnterpriseDB's build for Windows, unpacks the archive and cherry-picks DLLs (the complete list of which is generously provided by @locktarr at #3136 (comment)) required for postgrest.exe to start. These are not the DLLs (or, rather, .libs) postgrest.exe was built against, but they should do the job.

Also this PR puts postgrest.exe to the top of the zip archive, losing an awkward artifacts/postgrest-windows-x64 prefix.

Fixes #3136

@wolfgangwalther
Copy link
Member

wolfgangwalther commented May 4, 2024

I'm very much opposed to this approach.

First of all, we are not delivering packages for other platforms either. This is not our job, on Windows this can be done via scoop or chocolatey or whatever.

And even if we tried to ship a fully working package, including dependencies, we should surely not do it like this. Downloading and extracting an external distribution like that, and especially the full server - please no. We already have all those dependencies on the Windows system during the build anyway, because otherwise the build wouldn't succeed...

Instead, if we want to make it easier to work with on windows, we should do these things:

  • work to have postgrest supported by scoop and chocolatey or other related package managers properly.
  • work towards building a static executable for other platforms, too, possibly including windows.
  • document exactly which dependencies our released windows binary needs and how to install it manually, without package manager.

@develop7
Copy link
Collaborator Author

develop7 commented May 7, 2024

This is not our job,

Good point. I also wonder whether we (or anyone other than EnterpriseDB) actually have the right to redistribute DLLs they ship… oh, nobody does, per article 2.4 of EDB's EULA.

on Windows this can be done via scoop or chocolatey or whatever.

It should be, sure. Unfortunately, at the time, both Chocolatey and scoop seem to expect the self-sufficient distribution and neither provides postgrest working out of the box. Guess I'll just report it to their maintainers.

There are some dependencies handling and downloading/unpacking extra stuff capabilities, but EnterpriseDB is almost 400M big, OTOH.

work towards building a static executable for other platforms, too, possibly including windows.

That could actually work, since Windows builds tend to be built statically anyway. I wonder if it's possible, though.

document exactly which dependencies our released windows binary needs and how to install it manually, without package manager.

Fair point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants