Run Mac app in the background (#1199)

This commit is contained in:
Wojtek Mach 2022-05-20 14:27:04 +02:00 committed by GitHub
parent cf587e7115
commit 5af5c75108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -98,7 +98,8 @@ defmodule AppBuilder.MacOS do
:info_plist,
:url_schemes,
:document_types,
:additional_paths
:additional_paths,
:is_agent_app
])
app_name = Keyword.fetch!(options, :name)
@ -301,7 +302,11 @@ defmodule AppBuilder.MacOS do
</array>
<% end %>
</dict>
<%= if options[:is_agent_app] do %>
<key>LSUIElement</key>
<true/>
<% end %>
</dict>
</plist>
"""

View file

@ -192,12 +192,18 @@ defmodule Livebook.MixProject do
]
defp build_mac_app(release) do
AppBuilder.build_mac_app(release, @app_options)
options =
[
is_agent_app: true
] ++ @app_options
AppBuilder.build_mac_app(release, options)
end
defp build_mac_app_dmg(release) do
options =
[
is_agent_app: true,
codesign: [
identity: System.fetch_env!("CODESIGN_IDENTITY")
],