fix: unix build
This commit is contained in:
parent
9205c0b12b
commit
0a3edba1ba
@ -2,6 +2,8 @@ mod http;
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use mslnk::ShellLink;
|
use mslnk::ShellLink;
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
use std::thread;
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
use std::{fs, path::PathBuf};
|
use std::{fs, path::PathBuf};
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@ -62,10 +64,7 @@ fn self_update_available() -> bool {
|
|||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
fn self_update() {
|
fn self_update() {
|
||||||
if self_update_available() {
|
if self_update_available() {
|
||||||
println!(
|
println!("A new version of the AlterWare launcher is available.");
|
||||||
"A new version of the AlterWare launcher is available: {}",
|
|
||||||
latest_version
|
|
||||||
);
|
|
||||||
println!("Download it at https://github.com/{}/releases/latest", REPO);
|
println!("Download it at https://github.com/{}/releases/latest", REPO);
|
||||||
println!("Launching in 10 seconds..");
|
println!("Launching in 10 seconds..");
|
||||||
thread::sleep(time::Duration::from_secs(10));
|
thread::sleep(time::Duration::from_secs(10));
|
||||||
|
Loading…
Reference in New Issue
Block a user