1
0
Fork 0
This repository has been archived on 2024-01-06. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
autoconfig/src/common/utils/configure/mod.rs

28 lines
No EOL
646 B
Rust

#[cfg(target_os = "windows")]
mod windows;
mod common;
pub enum ConfigMode {
INSTALL,
UNINSTALL
}
pub fn configure(mode: &ConfigMode) -> Result<(), String> {
common::configure_folder(&mode).ok_or(format!("Failed to configure folder"))?;
#[cfg(target_os = "windows")]
windows::configure(&mode).ok_or(format!("Failed to configure environment"))?;
#[cfg(not(target_os = "windows"))]
#[cfg(not(target_os = "linux"))]
#[cfg(not(target_os = "macos"))]
{
Err(format!("OS not supported"))
}
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
{
Ok(())
}
}