Skip to content

Commit

Permalink
Merge pull request moby#39901 from thaJeztah/remove_docker_cli_autogen
Browse files Browse the repository at this point in the history
hack/make: remove autogen resources for Docker CLI
  • Loading branch information
kolyshkin authored Sep 12, 2019
2 parents 921b269 + a9aeda8 commit 7bcffee
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion daemon/daemon_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func verifyDaemonSettings(config *config.Config) error {

// checkSystem validates platform-specific requirements
func checkSystem() error {
// Validate the OS version. Note that docker.exe must be manifested for this
// Validate the OS version. Note that dockerd.exe must be manifested for this
// call to return the correct version.
osv := system.GetOSVersion()
if osv.MajorVersion < 10 {
Expand Down
5 changes: 1 addition & 4 deletions hack/make/.go-autogen
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ DVEOF

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

if [ "$(go env GOHOSTOS)" == "windows" ]; then
Expand Down Expand Up @@ -81,8 +80,6 @@ if [ "$(go env GOOS)" = "windows" ]; then
-h autogen/winresources/tmp \
-r autogen/winresources/tmp

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

rm -r autogen/winresources/tmp
Expand Down
8 changes: 0 additions & 8 deletions hack/make/.go-autogen.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ const (
[System.IO.File]::WriteAllText($outputFile, $fileContents, (New-Object System.Text.UTF8Encoding($False)))

New-Item -ItemType Directory -Path "autogen\winresources\tmp" | Out-Null
New-Item -ItemType Directory -Path "autogen\winresources\docker" | Out-Null
New-Item -ItemType Directory -Path "autogen\winresources\dockerd" | Out-Null
Copy-Item "hack\make\.resources-windows\resources.go" "autogen\winresources\docker"
Copy-Item "hack\make\.resources-windows\resources.go" "autogen\winresources\dockerd"

# Generate a version in the form major,minor,patch,build
Expand All @@ -77,12 +75,6 @@ const (
$env:_ag_dockerVersion=$DockerVersion
$env:_ag_gitCommit=$CommitString

windres -i hack/make/.resources-windows/docker.rc -o autogen/winresources/docker/rsrc_amd64.syso -F pe-x86-64 --use-temp-file -I autogen/winresources/tmp -D DOCKER_VERSION_QUAD=$versionQuad --% -D DOCKER_VERSION=\"%_ag_dockerVersion%\" -D DOCKER_COMMIT=\"%_ag_gitCommit%\"
if ($LASTEXITCODE -ne 0) { Throw "Failed to compile client 64-bit resources" }

windres -i hack/make/.resources-windows/docker.rc -o autogen/winresources/docker/rsrc_386.syso -F pe-i386 --use-temp-file -I autogen/winresources/tmp -D DOCKER_VERSION_QUAD=$versionQuad --% -D DOCKER_VERSION=\"%_ag_dockerVersion%\" -D DOCKER_COMMIT=\"%_ag_gitCommit%\"
if ($LASTEXITCODE -ne 0) { Throw "Failed to compile client 32-bit resources" }

windres -i hack/make/.resources-windows/dockerd.rc -o autogen/winresources/dockerd/rsrc_amd64.syso -F pe-x86-64 --use-temp-file -I autogen/winresources/tmp -D DOCKER_VERSION_QUAD=$versionQuad --% -D DOCKER_VERSION=\"%_ag_dockerVersion%\" -D DOCKER_COMMIT=\"%_ag_gitCommit%\"
if ($LASTEXITCODE -ne 0) { Throw "Failed to compile daemon resources" }
}
Expand Down
4 changes: 2 additions & 2 deletions hack/make/.resources-windows/common.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Application icon
1 ICON "docker.ico"
1 ICON "dockerd.ico"

// Windows executable manifest
1 24 /* RT_MANIFEST */ "docker.exe.manifest"
1 24 /* RT_MANIFEST */ "dockerd.exe.manifest"

// Version information
1 VERSIONINFO
Expand Down
3 changes: 0 additions & 3 deletions hack/make/.resources-windows/docker.rc

This file was deleted.

File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion hack/make/.resources-windows/resources.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Package winresources is used to embed Windows resources into docker.exe.
Package winresources is used to embed Windows resources into dockerd.exe.
These resources are used to provide
* Version information
Expand Down
2 changes: 1 addition & 1 deletion pkg/parsers/kernel/kernel_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GetKernelVersion() (*VersionInfo, error) {
}
KVI.kvi = blex

// Important - docker.exe MUST be manifested for this API to return
// Important - dockerd.exe MUST be manifested for this API to return
// the correct information.
dwVersion, err := windows.GetVersion()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/system/syscall_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type osVersionInfoEx struct {
}

// GetOSVersion gets the operating system version on Windows. Note that
// docker.exe must be manifested to get the correct version information.
// dockerd.exe must be manifested to get the correct version information.
func GetOSVersion() OSVersion {
var err error
osv := OSVersion{}
Expand Down

0 comments on commit 7bcffee

Please sign in to comment.