fix: blind windows ci build fixes

This commit is contained in:
zhom
2025-06-09 06:25:22 +04:00
parent 6d437f30e1
commit bbc12bcc03
3 changed files with 7 additions and 8 deletions
+7 -3
View File
@@ -3,7 +3,6 @@ use directories::BaseDirs;
use serde::{Deserialize, Serialize};
use std::fs::{self, create_dir_all};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{SystemTime, UNIX_EPOCH};
use sysinfo::{Pid, System};
use tauri::Emitter;
@@ -35,6 +34,7 @@ pub struct BrowserProfile {
mod macos {
use super::*;
use std::ffi::OsString;
use std::process::Command;
pub fn is_tor_or_mullvad_browser(exe_name: &str, cmd: &[OsString], browser_type: &str) -> bool {
match browser_type {
@@ -605,7 +605,10 @@ mod windows {
if !output.status.success() {
// Fallback: try without -requestPending
let mut fallback_cmd = Command::new(browser.get_executable_path(browser_dir)?);
let executable_path = browser
.get_executable_path(browser_dir)
.map_err(|e| format!("Failed to get executable path: {}", e))?;
let mut fallback_cmd = Command::new(executable_path);
fallback_cmd.args(["-profile", &profile.profile_path, "-new-tab", url]);
if let Some(parent_dir) = browser_dir
@@ -677,7 +680,7 @@ mod windows {
browser_type: BrowserType,
browser_dir: &Path,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let browser = create_browser(browser_type);
let browser = create_browser(browser_type.clone());
let executable_path = browser
.get_executable_path(browser_dir)
.map_err(|e| format!("Failed to get executable path: {}", e))?;
@@ -772,6 +775,7 @@ mod windows {
mod linux {
use super::*;
use std::ffi::OsString;
use std::process::Command;
pub fn is_tor_or_mullvad_browser(
_exe_name: &str,
-1
View File
@@ -305,7 +305,6 @@ mod windows {
// This helps refresh the system's understanding of the changes
unsafe {
use std::ffi::c_void;
use std::ptr;
// Declare the Windows API functions
type UINT = u32;
-4
View File
@@ -453,8 +453,6 @@ impl Extractor {
zip_path: &Path,
dest_dir: &Path,
) -> Result<PathBuf, Box<dyn std::error::Error + Send + Sync>> {
use std::io::Read;
println!("Extracting ZIP archive on Windows: {}", zip_path.display());
// Create destination directory if it doesn't exist
@@ -500,8 +498,6 @@ impl Extractor {
zip_path: &Path,
dest_dir: &Path,
) -> Result<PathBuf, Box<dyn std::error::Error + Send + Sync>> {
use std::io::Read;
println!("Using Rust zip crate for extraction (Windows 7+ compatibility)");
let file = fs::File::open(zip_path)?;