From 35ff3f37e1da47d163597a246f3032ab8cfd3cf3 Mon Sep 17 00:00:00 2001 From: dtoro Date: Mon, 13 Jul 2026 23:03:16 +0200 Subject: [PATCH] Fix macOS packaging: create .app bundle manually wails3 build v3 alpha delegates to Taskfile; the go build produces a raw binary, not a .app. Package step now creates the bundle structure (Contents/MacOS, Info.plist) and zips it. --- Makefile | 6 ++++++ cmd/desktop/Info.plist.template | 28 ++++++++++++++++++++++++++++ cmd/desktop/Taskfile.yml | 14 ++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 cmd/desktop/Info.plist.template create mode 100644 cmd/desktop/Taskfile.yml diff --git a/Makefile b/Makefile index 3562ee2..761068b 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,12 @@ desktop: ui ## Build the Wails desktop app for the current platform desktop-package: desktop ## Build + package the desktop app (zip on macOS, tar.gz on Linux) @case $$(uname -s) in \ Darwin) \ + APP="cmd/desktop/build/bin/oikos-desktop.app"; \ + rm -rf "$$APP"; \ + mkdir -p "$$APP/Contents/MacOS"; \ + mkdir -p "$$APP/Contents/Resources"; \ + cp cmd/desktop/build/bin/oikos-desktop "$$APP/Contents/MacOS/oikos-desktop"; \ + sed 's/$$(VERSION)/0.1.0/' cmd/desktop/Info.plist.template > "$$APP/Contents/Info.plist"; \ cd cmd/desktop/build/bin && zip -r oikos-desktop-darwin-$$(uname -m).zip oikos-desktop.app ;; \ Linux) \ cd cmd/desktop/build/bin && tar czf oikos-desktop-linux-$$(uname -m).tar.gz oikos-desktop ;; \ diff --git a/cmd/desktop/Info.plist.template b/cmd/desktop/Info.plist.template new file mode 100644 index 0000000..9b825b9 --- /dev/null +++ b/cmd/desktop/Info.plist.template @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + oikos-desktop + CFBundleIdentifier + com.hubris.oikos-desktop + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Oikos + CFBundlePackageType + APPL + CFBundleShortVersionString + $(VERSION) + CFBundleVersion + $(VERSION) + LSMinimumSystemVersion + 13.0 + NSHighResolutionCapable + + NSHumanReadableCopyright + Copyright © 2026 Hubris. All rights reserved. + + diff --git a/cmd/desktop/Taskfile.yml b/cmd/desktop/Taskfile.yml new file mode 100644 index 0000000..b612dd6 --- /dev/null +++ b/cmd/desktop/Taskfile.yml @@ -0,0 +1,14 @@ +version: '3' + +tasks: + build: + summary: Build the Oikos desktop app + cmds: + - go build -o build/bin/oikos-desktop . + env: + CGO_ENABLED: 1 + + dev: + summary: Run in development mode + cmds: + - go run .