mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-06 19:46:00 +08:00
Run Mac app in the background (#1199)
This commit is contained in:
parent
cf587e7115
commit
5af5c75108
2 changed files with 14 additions and 3 deletions
|
@ -98,7 +98,8 @@ defmodule AppBuilder.MacOS do
|
||||||
:info_plist,
|
:info_plist,
|
||||||
:url_schemes,
|
:url_schemes,
|
||||||
:document_types,
|
:document_types,
|
||||||
:additional_paths
|
:additional_paths,
|
||||||
|
:is_agent_app
|
||||||
])
|
])
|
||||||
|
|
||||||
app_name = Keyword.fetch!(options, :name)
|
app_name = Keyword.fetch!(options, :name)
|
||||||
|
@ -301,6 +302,10 @@ defmodule AppBuilder.MacOS do
|
||||||
</array>
|
</array>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= if options[:is_agent_app] do %>
|
||||||
|
<key>LSUIElement</key>
|
||||||
|
<true/>
|
||||||
|
<% end %>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
"""
|
"""
|
||||||
|
|
8
mix.exs
8
mix.exs
|
@ -192,12 +192,18 @@ defmodule Livebook.MixProject do
|
||||||
]
|
]
|
||||||
|
|
||||||
defp build_mac_app(release) 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
|
end
|
||||||
|
|
||||||
defp build_mac_app_dmg(release) do
|
defp build_mac_app_dmg(release) do
|
||||||
options =
|
options =
|
||||||
[
|
[
|
||||||
|
is_agent_app: true,
|
||||||
codesign: [
|
codesign: [
|
||||||
identity: System.fetch_env!("CODESIGN_IDENTITY")
|
identity: System.fetch_env!("CODESIGN_IDENTITY")
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Reference in a new issue