Fix macOS packaging: create .app bundle manually
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

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.
This commit is contained in:
2026-07-13 23:03:16 +02:00
parent 8f121cfa1e
commit 35ff3f37e1
3 changed files with 48 additions and 0 deletions

View File

@@ -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 ;; \

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>oikos-desktop</string>
<key>CFBundleIdentifier</key>
<string>com.hubris.oikos-desktop</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Oikos</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(VERSION)</string>
<key>CFBundleVersion</key>
<string>$(VERSION)</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Hubris. All rights reserved.</string>
</dict>
</plist>

14
cmd/desktop/Taskfile.yml Normal file
View File

@@ -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 .