|
|
--- a/crates/rnote-ui/src/env.rs 2025-11-02 17:20:23
|
|
|
+++ B/crates/rnote-ui/src/env.rs 2025-11-02 17:20:27
|
|
|
@@ -12,7 +12,7 @@
|
|
|
https://patch-diff.githubusercontent.com/raw/flxzt/rnote/pull/1577
|
|
|
From 795d6764b70ffc7d22406941d55501158d387d0e Mon Sep 17 00:00:00 2001
|
|
|
From: Doublonmousse <115779707+Doublonmousse@users.noreply.github.com>
|
|
|
Date: Sun, 2 Nov 2025 20:26:05 +0100
|
|
|
Subject: [PATCH 1/2] chore: update mac `env.rs` to modernize application
|
|
|
bundle
|
|
|
MIME-Version: 1.0
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
Co-Authored-By: René de Hesselle <11375494+dehesselle@users.noreply.github.com>
|
|
|
---
|
|
|
crates/rnote-ui/src/env.rs | 6 +++---
|
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
diff --git a/crates/rnote-ui/src/env.rs b/crates/rnote-ui/src/env.rs
|
|
|
index fabeb59277..0143a99e35 100644
|
|
|
--- a/crates/rnote-ui/src/env.rs
|
|
|
+++ b/crates/rnote-ui/src/env.rs
|
|
|
@@ -12,7 +12,7 @@ pub(crate) fn lib_dir() -> anyhow::Result<PathBuf> {
|
|
|
let canonicalized_exec_dir = exec_parent_dir()?.canonicalize()?;
|
|
|
|
|
|
if macos_is_in_app_bundle(&canonicalized_exec_dir) {
|
|
@@ -9,12 +26,43 @@ |
|
|
} else {
|
|
|
Ok(PathBuf::from(config::LIBDIR))
|
|
|
}
|
|
|
@@ -89,7 +89,7 @@
|
|
|
@@ -82,14 +82,14 @@ pub(crate) fn setup_env() -> anyhow::Result<()> {
|
|
|
|
|
|
if macos_is_in_app_bundle(canonicalized_exec_dir) {
|
|
|
let data_dir = data_dir()?;
|
|
|
- let lib_dir = lib_dir()?;
|
|
|
+ let resources_dir = exec_parent_dir()?.canonicalize()?.join("../Resources");
|
|
|
|
|
|
// SAFETY: this setup only happens while still being single-threaded
|
|
|
unsafe {
|
|
|
std::env::set_var("XDG_DATA_DIRS", data_dir);
|
|
|
std::env::set_var(
|
|
|
"GDK_PIXBUF_MODULE_FILE",
|
|
|
- lib_dir.join("gdk-pixbuf-2.0/2.10.0/loaders.cache"),
|
|
|
+ lib_dir.join("../Resources/etc/loaders.cache"),
|
|
|
+ resources_dir.join("/etc/loaders.cache"),
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
From 67acc9d451ae3c7f2bca12c071e7944fbfc3f84b Mon Sep 17 00:00:00 2001
|
|
|
From: Doublonmousse <115779707+Doublonmousse@users.noreply.github.com>
|
|
|
Date: Wed, 26 Nov 2025 19:01:26 +0100
|
|
|
Subject: [PATCH 2/2] fixup: remove unneeded leading `/` in `env.rs` for macos
|
|
|
|
|
|
---
|
|
|
crates/rnote-ui/src/env.rs | 2 +-
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
diff --git a/crates/rnote-ui/src/env.rs b/crates/rnote-ui/src/env.rs
|
|
|
index 0143a99e35..defe0da729 100644
|
|
|
--- a/crates/rnote-ui/src/env.rs
|
|
|
+++ b/crates/rnote-ui/src/env.rs
|
|
|
@@ -89,7 +89,7 @@ pub(crate) fn setup_env() -> anyhow::Result<()> {
|
|
|
std::env::set_var("XDG_DATA_DIRS", data_dir);
|
|
|
std::env::set_var(
|
|
|
"GDK_PIXBUF_MODULE_FILE",
|
|
|
- resources_dir.join("/etc/loaders.cache"),
|
|
|
+ resources_dir.join("etc/loaders.cache"),
|
|
|
);
|
|
|
}
|
|
|
} |