Lots of fixes #4

Merged
MojaveMF merged 2 commits from main into main 2023-11-04 06:50:05 -05:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 1e5f353285 - Show all commits

View File

@ -6,8 +6,8 @@ pub const FILES_TO_DOWNLOAD: [[&str; 2]; 17] = [
["redist.zip", "./"], ["redist.zip", "./"],
["content-textures.zip", "./content/textures"], ["content-textures.zip", "./content/textures"],
["content-textures2.zip", "./content/textures"], ["content-textures2.zip", "./content/textures"],
["content-textures3.zip", "./content/textures"], ["content-textures3.zip", "./PlatformContent/pc/textures"],
["content-terrain.zip", "./content/terrain"], ["content-terrain.zip", "./PlatformContent/pc/terrain"],
["content-fonts.zip", "./content/fonts"], ["content-fonts.zip", "./content/fonts"],
["content-sounds.zip", "./content/sounds"], ["content-sounds.zip", "./content/sounds"],
["content-scripts.zip", "./content/scripts"], ["content-scripts.zip", "./content/scripts"],

View File

@ -5,6 +5,7 @@ use md5;
use metadata::LevelFilter; use metadata::LevelFilter;
use reqwest::Client; use reqwest::Client;
use std::path::PathBuf; use std::path::PathBuf;
use tokio::fs::create_dir_all;
use tokio::task::JoinSet; use tokio::task::JoinSet;
use zip_extract; use zip_extract;
@ -289,7 +290,10 @@ async fn main() {
let mut set = JoinSet::new(); let mut set = JoinSet::new();
for [value, _] in FILES_TO_DOWNLOAD { for [value, path] in FILES_TO_DOWNLOAD {
create_dir_all(current_version_directory.join(path))
.await
.unwrap();
set.spawn(download_and_extract( set.spawn(download_and_extract(
value.to_string(), value.to_string(),
version_url_prefix.clone(), version_url_prefix.clone(),