- Added `data_download_list` field to `ComponentConfig` struct in `component.rs`. - Implemented processing of `data_download_list` in the `PackageManager` to download files asynchronously in `facade.rs`. - Updated `installer.rs` to initialize `data_download_list` for various components. - Refactored `download_file` function in `utils.rs` to return `anyhow::Error` for better error handling.
23 lines
768 B
Rust
23 lines
768 B
Rust
use std::collections::HashMap;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct ComponentConfig {
|
|
pub name: String,
|
|
pub required: bool,
|
|
pub ports: Vec<u16>,
|
|
pub dependencies: Vec<String>,
|
|
pub linux_packages: Vec<String>,
|
|
pub macos_packages: Vec<String>,
|
|
pub windows_packages: Vec<String>,
|
|
pub download_url: Option<String>,
|
|
pub binary_name: Option<String>,
|
|
pub pre_install_cmds_linux: Vec<String>,
|
|
pub post_install_cmds_linux: Vec<String>,
|
|
pub pre_install_cmds_macos: Vec<String>,
|
|
pub post_install_cmds_macos: Vec<String>,
|
|
pub pre_install_cmds_windows: Vec<String>,
|
|
pub post_install_cmds_windows: Vec<String>,
|
|
pub env_vars: HashMap<String, String>,
|
|
pub data_download_list: Vec<String>,
|
|
pub exec_cmd: String,
|
|
}
|