mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-02 22:06:50 +02:00
chore(autostart): update auto-launch to 0.6 (#3546)
* chore(autostart): update auto-launch to 0.6 * migrate to `set_macos_launch_mode` * back to zzzgydi main branch * use crates.io version of auto-launch * Add change file * revert unrelated bumps
This commit is contained in:
4 files changed
+89
-183
No files matched your search
@@ -35,6 +35,16 @@ pub enum MacosLauncher {
|
||||
AppleScript,
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
impl MacosLauncher {
|
||||
fn to_auto_launch(&self) -> auto_launch::MacOSLaunchMode {
|
||||
match self {
|
||||
MacosLauncher::LaunchAgent => auto_launch::MacOSLaunchMode::LaunchAgent,
|
||||
MacosLauncher::AppleScript => auto_launch::MacOSLaunchMode::AppleScript,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The error type of this plugin.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum Error {
|
||||
@@ -227,10 +237,7 @@ impl Builder {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
builder.set_use_launch_agent(matches!(
|
||||
self.macos_launcher,
|
||||
MacosLauncher::LaunchAgent
|
||||
));
|
||||
builder.set_macos_launch_mode(self.macos_launcher.to_auto_launch());
|
||||
// on macOS, current_exe gives path to /Applications/Example.app/MacOS/Example
|
||||
// but this results in seeing a Unix Executable in macOS login items
|
||||
// It must be: /Applications/Example.app
|
||||
|
||||
Reference in new issue
Block a user