You've already forked AstralRinth
forked from didirus/AstralRinth
Downloading launcher files
This commit is contained in:
12
theseus_cli/Cargo.toml
Normal file
12
theseus_cli/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "theseus_cli"
|
||||
version = "0.1.0"
|
||||
authors = ["Jai A <jaiagr+gpg@pm.me>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
theseus = { path = "../theseus" }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
futures = "0.3"
|
||||
28
theseus_cli/src/main.rs
Normal file
28
theseus_cli/src/main.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use futures::{executor, future};
|
||||
use std::path::Path;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let mut thing1 = theseus::launcher::meta::fetch_version_manifest()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// future::join_all(thing1.versions.iter().map(|x| async move {
|
||||
// println!("{}", x.url);
|
||||
// let version = theseus::launcher::meta::fetch_version_info(x)
|
||||
// .await
|
||||
// .unwrap();
|
||||
//
|
||||
// println!("{:?}", version);
|
||||
// }))
|
||||
// .await;
|
||||
|
||||
if let Some(version) = thing1.versions.iter().find(|x| &*x.id == "1.17") {
|
||||
println!("{}", version.id);
|
||||
let thing = theseus::launcher::meta::fetch_version_info(&version)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
theseus::launcher::download::download_client(&Path::new("./versions"), &thing).await;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user