makefile: use miqt-docker for windows build
This commit is contained in:
parent
281ca18d90
commit
b8ce7a667b
5
Makefile
5
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_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)'
|
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
|
SHELL := /bin/bash
|
||||||
# Allow overriding DOCKER with e.g. sudo docker
|
|
||||||
DOCKER := docker
|
|
||||||
GO := go
|
GO := go
|
||||||
|
MIQT_DOCKER := miqt-docker
|
||||||
MIQT_UIC := miqt-uic
|
MIQT_UIC := miqt-uic
|
||||||
MIQT_RCC := miqt-rcc
|
MIQT_RCC := miqt-rcc
|
||||||
GO_WINRES := go-winres
|
GO_WINRES := go-winres
|
||||||
@ -58,7 +57,7 @@ build/qbolt-${VERSION}-debian12-x86_64.tar.xz: build/qbolt
|
|||||||
|
|
||||||
build/qbolt.exe: $(SOURCES)
|
build/qbolt.exe: $(SOURCES)
|
||||||
# -flto causes internal compiler error
|
# -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
|
# 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
|
# However this removes the rsrc, loses the icon and causes a Defender detection
|
||||||
# strip build/qbolt.exe
|
# strip build/qbolt.exe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user