use std::thread;
extern crate time;
+extern crate dirs;
#[cfg(all(target_os = "macos", not(feature="dummy")))]
#[macro_use]
use self::log4rs::config::{Appender, Config, Logger, Root};
let log_path = match dir {
- LogDir::Home => format!("{}/{}", std::env::home_dir().unwrap().display(), filename),
+ LogDir::Home => format!("{}/{}", dirs::home_dir().unwrap().display(), filename),
LogDir::Temp => format!("{}/{}", std::env::temp_dir().display(), filename),
LogDir::Custom(s) => format!("{}/{}", s, filename),
};
//! If uncertain, use a `Trampoline`. You can hit very strange behavior when running
//! Cocoa apps outside of an app bundle.
#![deny(missing_docs)]
+
+// Temporarily (mmmmhmm...) disable deprecated function warnings, because objc macros
+// throw tons of them in rustc 1.34-nightly when initializing atomic uints.
+#![allow(deprecated)]
+
use std;
use std::thread;
use std::time::Duration;
extern crate time;
+extern crate dirs;
+
extern crate objc;
use objc::runtime::Object;
use objc::runtime::Class;
let install_dir: PathBuf = match dir {
InstallDir::Temp => std::env::temp_dir(),
InstallDir::SystemApplications => PathBuf::from("/Applications/"),
- InstallDir::UserApplications => std::env::home_dir().unwrap().join("Applications/"),
+ InstallDir::UserApplications => dirs::home_dir().unwrap().join("Applications/"),
InstallDir::Custom(dir) => std::fs::canonicalize(PathBuf::from(dir))?,
};
info!("Install dir: {:?}", install_dir);