anchore / binny

Manage a directory of binaries without a package manager
Apache License 2.0
21 stars 1 forks source link

Support Windows #17

Open willmurphyscode opened 6 months ago

willmurphyscode commented 6 months ago

We'd like to release binny for Windows so that projects using binny to manager their binary dependencies are easier to work on on Windows.

Right now, there are a few obstacles to this:

  1. Binny doesn't compile on Windows due to directly using the syscall.SIGWINCH constant, which doesn't exist on Windows. To fix that, we should pull all the fancy terminal UI stuff into separate files that aren't built on Windows.
  2. Binny has no Windows CI - we should get at least unit tests running on Windows
  3. Binny has no Windows release artifacts - this should be a simple goreleaser config change
  4. Binny has no Windows-compatible install script. Maybe adding install.ps1 to the repo, or maybe publishing to chocalatey is the right path here.
willmurphyscode commented 6 months ago

This would make adding tests to https://github.com/anchore/syft/pull/2654 a lot easier.

willmurphyscode commented 6 months ago

https://gist.github.com/f3l3gy/0e89dde158dde024959e36e915abf6bd might be how we'd do an install script.

willmurphyscode commented 4 months ago

Adding CLI tests as a step towards this: https://github.com/anchore/binny/pull/21

willmurphyscode commented 3 months ago

Current issue facing this is that running go install to a temp directory and then trying to rename the resulting .exe to the .tool directory fails with permission denied errors on Windows, and I haven't figured out why yet.