This commit is contained in:
Luke D. Jones
2024-02-27 14:39:46 +13:00
parent 7b0f037cba
commit a88c33c201
64 changed files with 3424 additions and 7019 deletions

View File

@@ -1,33 +1,7 @@
use std::path::PathBuf;
use std::str::FromStr;
// use std::fs::OpenOptions;
// use std::io::Write;
// use diter_protocol::ParameterDefinitions;
// use ron::ser::PrettyConfig;
// const LOCALE_EN: &str =
// include_str!("../data/localization/en/parameters.json"); const LOCALE_IT:
// &str = include_str!("../data/localization/it/parameters.json");
// const LOCALE_ZH: &str =
// include_str!("../data/localization/zh/parameters.json");
// fn write_locales() {
// let root = env!("CARGO_MANIFEST_DIR");
// let mut path = PathBuf::from_str(root).unwrap();
// path.push("src/locales.ron");
// let mut file = OpenOptions::new();
// file.truncate(true).create(true).write(true);
// let en: ParameterDefinitions = serde_json::from_str(LOCALE_EN).unwrap();
// let mut writer = file.open(path).unwrap();
// let en = ron::ser::to_string_pretty(&en,
// PrettyConfig::new().depth_limit(4)).unwrap(); writer.write_all(en.
// to_string().as_bytes()).unwrap();
// // let it: ParameterDefinitions =
// serde_json::from_str(LOCALE_IT).unwrap(); // let zh: ParameterDefinitions
// = serde_json::from_str(LOCALE_ZH).unwrap(); }
use slint_build::CompilerConfiguration;
fn main() {
// write_locales();
@@ -35,5 +9,9 @@ fn main() {
let root = env!("CARGO_MANIFEST_DIR");
let mut path = PathBuf::from_str(root).unwrap();
path.push("ui/main_window.slint");
slint_build::compile(path).unwrap();
slint_build::compile_with_config(
path,
CompilerConfiguration::new().with_style("cosmic-dark".into()),
)
.unwrap();
}