Fixes for file-watching, user assets, and system dependencies (#2)
* fix: avoid panics in case of non-existing path for watching
* fix: copy the themes and plugins
* Revert "add a few more libraries to the linux script"
This reverts commit 7509677003
.
* fix: add vulkan validation layers to the system deps
* fix: fix the themes paths
This commit is contained in:
parent
11964dc731
commit
d3562d4c9c
3 changed files with 18 additions and 9 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -937,6 +937,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blade-graphics"
|
name = "blade-graphics"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
|
source = "git+https://github.com/kvark/blade?rev=f35bc605154e210ab6190291235889b6ddad73f1#f35bc605154e210ab6190291235889b6ddad73f1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ash",
|
"ash",
|
||||||
"ash-window",
|
"ash-window",
|
||||||
|
|
|
@ -287,12 +287,17 @@ impl Fs for RealFs {
|
||||||
) -> Pin<Box<dyn Send + Stream<Item = Vec<Event>>>> {
|
) -> Pin<Box<dyn Send + Stream<Item = Vec<Event>>>> {
|
||||||
let (tx, rx) = smol::channel::unbounded();
|
let (tx, rx) = smol::channel::unbounded();
|
||||||
|
|
||||||
|
if !path.exists() {
|
||||||
|
log::error!("watch path does not exist: {}", path.display());
|
||||||
|
return Box::pin(rx);
|
||||||
|
}
|
||||||
|
|
||||||
let mut watcher = notify::recommended_watcher(move |res| match res {
|
let mut watcher = notify::recommended_watcher(move |res| match res {
|
||||||
Ok(event) => {
|
Ok(event) => {
|
||||||
let _ = tx.try_send(vec![event]);
|
let _ = tx.try_send(vec![event]);
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("watch error: {:?}", err);
|
log::error!("watch error: {}", err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
19
script/linux
19
script/linux
|
@ -3,10 +3,17 @@
|
||||||
# if not on Linux, do nothing
|
# if not on Linux, do nothing
|
||||||
[[ $(uname) == "Linux" ]] || exit 0
|
[[ $(uname) == "Linux" ]] || exit 0
|
||||||
|
|
||||||
# Copy settings and keymap to the user's home directory if they don't exist
|
# Copy assets to the user's home directory if they don't exist
|
||||||
mkdir -p "$HOME/.config/zed"
|
mkdir -p "$HOME/.config/zed"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.config/zed/plugins"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.config/zed/themes"
|
||||||
|
cp -ruL ./assets/themes/*/*.json "$HOME/.config/zed/themes"
|
||||||
|
|
||||||
test -f "$HOME/.config/zed/settings.json" ||
|
test -f "$HOME/.config/zed/settings.json" ||
|
||||||
cp -uL ./assets/settings/initial_user_settings.json "$HOME/.config/zed/settings.json"
|
cp -uL ./assets/settings/initial_user_settings.json "$HOME/.config/zed/settings.json"
|
||||||
|
|
||||||
test -f "$HOME/.config/zed/keymap.json" ||
|
test -f "$HOME/.config/zed/keymap.json" ||
|
||||||
cp -uL ./assets/keymaps/default.json "$HOME/.config/zed/keymap.json"
|
cp -uL ./assets/keymaps/default.json "$HOME/.config/zed/keymap.json"
|
||||||
|
|
||||||
|
@ -21,13 +28,7 @@ if [[ -n $apt ]]; then
|
||||||
deps=(
|
deps=(
|
||||||
libasound2-dev
|
libasound2-dev
|
||||||
libfontconfig-dev
|
libfontconfig-dev
|
||||||
libxcb-dev
|
vulkan-validationlayers*
|
||||||
alsa-base
|
|
||||||
cmake
|
|
||||||
fontconfig
|
|
||||||
libssl-dev
|
|
||||||
build-essential
|
|
||||||
|
|
||||||
)
|
)
|
||||||
$maysudo "$apt" install -y "${deps[@]}"
|
$maysudo "$apt" install -y "${deps[@]}"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -40,6 +41,7 @@ if [[ -n $dnf ]]; then
|
||||||
deps=(
|
deps=(
|
||||||
alsa-lib-devel
|
alsa-lib-devel
|
||||||
fontconfig-devel
|
fontconfig-devel
|
||||||
|
vulkan-validation-layers
|
||||||
)
|
)
|
||||||
$maysudo "$dnf" install -y "${deps[@]}"
|
$maysudo "$dnf" install -y "${deps[@]}"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -52,6 +54,7 @@ if [[ -n $pacman ]]; then
|
||||||
deps=(
|
deps=(
|
||||||
alsa-lib
|
alsa-lib
|
||||||
fontconfig
|
fontconfig
|
||||||
|
vulkan-validation-layers
|
||||||
)
|
)
|
||||||
$maysudo "$pacman" -S --noconfirm "${deps[@]}"
|
$maysudo "$pacman" -S --noconfirm "${deps[@]}"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue