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

Add support for creating macOS installers #1184

Closed
freakboy3742 opened this issue Apr 15, 2023 · 5 comments · Fixed by #1781
Closed

Add support for creating macOS installers #1184

freakboy3742 opened this issue Apr 15, 2023 · 5 comments · Fixed by #1781
Labels
enhancement New features, or improvements to existing features. macOS The issue relates to Apple macOS support.

Comments

@freakboy3742
Copy link
Member

What is the problem or limitation you are having?

Briefcase currently produces bare .app bundles, or .dmg bundles. They can be executed as-is, or dragged into the Applications folder.

However, macOS also supports the creation of installer packages. These aren't needed for simple apps, but if an app requires a post install script, or there are multiple resources files that need to be installed, an installer may be required.

Describe the solution you'd like

Briefcase should support the creation of installers as a packaging format.

briefcase package macOS -p installer

Ideally, this would also allow for the addition of a user-supplied post-install script to the installer.

Describe alternatives you've considered

Do nothing, and don't support pre/post install scripts as a use case.

Additional context

This StackOverflow post includes a fairly detailed rundown of building an installer.

If an installer with a post-install script can be generated, it could provide a path for #556 on macOS. A command line app is an installed app that puts itself on the command line. The Python.org macOS installer is an example of this, adding /Library/Frameworks/Python.framework/Versions/3.X/bin to the path. Installing an app bundle in ~/Applications, then adding ~/Applications/My App.app/Contents/MacOS/myapp to the path would provide a packaged command-line app for macOS.

@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. macOS The issue relates to Apple macOS support. labels Apr 15, 2023
@michelcrypt4d4mus
Copy link

+1

@freakboy3742
Copy link
Member Author

@michelcrypt4d4mus If you're interested in this feature, there is a draft implementation in #1781.

@michelcrypt4d4mus
Copy link

michelcrypt4d4mus commented May 20, 2024

thanks - i'm interested / willing to test but being new to briefcase it's not immediately clear to me how to use the PR. what i specifically want to do is this:

  1. use briefcase to convert a server only / non-GUI app to a macos .app. I've already managed to do this (and it was pretty quick and easy - bravo team briefcase).
  2. build an installer that lets me configure a launchd daemon process (this is why I'm interested in this issue here). the goal is to have the app run as any other launchd managed process in ~/Library/LaunchAgents/. i already have scripts that set this up successfully (configure .plist files, call launchctl etc) in my project's development environment so what i'm hoping briefcase can help me with is creating an installer that will run this additional setup (placing .plist file, calling launchctl bootstrap).

the ultimate goal is to package this server side app and another GUI / front end executable together into a single .app file... but one step at a time.

@freakboy3742
Copy link
Member Author

In terms of testing the PR: the Briefcase docs have a guide on setting up a development environment. If you check out the PR branch, and use that branch in your development environment, you can test the code.

We haven't tackled launchd as part of that PR, though. #1781 is purely about adding support for command line apps; but as part of that, we've added .pkg installers because installing a command line app needs a post-install script to add the app to the command line.

Adding support for "add to auto-started apps" would be a separate feature request that would need to land after #1781 has landed. I've opened #1803 to track this feature request.

@michelcrypt4d4mus
Copy link

yeah i'm aware briefcase doesn't support that directly yet so what i'm hoping to do is use briefcase to build the Xcode project etc. and then go in there and manually tweak stuff from there. maybe if it goes well and i figure out how to make it work i can contribute a PR to briefcase re: #1803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features. macOS The issue relates to Apple macOS support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants