relaunch 0.3.0

Relaunch is a crate for bundling and relaunching macOS applications, in order to access OS features that are only available to app bundles and not command-line applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2023-2024 by Mark Friedenbach <mark@friedenbach.org>
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use std::io::Error as IOError;

fn main() -> Result<(), IOError> {
    // Bundle and relaunch the application in a temporary directory.
    let _app =
        relaunch::Trampoline::new("re-Test-Simple", "com.github.maaku.relauncher.tests.Simple")
            .bundle(relaunch::InstallDir::Temp)?;
    // Check that we are bundled.
    assert!(relaunch::Trampoline::is_bundled());
    Ok(())
}

// End of File