Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up builds for distribution #21

Closed
spikecurtis opened this issue Jan 10, 2025 · 2 comments · Fixed by #37
Closed

Set up builds for distribution #21

spikecurtis opened this issue Jan 10, 2025 · 2 comments · Fixed by #37
Assignees
Labels
enhancement New feature or request

Comments

@spikecurtis
Copy link
Collaborator

We are planning to package our Coder Desktop app for distribution outside the App Store, since our architecture of downloading the Go dylib won't fly there. We also want to make CoderVPN a system extension.

Unfortunately, there is a complex process to get an application ready for distribution that isn't supported well in Xcode. Specifically, the entitlements for an outside-the-AppStore system extension are different than for development, and Xcode doesn't understand this. So automating distribution will take some effort outside of Xcode, while we leave the repo mostly in the correct state for development outside of building signed releases.

The steps required are outlined in this forums post: https://developer.apple.com/forums/thread/737894

@spikecurtis spikecurtis added the enhancement New feature or request label Jan 10, 2025
@matifali
Copy link
Member

matifali commented Jan 28, 2025

Can we take some inspiration on how ghostty does this? They are not an NE but a terminal emulator but do distribution outside of AppStore and support automatic update prompts.
I am not sure if this is valid for our use case. So please ignore it if it's irrelevant.

PS: They also make use of Nix.

@ethanndickson ethanndickson self-assigned this Feb 3, 2025
@ThomasK33
Copy link
Member

ThomasK33 commented Feb 4, 2025

A short summary of @ethanndickson and me syncing up: Thanks to #28, we can skip the steps outlined in the linked forum post, as xcodegen handles the generation of the entitlement files for us. Instead, we can introduce an environment variable, which will only be set in a Release pipeline, and will then append the -systemextension suffix to the packet-tunnel-provider entitlement value.

This simplifies the process down to:

  • set the appropriate entitlement suffix env var and invoke the $(XCPROJECT) target
  • standard xcodebuild -target ... -configuration Release
  • /usr/bin/codesigning …
  • dmg creation

Side note: One could consider adding a new, potentially phony, make target that will execute the above steps in one go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants