From 0cce5a47ab3ea08f324313d1e2723caae279388d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Fri, 18 May 2018 13:24:25 +0200 Subject: [PATCH] Fix cargo run flow without FRACTAL_LOCALEDIR env In the build.rs we're looking for the FRACTAL_LOCALEDIR env variable that is written by the cargo.sh script ran by meson but if we want to run this for development we can't use cargo run because that env doesn't exists so we'll use fractal-gtk/po as default. --- fractal-gtk/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fractal-gtk/build.rs b/fractal-gtk/build.rs index 22fa29a0..11ec44a8 100644 --- a/fractal-gtk/build.rs +++ b/fractal-gtk/build.rs @@ -13,8 +13,9 @@ fn main() { .unwrap(); // Generating build globals + let default_locales = "./fractal-gtk/po".to_string(); let out_dir = env::var("OUT_DIR").unwrap(); - let localedir = env::var("FRACTAL_LOCALEDIR").unwrap(); + let localedir = env::var("FRACTAL_LOCALEDIR").unwrap_or(default_locales); let dest_path = Path::new(&out_dir).join("build_globals.rs"); let mut f = File::create(&dest_path).unwrap();