logiguard fork: GPUI xdg-activation keyboard-focus serial fix
Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
Single-commit orphan branch: full zed-industries/zed @ 8c74db0 source tree with a 3-file patch applied (no upstream history). Patch (crates/gpui_linux/src/linux/wayland/): - serial.rs: add SerialKind::KeyboardEnter - client.rs: store wl_keyboard.enter serial; add latest_serial_of() - window.rs: activate() uses keyboard-enter serial (Mutter focus gate) Mutter honors window activation only when the token carries the keyboard- focus serial from wl_keyboard.enter; GPUI used a stale mouse-press serial. See docs/tray-window-focus-wayland.md in logiguard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
283
script/linux
Executable file
283
script/linux
Executable file
@@ -0,0 +1,283 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
# if root or if sudo/unavailable, define an empty variable
|
||||
if [ "$(id -u)" -eq 0 ]
|
||||
then maysudo=''
|
||||
else maysudo="$(command -v sudo || command -v doas || true)"
|
||||
fi
|
||||
|
||||
function finalize {
|
||||
# after packages install (curl, etc), get the rust toolchain
|
||||
which rustup > /dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
cat <<EOF
|
||||
Finished installing Linux dependencies with script/linux
|
||||
EOF
|
||||
}
|
||||
|
||||
# Ubuntu, Debian, Mint, Kali, Pop!_OS, Raspbian, etc.
|
||||
apt=$(command -v apt-get || true)
|
||||
if [[ -n $apt ]]; then
|
||||
deps=(
|
||||
gcc
|
||||
g++
|
||||
libasound2-dev
|
||||
libfontconfig-dev
|
||||
libgit2-dev
|
||||
libglib2.0-dev
|
||||
libssl-dev
|
||||
libva-dev
|
||||
libvulkan1
|
||||
libwayland-dev
|
||||
libx11-xcb-dev
|
||||
libxkbcommon-x11-dev
|
||||
libzstd-dev
|
||||
make
|
||||
cmake
|
||||
clang
|
||||
lld
|
||||
llvm
|
||||
jq
|
||||
git
|
||||
curl
|
||||
gettext-base
|
||||
elfutils
|
||||
libsqlite3-dev
|
||||
musl-tools
|
||||
musl-dev
|
||||
build-essential
|
||||
pipewire
|
||||
xdg-desktop-portal
|
||||
)
|
||||
if (grep -qP 'PRETTY_NAME="(Debian|Raspbian).+13' /etc/os-release); then
|
||||
# libstdc++-14-dev is in build-essential
|
||||
true
|
||||
elif (grep -qP 'PRETTY_NAME="(Linux Mint 22|.+24\.(04|10))' /etc/os-release); then
|
||||
deps+=( libstdc++-14-dev )
|
||||
elif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+12|Linux Mint 21|.+22\.04)' /etc/os-release); then
|
||||
deps+=( libstdc++-12-dev )
|
||||
elif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+11|Linux Mint 20|.+20\.04)' /etc/os-release); then
|
||||
# Ubuntu 20.04 ships clang-10 and libstdc++-10 which lack adequate C++20
|
||||
# support for building webrtc-sys (requires -std=c++20, lambdas in
|
||||
# unevaluated contexts from clang 17+, and working std::ranges in the
|
||||
# stdlib).
|
||||
# Note: the prebuilt libwebrtc.a is compiled with libstdc++, so we must
|
||||
# use libstdc++ (not libc++) to avoid ABI mismatches at link time.
|
||||
|
||||
# libstdc++-11-dev (headers with working pointer_traits/contiguous_range)
|
||||
# is only available from the ubuntu-toolchain-r PPA. Add the source list
|
||||
# and GPG key manually instead of using add-apt-repository, whose HKP
|
||||
# keyserver lookups (port 11371) frequently time out in CI.
|
||||
$maysudo "$apt" install -y curl gnupg
|
||||
codename=$(lsb_release -cs)
|
||||
echo "deb https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu $codename main" | \
|
||||
$maysudo tee /etc/apt/sources.list.d/ubuntu-toolchain-r-test.list > /dev/null
|
||||
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | \
|
||||
sed -n '/-----BEGIN PGP PUBLIC KEY BLOCK-----/,/-----END PGP PUBLIC KEY BLOCK-----/p' | \
|
||||
$maysudo gpg --dearmor -o /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg
|
||||
deps+=( clang-18 libstdc++-11-dev )
|
||||
fi
|
||||
|
||||
$maysudo "$apt" update
|
||||
$maysudo "$apt" install -y "${deps[@]}"
|
||||
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Fedora, CentOS, RHEL, Alma, Amazon 2023, Oracle, etc.
|
||||
dnf=$(command -v dnf || true)
|
||||
# Old Redhat (yum only): Amazon Linux 2, Oracle Linux 7, etc.
|
||||
yum=$(command -v yum || true)
|
||||
|
||||
if [[ -n $dnf ]] || [[ -n $yum ]]; then
|
||||
pkg_cmd="${dnf:-${yum}}"
|
||||
deps=(
|
||||
musl-gcc
|
||||
gcc
|
||||
clang
|
||||
cmake
|
||||
alsa-lib-devel
|
||||
fontconfig-devel
|
||||
glib2-devel
|
||||
libva-devel
|
||||
wayland-devel
|
||||
libxcb-devel
|
||||
libxkbcommon-x11-devel
|
||||
openssl-devel
|
||||
libzstd-devel
|
||||
vulkan-loader
|
||||
sqlite-devel
|
||||
pipewire
|
||||
xdg-desktop-portal
|
||||
jq
|
||||
git
|
||||
tar
|
||||
)
|
||||
# perl used for building openssl-sys crate. See: https://docs.rs/openssl/latest/openssl/
|
||||
if grep -qP '^ID="?(fedora)' /etc/os-release; then
|
||||
deps+=(
|
||||
perl-FindBin
|
||||
perl-IPC-Cmd
|
||||
perl-File-Compare
|
||||
perl-File-Copy
|
||||
)
|
||||
elif grep -qP '^ID="?(rhel|rocky|alma|centos|ol)' /etc/os-release; then
|
||||
deps+=( perl-interpreter )
|
||||
fi
|
||||
|
||||
# gcc-c++ is g++ on RHEL8 and 8.x clones
|
||||
if grep -qP '^ID="?(rhel|rocky|alma|centos|ol)' /etc/os-release \
|
||||
&& grep -qP '^VERSION_ID="?(8)' /etc/os-release; then
|
||||
deps+=( gcc-c++ )
|
||||
else
|
||||
deps+=( g++ )
|
||||
fi
|
||||
|
||||
# libxkbcommon-x11-devel is in a non-default repo on RHEL 8.x/9.x (except on AmazonLinux)
|
||||
if grep -qP '^VERSION_ID="?(8|9)' /etc/os-release && grep -qP '^ID="?(rhel|rocky|centos|alma|ol)' /etc/os-release; then
|
||||
$maysudo dnf install -y 'dnf-command(config-manager)'
|
||||
if grep -qP '^PRETTY_NAME="(AlmaLinux 8|Rocky Linux 8)' /etc/os-release; then
|
||||
$maysudo dnf config-manager --set-enabled powertools
|
||||
elif grep -qP '^PRETTY_NAME="((AlmaLinux|Rocky|CentOS Stream) 9|Red Hat.+(8|9))' /etc/os-release; then
|
||||
$maysudo dnf config-manager --set-enabled crb
|
||||
elif grep -qP '^PRETTY_NAME="Oracle Linux Server 8' /etc/os-release; then
|
||||
$maysudo dnf config-manager --set-enabled ol8_codeready_builder
|
||||
elif grep -qP '^PRETTY_NAME="Oracle Linux Server 9' /etc/os-release; then
|
||||
$maysudo dnf config-manager --set-enabled ol9_codeready_builder
|
||||
else
|
||||
echo "Unexpected distro" && grep 'PRETTY_NAME' /etc/os-release && exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
$maysudo "$pkg_cmd" install -y "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# openSUSE
|
||||
# https://software.opensuse.org/
|
||||
zyp=$(command -v zypper || true)
|
||||
if [[ -n $zyp ]]; then
|
||||
deps=(
|
||||
alsa-devel
|
||||
clang
|
||||
cmake
|
||||
fontconfig-devel
|
||||
gcc
|
||||
libva-devel
|
||||
gcc-c++
|
||||
glib2-devel
|
||||
git
|
||||
gzip
|
||||
jq
|
||||
libvulkan1
|
||||
libx11-devel
|
||||
libxcb-devel
|
||||
libxkbcommon-devel
|
||||
libxkbcommon-x11-devel
|
||||
libzstd-devel
|
||||
make
|
||||
openssl-devel
|
||||
sqlite3-devel
|
||||
tar
|
||||
wayland-devel
|
||||
xcb-util-devel
|
||||
pipewire
|
||||
xdg-desktop-portal
|
||||
)
|
||||
$maysudo "$zyp" install -y "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Arch, Manjaro, etc.
|
||||
# https://archlinux.org/packages
|
||||
pacman=$(command -v pacman || true)
|
||||
if [[ -n $pacman ]]; then
|
||||
deps=(
|
||||
gcc
|
||||
clang
|
||||
musl
|
||||
cmake
|
||||
alsa-lib
|
||||
fontconfig
|
||||
glib2
|
||||
libva
|
||||
wayland
|
||||
libgit2
|
||||
libxcb
|
||||
libxkbcommon-x11
|
||||
openssl
|
||||
zstd
|
||||
pkgconf
|
||||
sqlite
|
||||
pipewire
|
||||
xdg-desktop-portal
|
||||
jq
|
||||
git
|
||||
)
|
||||
$maysudo "$pacman" -Syu --needed --noconfirm "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Void
|
||||
# https://voidlinux.org/packages/
|
||||
xbps=$(command -v xbps-install || true)
|
||||
if [[ -n $xbps ]]; then
|
||||
deps=(
|
||||
gettext-devel
|
||||
clang
|
||||
cmake
|
||||
jq
|
||||
elfutils-devel
|
||||
gcc
|
||||
alsa-lib-devel
|
||||
fontconfig-devel
|
||||
glib-devel
|
||||
libva-devel
|
||||
libxcb-devel
|
||||
libxkbcommon-devel
|
||||
libzstd-devel
|
||||
openssl-devel
|
||||
wayland-devel
|
||||
vulkan-loader
|
||||
sqlite-devel
|
||||
pipewire
|
||||
xdg-desktop-portal
|
||||
)
|
||||
$maysudo "$xbps" -Syu "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Gentoo
|
||||
# https://packages.gentoo.org/
|
||||
emerge=$(command -v emerge || true)
|
||||
if [[ -n $emerge ]]; then
|
||||
deps=(
|
||||
app-arch/zstd
|
||||
app-misc/jq
|
||||
dev-libs/glib
|
||||
dev-libs/openssl
|
||||
dev-libs/wayland
|
||||
dev-util/cmake
|
||||
media-libs/alsa-lib
|
||||
media-libs/fontconfig
|
||||
media-libs/libva
|
||||
media-libs/vulkan-loader
|
||||
x11-libs/libxcb
|
||||
x11-libs/libxkbcommon
|
||||
dev-db/sqlite
|
||||
media-video/pipewire
|
||||
sys-apps/xdg-desktop-portal
|
||||
)
|
||||
$maysudo "$emerge" -u "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Unsupported Linux distribution in script/linux"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user