Trying to fix windows

This commit is contained in:
Eric Ratliff
2026-01-25 10:28:36 -06:00
parent d92d49254b
commit 9a41138d4c

View File

@@ -8,19 +8,33 @@ use colored::*;
const ANDROID_SDK_URL_LINUX: &str = "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip"; const ANDROID_SDK_URL_LINUX: &str = "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip";
const ANDROID_SDK_URL_MAC: &str = "https://dl.google.com/android/repository/commandlinetools-mac-11076708_latest.zip"; const ANDROID_SDK_URL_MAC: &str = "https://dl.google.com/android/repository/commandlinetools-mac-11076708_latest.zip";
const ANDROID_SDK_URL_WINDOWS: &str = "https://dl.google.com/android/repository/commandlinetools-win-11076708_latest.zip";
pub fn install(sdk_path: &Path) -> Result<()> { pub fn install(sdk_path: &Path) -> Result<()> {
// Check if SDK exists AND is complete
if sdk_path.exists() { if sdk_path.exists() {
println!("{} Android SDK already installed at: {}", match verify(sdk_path) {
"".green(), Ok(_) => {
sdk_path.display() println!("{} Android SDK already installed at: {}",
); "".green(),
return Ok(()); sdk_path.display()
);
return Ok(());
}
Err(_) => {
println!("{} Android SDK found but incomplete, reinstalling...",
"".yellow()
);
// Continue with installation
}
}
} }
println!("{}", "Installing Android SDK...".bright_yellow()); println!("{}", "Installing Android SDK...".bright_yellow());
let url = if cfg!(target_os = "macos") { let url = if cfg!(target_os = "windows") {
ANDROID_SDK_URL_WINDOWS
} else if cfg!(target_os = "macos") {
ANDROID_SDK_URL_MAC ANDROID_SDK_URL_MAC
} else { } else {
ANDROID_SDK_URL_LINUX ANDROID_SDK_URL_LINUX