Adding build.rs for config file copy and changing render backend to tiny-skia.

This commit is contained in:
2026-05-26 18:26:56 +02:00
parent 6b4550dc8e
commit 078589332c
3 changed files with 46 additions and 696 deletions
Generated
+14 -695
View File
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -3,9 +3,12 @@ name = "kira-installer"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"
# Reference the build script
# build = "build.rs"
[dependencies] [dependencies]
blocking = "1.6" blocking = "1.6"
iced = { version = "0.14", default-features = false, features = ["crisp", "linux-theme-detection", "wgpu", "x11", "wayland", "smol", "image"] } iced = { version = "0.14", default-features = false, features = ["crisp", "linux-theme-detection", "tiny-skia", "x11", "smol", "image"] }
iced_moving_picture = "0" iced_moving_picture = "0"
log = "0.4" log = "0.4"
rust-i18n = "3" rust-i18n = "3"
@@ -15,9 +18,14 @@ toml = "1"
[dev-dependencies] [dev-dependencies]
rand = "0.10" rand = "0.10"
[profile.dev]
opt-level = 2
codegen-units = 16
[profile.release] [profile.release]
#lto = true #lto = true
debug = false debug = false
incremental = false
codegen-units = 16 codegen-units = 16
opt-level = 3 opt-level = 3
strip = true strip = true
+23
View File
@@ -0,0 +1,23 @@
use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
let profile = env::var("PROFILE").unwrap();
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let target_dir = PathBuf::from(&manifest_dir).join("target").join(&profile);
// Ensure target directory exists
if !target_dir.exists() {
fs::create_dir_all(&target_dir).ok();
}
// Copy the file (e.g., config.json) to the target directory
let source = PathBuf::from(&manifest_dir).join("src").join("kira_config.toml");
let dest = target_dir.join("kira_config.toml");
fs::copy(&source, &dest).expect("Failed to copy kira_config.toml");
// Optional: Tell Cargo to re-run this script if the source file changes
println!("cargo:rerun-if-changed=src/kira_config.toml");
}