Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
2020Support
Browse files Browse the repository at this point in the history
  • Loading branch information
PrintedScript committed Oct 15, 2023
1 parent 966252d commit 35b9172
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 35b9172

Please sign in to comment.