From 35b9172a6acd1096b4ba90f54c60aee3c7af5bcf Mon Sep 17 00:00:00 2001 From: PrintedScript <64908610+PrintedScript@users.noreply.github.com> Date: Sun, 15 Oct 2023 18:13:13 +0800 Subject: [PATCH] 2020Support --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bed6ffe..bb7ff78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1261,7 +1261,7 @@ dependencies = [ [[package]] name = "syntax_bootstrapper" -version = "1.1.3" +version = "1.2.0" dependencies = [ "chrono", "colored", diff --git a/Cargo.toml b/Cargo.toml index 4f29814..8411d0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "syntax_bootstrapper" -version = "1.1.3" +version = "1.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index e6d1288..8206b9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -305,6 +305,7 @@ async fn main() { let ShadersZip : PathBuf = download_file_prefix(&http_client, format!("{}shaders.zip", VersionURLPrefix).as_str(), &temp_downloads_directory).await; let Client2018Zip : PathBuf = download_file_prefix(&http_client, format!("{}2018client.zip", VersionURLPrefix).as_str(), &temp_downloads_directory).await; + let Client2020Zip : PathBuf = download_file_prefix(&http_client, format!("{}2020client.zip", VersionURLPrefix).as_str(), &temp_downloads_directory).await; info("Download finished, extracting files."); fn extract_to_dir( zip_file : &PathBuf, target_dir : &PathBuf ) { @@ -364,6 +365,10 @@ async fn main() { create_folder_if_not_exists(&client_2018_directory).await; extract_to_dir(&Client2018Zip, &client_2018_directory); + let client_2020_directory = current_version_directory.join("Client2020"); + create_folder_if_not_exists(&client_2020_directory).await; + extract_to_dir(&Client2020Zip, &client_2020_directory); + info("Finished extracting files, cleaning up."); std::fs::remove_dir_all(&temp_downloads_directory).unwrap(); @@ -509,6 +514,8 @@ x-scheme-handler/syntax-player=syntax-player.desktop debug(&client_year.to_string()); if client_year == "2018" { client_executable_path = current_version_directory.join("Client2018").join("SyntaxPlayerBeta.exe"); + } else if client_year == "2020" { + client_executable_path = current_version_directory.join("Client2020").join("SyntaxPlayerBeta.exe"); } else { client_executable_path = current_version_directory.join("SyntaxPlayerBeta.exe"); }