mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Update all dependencies (#415)
* Update all dependencies * Remove openssl and use rustls for reqwest * Add nix as dependency to ensure fs feature * Specify specific wayland-cursor dependency This fixes the problem with egui where it can not compile on linux * Update version to 1.9.5 * Update cargo-lock for flatpak
This commit is contained in:
+13
-6
@@ -1,6 +1,6 @@
|
||||
use std::{process::Command, thread::sleep, time::Duration};
|
||||
use std::{ffi::OsStr, process::Command, thread::sleep, time::Duration};
|
||||
|
||||
use sysinfo::System;
|
||||
use sysinfo::{ProcessRefreshKind, ProcessesToUpdate, System};
|
||||
|
||||
pub fn ensure_steam_stopped() {
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -8,13 +8,18 @@ pub fn ensure_steam_stopped() {
|
||||
#[cfg(target_family = "unix")]
|
||||
let steam_name = "steam";
|
||||
|
||||
let os_steam_name = OsStr::new(steam_name);
|
||||
|
||||
let s = System::new_all();
|
||||
let processes = s.processes_by_name(steam_name);
|
||||
let processes = s.processes_by_name(os_steam_name);
|
||||
for process in processes {
|
||||
let mut s = System::new();
|
||||
process.kill_with(sysinfo::Signal::Quit);
|
||||
process.kill_with(sysinfo::Signal::Kill);
|
||||
while s.refresh_process(process.pid()) {
|
||||
let pid = process.pid();
|
||||
let pid_arr = [pid];
|
||||
let process_to_update = ProcessesToUpdate::Some(&pid_arr);
|
||||
while s.refresh_processes_specifics(process_to_update, true,ProcessRefreshKind::everything()) == 0{
|
||||
println!("Waiting for steam to stop");
|
||||
sleep(Duration::from_millis(500));
|
||||
process.kill_with(sysinfo::Signal::Quit);
|
||||
@@ -25,8 +30,9 @@ pub fn ensure_steam_stopped() {
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn ensure_steam_started(settings: &super::SteamSettings) {
|
||||
let steam_name = "steam.exe";
|
||||
let os_steam_name = OsStr::new(steam_name);
|
||||
let s = System::new_all();
|
||||
let mut processes = s.processes_by_name(steam_name);
|
||||
let mut processes = s.processes_by_name(os_steam_name);
|
||||
if processes.next().is_none() {
|
||||
//no steam, we need to start it
|
||||
println!("Starting steam");
|
||||
@@ -44,8 +50,9 @@ pub fn ensure_steam_started(settings: &super::SteamSettings) {
|
||||
#[cfg(target_family = "unix")]
|
||||
pub fn ensure_steam_started(_settings: &super::SteamSettings) {
|
||||
let steam_name = "steam";
|
||||
let os_steam_name = OsStr::new(steam_name);
|
||||
let s = System::new_all();
|
||||
let mut processes = s.processes_by_name(steam_name);
|
||||
let mut processes = s.processes_by_name(os_steam_name);
|
||||
if processes.next().is_none() {
|
||||
//no steam, we need to start it
|
||||
println!("Starting steam");
|
||||
|
||||
@@ -99,6 +99,7 @@ pub async fn download_images_for_users<'b>(
|
||||
.map(|to_download| async move {
|
||||
if let Err(e) = download_to_download(to_download).await {
|
||||
println!("Error downloading {:?}: {}", &to_download.path, e);
|
||||
dbg!(&e);
|
||||
}
|
||||
})
|
||||
.buffer_unordered(CONCURRENT_REQUESTS)
|
||||
|
||||
+1
-1
@@ -334,7 +334,7 @@ pub fn run_ui(args: Vec<String>) -> eyre::Result<()> {
|
||||
native_options,
|
||||
Box::new(|cc| {
|
||||
setup(&cc.egui_ctx);
|
||||
Box::new(app)
|
||||
Ok(Box::new(app))
|
||||
}),
|
||||
);
|
||||
run_result.map_err(|e| eyre::eyre!("Could not initialize: {:?}", e))
|
||||
|
||||
Reference in New Issue
Block a user