mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-12 01:48:24 +08:00
fc7328703a
1. Replace `mix release mac_app|mac_app_dmg|windows_installer` with a single `mix release app` 2. Extract templates (Launcher.swift, Launcher.vbs, etc) into separate files in app_builder/lib/templates 3. Don't verify vc_redist.x64.exe checksum as the Microsoft publishes new releases on the same URL
37 lines
782 B
Elixir
37 lines
782 B
Elixir
defmodule AppBuilder do
|
|
def bundle(release) do
|
|
os = os()
|
|
|
|
allowed_options = [
|
|
:name,
|
|
:server,
|
|
icon_path: [
|
|
macos: Application.app_dir(:wx, "examples/demo/erlang.png")
|
|
],
|
|
url_schemes: [],
|
|
document_types: [],
|
|
additional_paths: [],
|
|
macos_is_agent_app: false,
|
|
macos_build_dmg: false,
|
|
macos_notarization: nil,
|
|
windows_build_installer: true
|
|
]
|
|
|
|
options = Keyword.validate!(release.options[:app], allowed_options)
|
|
|
|
case os do
|
|
:macos ->
|
|
AppBuilder.MacOS.bundle(release, options)
|
|
|
|
:windows ->
|
|
AppBuilder.Windows.bundle(release, options)
|
|
end
|
|
end
|
|
|
|
def os do
|
|
case :os.type() do
|
|
{:unix, :darwin} -> :macos
|
|
{:win32, _} -> :windows
|
|
end
|
|
end
|
|
end
|