mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add a hack to change the locale for tts builds
unfortunately it greatly increases build times. need to think about this but at least it prevents me from checking in a locale file that breaks all the other dev's builds
This commit is contained in:
parent
4f9ff8fb11
commit
34c9d83cba
1 changed files with 16 additions and 1 deletions
|
|
@ -221,6 +221,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
"../espeak-embedded/target/riscv32imac-unknown-xous-elf/release/espeak-embedded".to_string()
|
||||
};
|
||||
|
||||
let mut locale_override = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open("xous-rs/src/locale.rs").expect("Can't open locale for modification");
|
||||
write!(locale_override, "{}", "pub const LANG: &str = \"en-tts\";\n").unwrap();
|
||||
|
||||
let mut args = env::args();
|
||||
args.nth(1);
|
||||
let mut pkgs = hw_pkgs.to_vec();
|
||||
|
|
@ -238,7 +246,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
&pkgs,
|
||||
None, None,
|
||||
Some(&["--features", "tts", "--features", "braille",]),
|
||||
&[&tts_exec_string], None)?
|
||||
&[&tts_exec_string], None)?;
|
||||
let mut locale_revert = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open("xous-rs/src/locale.rs").expect("Can't open locale for modification");
|
||||
write!(locale_revert, "{}", "pub const LANG: &str = \"en\";\n").unwrap();
|
||||
}
|
||||
Some("libstd-test") => {
|
||||
let mut args = env::args();
|
||||
|
|
|
|||
Loading…
Reference in a new issue