windows build: update build command for latest miqt
This commit is contained in:
parent
9ac26467c0
commit
04ac766125
9
Makefile
9
Makefile
@ -57,9 +57,12 @@ build/qbolt-${VERSION}-debian12-x86_64.tar.xz: build/qbolt
|
|||||||
# Windows release (docker)
|
# Windows release (docker)
|
||||||
|
|
||||||
build/qbolt.exe: $(SOURCES)
|
build/qbolt.exe: $(SOURCES)
|
||||||
( $(DOCKER) image ls | fgrep qbolt-win64-cross ) || ( cd docker && $(DOCKER) build -t qbolt-win64-cross:latest -f win64-cross.Dockerfile . )
|
# -flto causes internal compiler error
|
||||||
$(DOCKER) run --rm -v $(CURDIR):/qbolt -w /qbolt qbolt-win64-cross:latest /bin/sh -c "go build $(GOFLAGS_W) -o build/qbolt.exe"
|
$(DOCKER) run --rm --id $$(id -u):$$(id -g) -v $(CURDIR):/src -w /src miqt/winqt6static:latest /bin/sh -c "CGO_CFLAGS='-Os -ffunction-sections -fdata-sections' CGO_CXXFLAGS='-Os -ffunction-sections -fdata-sections' CGO_LDFLAGS='-Wl,--gc-sections -fwhole-program' go build $(GOFLAGS_W) -o build/qbolt.exe"
|
||||||
upx --force build/qbolt.exe
|
# Must be stripped before upx'ing - @ref https://github.com/msys2/MSYS2-packages/issues/454
|
||||||
|
# However this removes the rsrc, loses the icon and causes a Defender detection
|
||||||
|
# strip build/qbolt.exe
|
||||||
|
# upx build/qbolt.exe
|
||||||
|
|
||||||
build/qbolt-${VERSION}-windows-x86_64.zip: build/qbolt.exe
|
build/qbolt-${VERSION}-windows-x86_64.zip: build/qbolt.exe
|
||||||
zip -9 -j build/qbolt-${VERSION}-windows-x86_64.zip build/qbolt.exe
|
zip -9 -j build/qbolt-${VERSION}-windows-x86_64.zip build/qbolt.exe
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
FROM golang:1.23-bookworm
|
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|
||||||
apt-get install -qyy gnupg2 ca-certificates
|
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive \
|
|
||||||
echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \
|
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -qyy mxe-x86-64-w64-mingw32.static-qt5 && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
ENV PATH=/usr/lib/mxe/usr/bin:$PATH
|
|
||||||
|
|
||||||
ENV CXX=x86_64-w64-mingw32.static-g++
|
|
||||||
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
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user