summaryrefslogtreecommitdiffstats
path: root/src/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'src/launcher')
-rw-r--r--src/launcher/constants.rs7
-rw-r--r--src/launcher/download.rs3
2 files changed, 2 insertions, 8 deletions
diff --git a/src/launcher/constants.rs b/src/launcher/constants.rs
index aba0650..db90d2f 100644
--- a/src/launcher/constants.rs
+++ b/src/launcher/constants.rs
@@ -1,12 +1,6 @@
-use const_format::formatcp;
use lazy_static::lazy_static;
use regex::Regex;
-const PKG_NAME: &str = env!("CARGO_PKG_NAME");
-const PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
-const CRATE_NAME: &str = env!("CARGO_CRATE_NAME");
-
-pub const USER_AGENT: &str = formatcp!("{PKG_NAME}/{PKG_VERSION} (in {CRATE_NAME})");
pub const URL_VERSION_MANIFEST: &str = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json";
pub const URL_RESOURCE_BASE: &str = "https://resources.download.minecraft.net/";
pub const URL_JRE_MANIFEST: &str = "https://piston-meta.mojang.com/v1/products/java-runtime/2ec0cc96c44e5a76b9c8b7c39df7210883d12871/all.json";
@@ -16,6 +10,7 @@ pub const NATIVES_PREFIX: &str = "natives-";
pub const DEF_INSTANCE_NAME: &'static str = "default";
pub const DEF_PROFILE_NAME: &'static str = "default";
+// https://github.com/unmojang/FjordLauncher/pull/14/files
// https://login.live.com/oauth20_authorize.srf?client_id=00000000402b5328&redirect_uri=ms-xal-00000000402b5328://auth&response_type=token&display=touch&scope=service::user.auth.xboxlive.com::MBI_SSL%20offline_access&prompt=select_account
lazy_static! {
diff --git a/src/launcher/download.rs b/src/launcher/download.rs
index ec4a59c..3a89d79 100644
--- a/src/launcher/download.rs
+++ b/src/launcher/download.rs
@@ -8,9 +8,8 @@ use sha1_smol::{Digest, Sha1};
use tokio::fs;
use tokio::fs::File;
use tokio::io::{self, AsyncWriteExt};
-use crate::launcher::constants::USER_AGENT;
use crate::util;
-use crate::util::{FileVerifyError, IntegrityError};
+use crate::util::{FileVerifyError, IntegrityError, USER_AGENT};
pub trait Download: Debug + Display {
// return Ok(None) to skip downloading this file