Revert "mac targets a template-ben: .app bundle, ad-hoc codesign, mac-release flow"
This reverts commit 82717acd67.
This commit is contained in:
@@ -37,26 +37,8 @@ them to the release as assets (see `teletypegames/NOTES_BINARY_PLAN.md`).
|
||||
Binary zip layout: a single root folder
|
||||
(`$(PROJECT)-$(VERSION)-<target>/`) containing the executable (plus
|
||||
LICENSE/README.md when present). The zips are created with unix `zip`,
|
||||
so the executable bit survives on the linux binary.
|
||||
|
||||
## mac targets (mac-x64, mac-arm64)
|
||||
|
||||
Ebitengine requires cgo on darwin (GLFW/Metal — purego does not cover
|
||||
it), so the mac targets cannot be cross-compiled from the linux builder.
|
||||
They are built **on a mac host** instead, packaged as a minimal
|
||||
`.app` bundle (generated Info.plist, ad-hoc `codesign`):
|
||||
|
||||
```sh
|
||||
make mac-release VERSION=x.y.z \
|
||||
DROPAREA_SSH_PASSWORD=... UPDATE_SECRET=...
|
||||
```
|
||||
|
||||
This builds both mac zips, uploads them to the droparea and re-triggers
|
||||
`/update` — the updater attaches the new assets to the already existing
|
||||
release, so run it after the CI pipeline has created the release.
|
||||
Ad-hoc signature means Gatekeeper shows the "unidentified developer"
|
||||
warning (right-click → Open); proper signing/notarization needs an
|
||||
Apple Developer account.
|
||||
so the executable bit survives on the linux binary. mac targets need a
|
||||
mac runner (or osxcross) and are not part of the pipeline yet.
|
||||
|
||||
## Builder image
|
||||
|
||||
|
||||
+2
-74
@@ -15,13 +15,6 @@ OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
|
||||
VERSION_FILE = .version
|
||||
INDEX_HTML_URL = https://git.teletypegames.org/tools/ebitengine-tools/raw/branch/master/web/index.html
|
||||
|
||||
# a mac-release lokális futtatásához (CI-ban a woodpecker env adja ugyanezeket)
|
||||
DROPAREA_HOST ?= vps.teletype.hu
|
||||
DROPAREA_PORT ?= 2223
|
||||
DROPAREA_USER ?= drop
|
||||
DROPAREA_TARGET_PATH ?= /home/drop
|
||||
UPDATE_SERVER ?= https://teletypegames.org
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
@@ -47,12 +40,7 @@ export: wasm
|
||||
# --- native binaries (lásd: teletypegames/NOTES_BINARY_PLAN.md) -------------
|
||||
# win-x86 / win-x64: pure Go cross-compile (Windowson nem kell cgo)
|
||||
# linux-x64: cgo build, linux/amd64 hoston fut (builder image, X11/GL dev libekkel)
|
||||
# a CI (linux builder) ezt a hármat építi:
|
||||
BINARY_TARGETS = win-x86 win-x64 linux-x64
|
||||
# mac-x64 / mac-arm64: az Ebitengine darwinon cgo-t igényel (GLFW/Metal),
|
||||
# ezért ezek CSAK mac hoston építhetők: `make binaries-mac VERSION=x.y.z`,
|
||||
# feltöltés + release frissítés: `make mac-release VERSION=x.y.z`
|
||||
MAC_TARGETS = mac-x64 mac-arm64
|
||||
|
||||
binaries:
|
||||
@if [ -z "$(VERSION)" ]; then \
|
||||
@@ -62,17 +50,6 @@ binaries:
|
||||
$(MAKE) binary-$$target VERSION=$(VERSION) || exit 1; \
|
||||
done
|
||||
|
||||
binaries-mac:
|
||||
@if [ -z "$(VERSION)" ]; then \
|
||||
echo "ERROR: VERSION not set!"; exit 1; \
|
||||
fi
|
||||
@if [ "$$(uname -s)" != "Darwin" ]; then \
|
||||
echo "ERROR: a mac targetek csak mac hoston építhetők (cgo + SDK kell)"; exit 1; \
|
||||
fi
|
||||
@for target in $(MAC_TARGETS); do \
|
||||
$(MAKE) binary-$$target VERSION=$(VERSION) || exit 1; \
|
||||
done
|
||||
|
||||
binary-win-x86:
|
||||
@$(MAKE) binary-build VERSION=$(VERSION) B_GOOS=windows B_GOARCH=386 B_CGO=0 B_EXT=.exe B_TARGET=win-x86
|
||||
|
||||
@@ -82,27 +59,10 @@ binary-win-x64:
|
||||
binary-linux-x64:
|
||||
@$(MAKE) binary-build VERSION=$(VERSION) B_GOOS=linux B_GOARCH=amd64 B_CGO=1 B_EXT= B_TARGET=linux-x64
|
||||
|
||||
binary-mac-x64:
|
||||
@$(MAKE) binary-build-mac VERSION=$(VERSION) B_GOARCH=amd64 B_TARGET=mac-x64
|
||||
|
||||
binary-mac-arm64:
|
||||
@$(MAKE) binary-build-mac VERSION=$(VERSION) B_GOARCH=arm64 B_TARGET=mac-arm64
|
||||
|
||||
# macről futtatandó: felépíti mindkét mac zipet, feltölti a dropareába, majd
|
||||
# meghívja az /update-et, ami a meglévő release-hez hozzáfűzi az asseteket
|
||||
mac-release: binaries-mac
|
||||
@FILES=""; \
|
||||
for target in $(MAC_TARGETS); do FILES="$$FILES $(PROJECT)-$(VERSION)-$$target.zip"; done; \
|
||||
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \
|
||||
$$FILES \
|
||||
$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/; \
|
||||
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=ebitengine&version=$(VERSION)"
|
||||
|
||||
# belső helper: egy target buildje + zip egyetlen gyökérmappával
|
||||
# (a zipet unixos zip készíti, így a végrehajtási bit megmarad)
|
||||
binary-build:
|
||||
@set -e; \
|
||||
PKG_DIR="$(PROJECT)-$(VERSION)-$(B_TARGET)"; \
|
||||
@PKG_DIR="$(PROJECT)-$(VERSION)-$(B_TARGET)"; \
|
||||
echo "==> Building $$PKG_DIR"; \
|
||||
rm -rf "$$PKG_DIR" "$$PKG_DIR.zip"; \
|
||||
mkdir -p "$$PKG_DIR"; \
|
||||
@@ -113,38 +73,6 @@ binary-build:
|
||||
rm -rf "$$PKG_DIR"; \
|
||||
echo "==> $$PKG_DIR.zip kesz"
|
||||
|
||||
# mac helper: .app bundle Info.plist-tel, ad-hoc aláírással, egy gyökérmappában
|
||||
binary-build-mac:
|
||||
@set -e; \
|
||||
PKG_DIR="$(PROJECT)-$(VERSION)-$(B_TARGET)"; \
|
||||
APP_DIR="$$PKG_DIR/$(PROJECT).app"; \
|
||||
echo "==> Building $$PKG_DIR"; \
|
||||
rm -rf "$$PKG_DIR" "$$PKG_DIR.zip"; \
|
||||
mkdir -p "$$APP_DIR/Contents/MacOS"; \
|
||||
CGO_ENABLED=1 GOOS=darwin GOARCH=$(B_GOARCH) go build -o "$$APP_DIR/Contents/MacOS/$(PROJECT)" .; \
|
||||
{ \
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'; \
|
||||
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'; \
|
||||
echo '<plist version="1.0">'; \
|
||||
echo '<dict>'; \
|
||||
echo ' <key>CFBundleExecutable</key><string>$(PROJECT)</string>'; \
|
||||
echo ' <key>CFBundleIdentifier</key><string>org.teletypegames.$(PROJECT)</string>'; \
|
||||
echo ' <key>CFBundleName</key><string>$(PROJECT)</string>'; \
|
||||
echo ' <key>CFBundlePackageType</key><string>APPL</string>'; \
|
||||
echo ' <key>CFBundleShortVersionString</key><string>$(VERSION)</string>'; \
|
||||
echo ' <key>CFBundleVersion</key><string>$(VERSION)</string>'; \
|
||||
echo ' <key>LSMinimumSystemVersion</key><string>11.0</string>'; \
|
||||
echo ' <key>NSHighResolutionCapable</key><true/>'; \
|
||||
echo '</dict>'; \
|
||||
echo '</plist>'; \
|
||||
} > "$$APP_DIR/Contents/Info.plist"; \
|
||||
codesign --force --deep -s - "$$APP_DIR"; \
|
||||
if [ -f LICENSE ]; then cp LICENSE "$$PKG_DIR/"; fi; \
|
||||
if [ -f README.md ]; then cp README.md "$$PKG_DIR/"; fi; \
|
||||
zip -r "$$PKG_DIR.zip" "$$PKG_DIR" >/dev/null; \
|
||||
rm -rf "$$PKG_DIR"; \
|
||||
echo "==> $$PKG_DIR.zip kesz"
|
||||
|
||||
watch:
|
||||
fswatch -o . | while read; do make build; done
|
||||
|
||||
@@ -186,4 +114,4 @@ ci-update:
|
||||
@VERSION=$$(cat $(VERSION_FILE)); \
|
||||
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=ebitengine&version=$$VERSION"
|
||||
|
||||
.PHONY: all build wasm export watch clean binaries binaries-mac mac-release binary-win-x86 binary-win-x64 binary-linux-x64 binary-mac-x64 binary-mac-arm64 binary-build binary-build-mac ci-version ci-export ci-binaries ci-upload ci-update
|
||||
.PHONY: all build wasm export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-build ci-version ci-export ci-binaries ci-upload ci-update
|
||||
Reference in New Issue
Block a user