Compare commits

..

No commits in common. 'b737c376d94cb74635a233ae2353d9a5f00a1ee3' and '6dc1f86ee3179c1e1dab3459ed80b81e60bb1d9a' have entirely different histories.

@ -8,8 +8,8 @@ use std::fs;
use std::path::{Path, PathBuf};
const MANIFEST_NAME: &str = "org.cleanflash.flash_player";
const FIREFOX_MANIFEST_FILENAME: &str = "clean_flash_firefox.json";
const CHROME_MANIFEST_FILENAME: &str = "clean_flash_chrome.json";
const FIREFOX_MANIFEST_FILENAME: &str = "org.cleanflash.flash_player.json";
const CHROME_MANIFEST_FILENAME: &str = "org.cleanflash.flash_player.json";
const FIREFOX_ALLOWED_EXTENSION: &str = "flash-player@cleanflash.org";
const ALLOWED_ORIGIN: &str = "chrome-extension://dcikaadaeajidejkoekdflmfdgeoldcb/";
@ -116,21 +116,14 @@ pub fn get_native_host_install_dir() -> PathBuf {
#[cfg(not(windows))]
pub fn get_native_host_install_dir() -> PathBuf {
if cfg!(target_os = "macos") {
// Install to ~/Library/Application Support/Clean Flash instead
if let Ok(home) = std::env::var("HOME") {
PathBuf::from(home).join("Library/Application Support/Clean Flash")
} else {
PathBuf::from("/Library/Application Support/Clean Flash")
}
} else if cfg!(target_os = "linux") {
} else {
// Linux
if let Ok(home) = std::env::var("HOME") {
PathBuf::from(home).join(".cleanflash")
} else {
PathBuf::from("/tmp/.cleanflash")
}
} else {
unreachable!()
}
}
@ -185,11 +178,6 @@ fn get_non_windows_browser_targets(home: &Path) -> Vec<BrowserManifestTarget> {
manifest_dir: home.join("Library/Application Support/Mozilla/NativeMessagingHosts"),
kind: BrowserKind::Firefox,
},
BrowserManifestTarget {
detect_path: home.join("Library/Application Support/net.imput.helium"),
manifest_dir: home.join("Library/Application Support/net.imput.helium/NativeMessagingHosts"),
kind: BrowserKind::ChromeLike,
}
]
} else {
vec![
@ -223,16 +211,11 @@ fn get_non_windows_browser_targets(home: &Path) -> Vec<BrowserManifestTarget> {
manifest_dir: home.join(".config/arc/NativeMessagingHosts"),
kind: BrowserKind::ChromeLike,
},
BrowserManifestTarget {
detect_path: home.join(".config/net.imput.helium"),
manifest_dir: home.join(".config/net.imput.helium/NativeMessagingHosts"),
kind: BrowserKind::ChromeLike,
},
BrowserManifestTarget {
detect_path: home.join(".mozilla"),
manifest_dir: home.join(".mozilla/native-messaging-hosts"),
kind: BrowserKind::Firefox,
}
},
]
}
}

@ -88,10 +88,7 @@ pub fn install(
return Ok(());
}
#[cfg(target_os = "linux")]
let archive_bytes: &[u8] = include_bytes!("../cleanflash-linux.7z");
#[cfg(target_os = "macos")]
let archive_bytes: &[u8] = include_bytes!("../cleanflash-macos.7z");
let archive_bytes: &[u8] = include_bytes!("../cleanflash.7z");
if archive_bytes.is_empty() {
return Ok(());

@ -399,7 +399,7 @@ pub fn install(
// The 7z archive is embedded in the binary via include_bytes!.
// For the port, we expect it at a known resource path; if not present,
// this is a no-op placeholder.
let archive_bytes: &[u8] = include_bytes!("../cleanflash-win.7z");
let archive_bytes: &[u8] = include_bytes!("../cleanflash.7z");
if archive_bytes.is_empty() {
// Nothing to extract; still apply the rest of the steps.

Loading…
Cancel
Save