From 1efda78f2bccb7b5654e6d02131ff2b1260b2663 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 12 Apr 2022 13:15:54 +0200 Subject: use go-winres for windows build and cleanup autogen and winresources Signed-off-by: CrazyMax --- Dockerfile.windows | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Dockerfile.windows') diff --git a/Dockerfile.windows b/Dockerfile.windows index 881b111ed7..ff23934cf8 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -168,6 +168,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG GO_VERSION=1.18.0 ARG CONTAINERD_VERSION=1.6.2 ARG GOTESTSUM_VERSION=v1.7.0 +ARG GOWINRES_VERSION=v0.2.3 # Environment variable notes: # - GO_VERSION must be consistent with 'Dockerfile' used by Linux. @@ -179,7 +180,8 @@ ENV GO_VERSION=${GO_VERSION} ` GOPATH=C:\gopath ` GO111MODULE=off ` FROM_DOCKERFILE=1 ` - GOTESTSUM_VERSION=${GOTESTSUM_VERSION} + GOTESTSUM_VERSION=${GOTESTSUM_VERSION} ` + GOWINRES_VERSION=${GOWINRES_VERSION} RUN ` Function Test-Nano() { ` @@ -289,6 +291,22 @@ RUN ` ` Install-GoTestSum +RUN ` + Function Install-GoWinres() { ` + $Env:GO111MODULE = 'on'; ` + $tmpGobin = "${Env:GOBIN_TMP}"; ` + $Env:GOBIN = """${Env:GOPATH}`\bin"""; ` + Write-Host "INFO: Installing go-winres version $Env:GOWINRES_VERSION in $Env:GOBIN"; ` + &go install "github.com/tc-hib/go-winres@${Env:GOWINRES_VERSION}"; ` + $Env:GOBIN = "${tmpGobin}"; ` + $Env:GO111MODULE = 'off'; ` + if ($LASTEXITCODE -ne 0) { ` + Throw '"go-winres install failed..."'; ` + } ` + } ` + ` + Install-GoWinres + # Make PowerShell the default entrypoint ENTRYPOINT ["powershell.exe"] -- cgit v1.2.1