Switch to go-winres to create Windows resources
follow-up https://github.com/docker/cli/pull/3310 and https://github.com/moby/moby/pull/42872

**- What I did**

Replace windres with native Go implementation to be able to create a syso file which contains Microsoft Windows Version Information, an icon and the Windows Event Logging Manifest using [go-winres](https://github.com/tc-hib/go-winres).

**- How I did it**

Remove windres references and replace with go-winres. Also use `go:generate` for better integration and add legal copyright field.

Also add cross target to the GHA ci workflow.

**- How to verify it**

```console
docker buildx bake --set *.args.DOCKER_CROSSPLATFORMS=windows/amd64 cross
```

hack/make/.go-autogen
#!/usr/bin/env bash

rm -rf autogen/*

source hack/dockerfile/install/runc.installer
source hack/dockerfile/install/tini.installer
source hack/dockerfile/install/containerd.installer

LDFLAGS="${LDFLAGS} \
	-X \"github.com/docker/docker/dockerversion.Version=${VERSION}\" \
	-X \"github.com/docker/docker/dockerversion.GitCommit=${GITCOMMIT}\" \
	-X \"github.com/docker/docker/dockerversion.BuildTime=${BUILDTIME}\" \
	-X \"github.com/docker/docker/dockerversion.IAmStatic=${IAMSTATIC:-true}\" \
	-X \"github.com/docker/docker/dockerversion.PlatformName=${PLATFORM}\" \
	-X \"github.com/docker/docker/dockerversion.ProductName=${PRODUCT}\" \
	-X \"github.com/docker/docker/dockerversion.DefaultProductLicense=${DEFAULT_PRODUCT_LICENSE}\" \
"

# Compile the Windows resources into the sources
if [ "$(go env GOOS)" = "windows" ]; then
	mkdir -p autogen/winresources/tmp autogen/winresources/dockerd
	cp hack/make/.resources-windows/resources.go autogen/winresources/dockerd/

	if [ "$(go env GOHOSTOS)" == "windows" ]; then
		WINDRES=windres
		WINDMC=windmc
	else
		# Cross compiling
		WINDRES=x86_64-w64-mingw32-windres
		WINDMC=x86_64-w64-mingw32-windmc
	fi

	# Generate a Windows file version of the form major,minor,patch,build (with any part optional)
	if [ ! -v VERSION_QUAD ]; then
		VERSION_QUAD=$(echo -n $VERSION | sed -re 's/^([0-9.]*).*$/\1/' | tr . ,)
	fi

	# Pass version and commit information into the resource compiler
	defs=
	[ ! -z $VERSION ]      && defs="$defs -D DOCKER_VERSION=\"$VERSION\""
	[ ! -z $VERSION_QUAD ] && defs="$defs -D DOCKER_VERSION_QUAD=$VERSION_QUAD"
	[ ! -z $GITCOMMIT ]    && defs="$defs -D DOCKER_COMMIT=\"$GITCOMMIT\""

	function makeres {
		${WINDRES} \
			-i hack/make/.resources-windows/$1 \
			-o $3 \
			-F $2 \
			--use-temp-file \
			-I autogen/winresources/tmp \
			$defs
	}

	${WINDMC} \
		hack/make/.resources-windows/event_messages.mc \
		-h autogen/winresources/tmp \
		-r autogen/winresources/tmp

	makeres dockerd.rc pe-x86-64 autogen/winresources/dockerd/rsrc_amd64.syso

	rm -r autogen/winresources/tmp
fi

#!/usr/bin/env bash

source hack/dockerfile/install/runc.installer
source hack/dockerfile/install/tini.installer
source hack/dockerfile/install/containerd.installer

LDFLAGS="${LDFLAGS} \
	-X \"github.com/docker/docker/dockerversion.Version=${VERSION}\" \
	-X \"github.com/docker/docker/dockerversion.GitCommit=${GITCOMMIT}\" \
	-X \"github.com/docker/docker/dockerversion.BuildTime=${BUILDTIME}\" \
	-X \"github.com/docker/docker/dockerversion.IAmStatic=${IAMSTATIC:-true}\" \
	-X \"github.com/docker/docker/dockerversion.PlatformName=${PLATFORM}\" \
	-X \"github.com/docker/docker/dockerversion.ProductName=${PRODUCT}\" \
	-X \"github.com/docker/docker/dockerversion.DefaultProductLicense=${DEFAULT_PRODUCT_LICENSE}\" \
"

# Compile the Windows resources into the sources
if [ "$(go env GOOS)" = "windows" ]; then
  if [ ! -x "$(command -v go-winres)" ]; then
    >&2 echo "go-winres not found, skipping manifesting binary"
  else
    (
      . hack/make/.mkwinres
      go generate -v "${GO_PACKAGE}"
    )
  fi
fi

Considering that the `.mkversioninfo` script needs to be executed to generate the versioninfo.json file before the `goversioninfo` command will succeed, what value is being added by running the `goversioninfo` command indirectly through `go generate`? Why not invoke `goversioninfo` directly from the autogen or mkversioninfo scripts? If it's to take advantage of build constraints, that can be made unnecessary by using the `goversioninfo -platform-specific=true` flag to write `resource_windows_386.syso`, `resource_windows_amd64.syso`, `resource_windows_arm.syso` and `resource_windows_arm64.syso` files into the current working directory with one invocation.