Skip to main content

launch_flatpak

Function launch_flatpak 

Source
pub fn launch_flatpak(
    id: &FlatpakID,
    library_path: &str,
    asar_path: &str,
    args: Vec<String>,
    detach: bool,
) -> Result<Option<u32>, String>
Expand description

Launches an Electron executable through Flatpak with the provided information.

This is only available on Linux.

TODO: This only supports global packages. Are –user flatpak packages handled differently?

id: The ID of the flatpak package.

library_path: The path to the electron-hook .so or .dll

asar_path: The path to the ASAR file to inject

args: Arguments to pass to the executable

detach: It is recommended to set detach to true to prevent the process from dying when the parent process is closed.