diff --git a/Makefile b/Makefile index 2870dc9..3e81625 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,8 @@ VERSION := 1.0.3 GOFLAGS_L := -ldflags='-s -w -X main.Version=v$(VERSION)' -buildvcs=false -gcflags='-trimpath=$(CURDIR)' -asmflags='-trimpath=$(CURDIR)' GOFLAGS_W := -ldflags='-s -w -X main.Version=v$(VERSION) -H windowsgui' -buildvcs=false --tags=windowsqtstatic -gcflags='-trimpath=$(CURDIR)' -asmflags='-trimpath=$(CURDIR)' SHELL := /bin/bash -# Allow overriding DOCKER with e.g. sudo docker -DOCKER := docker GO := go +MIQT_DOCKER := miqt-docker MIQT_UIC := miqt-uic MIQT_RCC := miqt-rcc GO_WINRES := go-winres @@ -58,7 +57,7 @@ build/qbolt-${VERSION}-debian12-x86_64.tar.xz: build/qbolt build/qbolt.exe: $(SOURCES) # -flto causes internal compiler error - $(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" + $(MIQT_DOCKER) win64-qt6-static /bin/bash -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" # 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