feat: add macOS desktop support - #201
Open
lorenzopincinato wants to merge 6 commits into
Open
Conversation
Builds PKVault.app from a dotnet publish output, generating the .icns and ad-hoc signing it. Uses macOS's iconutil/codesign when available, otherwise falls back to icnsutil (pip) and rcodesign so it also runs on Linux, with no real Mac required.
Adds a desktop-publish-macos-app / desktop-macos Dockerfile stage, reusing the existing generic desktop-publish stage (dotnet cross-compiles osx-arm64/osx-x64 fine from Linux). The release job extracts both pkvault-<version>-<rid>.app.zip archives the same way it already does for the Windows/Linux desktop builds.
Previously macOS fell through to UNKNOWN for RuntimeSystem and used the directory next to the executable for app data, which inside a .app bundle is Contents/MacOS/ - not writable post-install. Mirrors the existing Linux behavior instead.
French (fr) intentionally left untranslated - needs review by a French speaker before merge.
lorenzopincinato
force-pushed
the
macos-app-build
branch
from
August 25, 2026 00:21
dbe1147 to
da24180
Compare
Owner
|
Thanks for this PR, I don't have Apple devices so it was quite hard to do myself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I've been using PKVault on my Mac for a few weeks now. I started out with the Docker version, but last week I compiled it natively for macOS and have been running it without issues since, so I wanted to share it with the community.
This PR adds native macOS desktop support (Apple Silicon + Intel), on par with the existing Windows/Linux desktop builds.
PKVault running on macOS, with the bundled example save open:
The Gatekeeper prompt users will see on first launch, since the app isn't notarized (documented in the README, bypassable via System Settings > Privacy & Security > Open Anyway):
What's included
PKVault.Desktop/publishers/macos/build-app.sh- buildsPKVault.appfrom adotnet publishoutput: generates the.icnsand ad-hoc signs the bundle. Usesiconutil/codesignwhen available, otherwise falls back toicnsutil(pip) andrcodesign, so the whole thing also runs on Linux - no real Mac needed to build it.desktop-publishDockerfile stage (already used for Windows/Linux, sincedotnet publishcross-compiles fine) plus a newdesktop-publish-macos-app/desktop-macosstage. The release workflow now builds and attachespkvault-<version>-osx-arm64.app.zipandpkvault-<version>-osx-x64.app.zipthe same way it already does for the other platforms - no macOS runner required.RuntimeSystemgained aMACOScase (was previously falling through toUNKNOWN), and the app data directory now resolves to~/Documents/pkvaulton macOS instead of incorrectly falling back to next to the executable (which, inside a.appbundle, isContents/MacOS/- not writable post-install).Testing
.appon my own Apple Silicon Mac, both via a local build and via the actual CI pipeline output (Docker-based, Linux-built).codesign --verify --deep --strict,spctl) and launches cleanly - only the expected "Apple could not verify this app is free from malware" prompt for unnotarized software (bypassable via System Settings > Privacy & Security > Open Anyway), no "damaged" error.Known limitations / follow-ups
.zipcontaining the.app; a drag-to-Applications DMG is a nice-to-have for later.enandpt-brdocs/locale files where full sentences needed translating. I did not touch the French technical-considerations doc since I can't verify translation accuracy there - would appreciate a French speaker reviewing that before merge. Thesettings.system.macoslabel added tofr/de/zh-hantlocale files is just the untranslated word "macOS" (mirroring how "Windows"/"Linux" are already handled in those files), so that part should be safe.