unix support

This commit is contained in:
AmokDev 2025-06-20 05:50:08 +03:00
parent c03a24185f
commit bcd76e787d
2 changed files with 13 additions and 3 deletions

View file

@ -12,6 +12,8 @@ parking_lot = "0.12.3"
tokio = { version = "1.45.0", features = ["full", "io-std"] }
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
[target.'cfg(windows)'.dependencies]
win32console = "0.1.5"
[profile.dev]

View file

@ -13,6 +13,7 @@ use utils::commands;
use std::time::Instant;
use utils::tools::*;
use once_cell::sync::OnceCell;
#[cfg(windows)]
use win32console::console::WinConsole;
static OWNER_NAME: OnceCell<String> = OnceCell::new();
@ -22,12 +23,19 @@ pub struct State {
pub messages_received: Arc<Mutex<usize>>
}
#[tokio::main]
async fn main() {
match WinConsole::set_title("UwUMine | Auto-Farm Bot") {
#[cfg(windows)]
fn rename_windows_console() {
match WinConsole::set_title("UwUMine | Auto Bot") {
Ok(_) => print!(""),
Err(e) => eprintln!("oshibka {}", e),
};
}
#[tokio::main]
async fn main() {
#[cfg(windows)]
rename_windows_console();
println!(":: Бот сделан AmokDev");
println!(":: Удачи в игре!");