Fixed platform content folder

This commit is contained in:
mojavemf 2023-11-04 11:48:47 +00:00
parent 99b4b75e24
commit 1e5f353285
2 changed files with 7 additions and 3 deletions

View File

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

View File

@ -5,6 +5,7 @@ use md5;
use metadata::LevelFilter;
use reqwest::Client;
use std::path::PathBuf;
use tokio::fs::create_dir_all;
use tokio::task::JoinSet;
use zip_extract;
@ -289,7 +290,10 @@ async fn main() {
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(
value.to_string(),
version_url_prefix.clone(),