1
1
mirror of https://github.com/neosubhamoy/pytubepp-helper.git synced 2026-02-04 11:22:22 +05:30

(feat): added support for macOS

This commit is contained in:
2024-12-16 22:37:00 +05:30
Verified
parent 1dc8ef659f
commit c235db28c1
11 changed files with 416 additions and 261 deletions

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.neosubhamoy.pytubepp.helper</string>
<key>Program</key>
<string>/Applications/pytubepp-helper.app/Contents/MacOS/pytubepp-helper</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

View File

@@ -28,9 +28,24 @@ fn connect_with_retry(url: &str, max_attempts: u32) -> Result<websocket::sync::C
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg(target_os = "windows")]
{
let _ = Command::new("pytubepp-helper.exe").spawn();
}
#[cfg(target_os = "linux")]
{
let _ = Command::new("pytubepp-helper").spawn();
}
#[cfg(target_os = "macos")]
{
let _ = Command::new("/Applications/pytubepp-helper.app/Contents/MacOS/pytubepp-helper").spawn();
}
// Launch the main application
let _ = Command::new("pytubepp-helper")
.spawn();
// let _ = Command::new("pytubepp-helper")
// .spawn();
// Connect with the Tauri app
let websocket_url = "ws://localhost:3030";