cfg attrs

This commit is contained in:
NikVolf 2016-06-14 17:37:01 +03:00
parent 5920a7068f
commit 39e2f6c891
2 changed files with 5 additions and 3 deletions

View File

@ -98,6 +98,7 @@ function un.onInit
#Verify the uninstaller - last chance to back out #Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL "Permanantly remove ${APPNAME}?" IDOK next MessageBox MB_OKCANCEL "Permanantly remove ${APPNAME}?" IDOK next
Abort Abort
next: next:
!insertmacro VerifyUserIsAdmin !insertmacro VerifyUserIsAdmin
functionEnd functionEnd
@ -121,4 +122,5 @@ section "uninstall"
# Remove uninstaller information from the registry # Remove uninstaller information from the registry
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}"
sectionEnd sectionEnd

View File

@ -31,7 +31,7 @@ mod shell {
pub use self::winapi::SW_SHOWNORMAL as Normal; pub use self::winapi::SW_SHOWNORMAL as Normal;
} }
#[cfg(target_os = "windows")] #[cfg(windows)]
pub fn open(url: &str) { pub fn open(url: &str) {
use std::ffi::CString; use std::ffi::CString;
use std::ptr; use std::ptr;
@ -46,12 +46,12 @@ pub fn open(url: &str) {
} }
} }
#[cfg(target_os = "macos")] #[cfg(macos)]
pub fn open(url: &str) { pub fn open(url: &str) {
let _ = std::process::Command::new("open").arg(url).output(); let _ = std::process::Command::new("open").arg(url).output();
} }
#[cfg(target_os = "linux")] #[cfg(linux)]
pub fn open(url: &str) { pub fn open(url: &str) {
let _ = std::process::Command::new("xdg-open").arg(url).output(); let _ = std::process::Command::new("xdg-open").arg(url).output();
} }