INNER CODE UNIT · Rust
version
upvpn/upvpn-app · upvpn-config/src/lib.rs:143
pub fn version(&self) -> &'static str {
env!("UPVPN_VERSION")
}
pub fn license_file_path(&self) -> PathBuf {
if self.license_file_path.is_some() {
return self.license_file_path.clone().unwrap();
}
#[cfg(target_os = "linux")]
return PathBuf::from_str("/opt/upvpn/upvpn-oss-licenses.html").unwrap();
#[cfg(target_os = "macos")]
return PathBuf::from_str(
"/Applications/upvpn.app/Contents/Resources/upvpn-oss-licenses.html",
)
.unwrap();
#[cfg(target_os = "windows")]
return PathBuf::from(std::env::var("PROGRAMFILES").unwrap_or(
std::env::var("ProgramFiles").expect("missing PROGRAMFILES and ProgramFiles env var"),