build/windows: move buildvcs flag from README into container files

This commit is contained in:
mappu 2024-10-27 18:09:05 +13:00
parent eaa6cf4494
commit 18db56b618
5 changed files with 6 additions and 2 deletions

View File

@ -202,14 +202,14 @@ For static linking:
1. Build the necessary docker container for cross-compilation:
- `docker build -t miqt/win64-cross:latest -f docker/win64-cross-go1.23-qt5.15-static.Dockerfile .`
2. Build your application:
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-cross:latest go build -buildvcs=false --tags=windowsqtstatic -ldflags '-s -w -H windowsgui'`
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-cross:latest go build --tags=windowsqtstatic -ldflags '-s -w -H windowsgui'`
For dynamic linking:
1. Build the necessary docker container for cross-compilation:
- `docker build -t miqt/win64-dynamic:latest -f docker/win64-cross-go1.23-qt5.15-dynamic.Dockerfile .`
2. Build your application:
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-dynamic:latest go build -buildvcs=false -ldflags '-s -w -H windowsgui'`
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-dynamic:latest go build -ldflags '-s -w -H windowsgui'`
3. Copy necessary Qt LGPL libraries and plugin files.
See FAQ Q3 for advice about docker performance.

View File

@ -18,3 +18,4 @@ ENV CC=x86_64-w64-mingw32.shared-gcc
ENV PKG_CONFIG=x86_64-w64-mingw32.shared-pkg-config
ENV GOOS=windows
ENV CGO_ENABLED=1
ENV GOFLAGS=-buildvcs=false

View File

@ -18,3 +18,4 @@ ENV CC=x86_64-w64-mingw32.static-gcc
ENV PKG_CONFIG=x86_64-w64-mingw32.static-pkg-config
ENV GOOS=windows
ENV CGO_ENABLED=1
ENV GOFLAGS=-buildvcs=false

View File

@ -18,3 +18,4 @@ ENV CC=x86_64-w64-mingw32.shared-gcc
ENV PKG_CONFIG=x86_64-w64-mingw32.shared-pkg-config
ENV GOOS=windows
ENV CGO_ENABLED=1
ENV GOFLAGS=-buildvcs=false

View File

@ -18,3 +18,4 @@ ENV CC=x86_64-w64-mingw32.static-gcc
ENV PKG_CONFIG=x86_64-w64-mingw32.static-pkg-config
ENV GOOS=windows
ENV CGO_ENABLED=1
ENV GOFLAGS=-buildvcs=false