Standardise desktop installer names (#1286)

This commit is contained in:
Wojtek Mach 2022-07-20 11:05:28 +02:00 committed by GitHub
parent 1ee1394fa6
commit 81ff876b7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View file

@ -11,6 +11,14 @@ defmodule AppBundler do
end
end
def target do
case :erlang.system_info(:system_architecture) do
'x86_64-apple-' ++ _ -> "macos-x86_64"
'aarch64-apple-' ++ _ -> "macos-aarch64"
'win32' -> "windows-x86_64"
end
end
def os do
case :os.type() do
{:unix, :darwin} -> :macos

View file

@ -98,9 +98,9 @@ defmodule AppBundler.MacOS do
log(:green, "signing", Path.relative_to_cwd(app_dir))
codesign(to_sign, "--options=runtime --entitlements=#{entitlements_plist_path}", notarization)
arch = :erlang.system_info(:system_architecture) |> to_string |> String.split("-") |> hd()
target = AppBundler.target()
vsn = release.version
dmg_path = "#{Mix.Project.build_path()}/#{app_name}Install-#{vsn}-#{arch}.dmg"
dmg_path = "#{Mix.Project.build_path()}/#{app_name}Install-#{vsn}-#{target}.dmg"
log(:green, "creating", Path.relative_to_cwd(dmg_path))
cmd!(

View file

@ -8,7 +8,7 @@ app_name = Keyword.fetch!(@app_options, :name)
Name "<%= app_name %>"
ManifestDPIAware true
OutFile "<%= app_name %>Install.exe"
OutFile "<%= app_name %>Install-<%= @release.version %>-<%= AppBundler.target() %>.exe"
Unicode True
InstallDir "$LOCALAPPDATA\<%= app_name %>"