rules_go icon indicating copy to clipboard operation
rules_go copied to clipboard

feat: support syso files in srcs.

Open connyay opened this issue 9 months ago • 1 comments

What type of PR is this?

Feature

What does this PR do? Why is it needed?

This change adds support for including .syso files in srcs, which enables embedding version and icon info into windows executables.

Which issues(s) does this PR fix?

Fixes #2757

Other notes for review

Have been using this patch internally since dec 2020 with success. Getting more annoying to keep this patch in sync with rules_go releases :)

connyay avatar Nov 22 '23 15:11 connyay

This looks good to me, but could you add test coverage? I don't really know how these files work, but adding a go_test with such a file in srcs somewhere under tests would definitely be sufficient.

fmeum avatar Nov 22 '23 16:11 fmeum

To test syso support:

bazel build //tests/core/go_binary:hello_syso

copy built bin to a windows box -> right click view properties

image

connyay avatar Apr 29 '24 17:04 connyay

@fmeum sorry for ghosting this pr. Added a small test bin that shows the functionality. Not sure the best way to ensure running goversioninfo is easy in this repo. The resource.syso file shouldn't need to be regenerated, but just in case. Open to feedback on how to properly integrate into this repo.

connyay avatar Apr 29 '24 17:04 connyay

Thank you @fmeum!

connyay avatar May 03 '24 17:05 connyay