Lots of fixes #4

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

View File

@ -1,9 +1,23 @@
use std::fs;
use std::env;
use std::fs;
use winres::WindowsResource;
#[cfg(debug_assertions)]
fn main() {
let build_date = chrono::Utc::now()
.format("%Y-%m-%d %H:%M:%S UTC")
.to_string();
let out_dir = env::var("OUT_DIR").unwrap();
let dest_path = format!("{}/build_date.txt", out_dir);
fs::write(&dest_path, &build_date).unwrap();
}
#[cfg(not(debug_assertions))]
fn main() {
// Get the current build date and time
let build_date = chrono::Utc::now().format("%Y-%m-%d %H:%M:%S UTC").to_string();
let build_date = chrono::Utc::now()
.format("%Y-%m-%d %H:%M:%S UTC")
.to_string();
// Write the build date to a file
let out_dir = env::var("OUT_DIR").unwrap();
@ -27,4 +41,4 @@ fn main() {
}
println!("cargo:rerun-if-changed=build.rs");
}
}

View File

@ -230,9 +230,9 @@ async fn main() {
Ok(_) => {}
Err(e) => {
debug!("Bootstrapper errored with error {}", e);
info("Found bootstrapper was corrupted! Downloading...");
info!("Found bootstrapper was corrupted! Downloading...");
std::fs::remove_file(latest_bootstrapper_path.clone()).unwrap();
download_file(
download_to_file(
&http_client,
&format!(
"https://{}/{}-{}",

View File

@ -4,7 +4,6 @@
use colored::*;
use dirs::data_local_dir;
use futures_util::StreamExt;
use md5;
use reqwest::Client;
use reqwest::ClientBuilder;
use std::io::Cursor;
@ -16,7 +15,6 @@ use zip_extract;
use crate::constants::*;
use tracing::*;
#[cfg(not(target_os = "windows"))]
use std::io::prelude::*;
/*
#[cfg(not(target_os = "windows"))]