Skip to content

Commit

Permalink
version 1.0.3 and add support for Java 16/17
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Jul 19, 2021
1 parent 72b890d commit ce6f3e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use zip::ZipArchive;

const MIRAI_REPO: &str = "https://gitee.com/peratx/mirai-repo/raw/master";

const PROG_VERSION: &str = "1.0.2";
const PROG_VERSION: &str = "1.0.3";

fn get_os() -> &'static str {
#[cfg(target_os = "windows")]
Expand Down Expand Up @@ -203,9 +203,9 @@ async fn main() {
let _ = fs::remove_dir_all("java");
}

print!("Java version (8-15, default: 11): ");
print!("Java version (8-17, default: 11): ");
let mut ver = str_to_int(&read_line());
ver = if (8..=15).contains(&ver) { ver } else { 11 };
ver = if (8..=17).contains(&ver) { ver } else { 11 };

print!("JRE or JDK (1: JRE, 2: JDK, default: JRE): ");
let jre = if str_to_int(&read_line()) == 2 {
Expand Down Expand Up @@ -285,7 +285,7 @@ async fn main() {
println!("Extracting Archive...");
exec(
Command::new("tar").arg("-zxf").arg("java.arc"),
"unarchiving Java",
"decompressing Java",
);
}

Expand Down

0 comments on commit ce6f3e2

Please sign in to comment.