Update linux binary expectations (#12622)

Fixes #12585

This changes the expectations for installed binaries on linux based on
work
that @jirutka has done for Alpine.

In particular, we now put the cli in place as `bin/zed` and the zed
binary as
`libexec/zed-editor`, and assume that packagers do the same.

cc @someone13574

Release notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-06-04 16:31:01 -06:00 committed by GitHub
parent c7d56302d2
commit 27beb9e697
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 65 additions and 35 deletions

View file

@ -43,7 +43,7 @@ cargo build --release --target "${target_triple}" --package zed --package cli
# Strip the binary of all debug symbols
# Later, we probably want to do something like this: https://github.com/GabrielMajeri/separate-symbols
strip "target/${target_triple}/release/Zed"
strip "target/${target_triple}/release/zed"
strip "target/${target_triple}/release/cli"
suffix=""
@ -57,13 +57,13 @@ temp_dir=$(mktemp -d)
zed_dir="${temp_dir}/zed$suffix.app"
# Binary
mkdir -p "${zed_dir}/bin"
cp "target/${target_triple}/release/Zed" "${zed_dir}/bin/zed"
cp "target/${target_triple}/release/cli" "${zed_dir}/bin/cli"
mkdir -p "${zed_dir}/bin" "${zed_dir}/libexec"
cp "target/${target_triple}/release/zed" "${zed_dir}/libexec/zed-editor"
cp "target/${target_triple}/release/cli" "${zed_dir}/bin/zed"
# Libs
find_libs() {
ldd target/${target_triple}/release/Zed |\
ldd target/${target_triple}/release/zed |\
cut -d' ' -f3 |\
grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\)'
}