pub fn run(&self) -> Command {
        let mut launcher = FirejailLauncher::default();

        launcher.whitelist(std::fs::canonicalize(self.path.to_path_buf()).unwrap());

        let mut cmd = launcher.command();

        cmd.arg(self.wine_bin_path());
        cmd.env("WINEPREFIX", self.wine_prefix_path());
        cmd.envs(
            self.get_env_vars()
                .iter()
                .map(|x| x.clone())
                .map(|x| x.to_key_value())
                .collect::<Vec<(String, String)>>(),
        );

        match self.config.sync {
            WineSync::AUTO => cmd.env("WINEESYNC", "1").env("WINEFSYNC", "1"),
            WineSync::ESYNC => cmd.env("WINEESYNC", "1"),
            WineSync::FSYNC => cmd.env("WINEFSYNC", "1"),
            WineSync::WINESYNC => todo!("winesync"),
        };

        cmd
    }
// Returns a `Command` that will start firejail with the proper profile and arguments
// along with a wineserver with the current prefix. It is up to the caller to use proper
// arguments or environmental modifications for the specified program.
Returns a `Command` that will start firejail with the proper profile and arguments
along with a wineserver with the current prefix. It is up to the caller to use proper
arguments or environmental modifications for the specified program.
Returns a ` Command ` that will start firejail with the proper profile and arguments along with a wineserver with the current prefix . It is up to the caller to use proper arguments or environmental modifications for the specified program .
pub fn run(&self) -> Command {
        let mut launcher = FirejailLauncher::default();
        launcher.whitelist(std::fs::canonicalize(self.path.to_path_buf()).unwrap());
        let mut cmd = launcher.command();
        cmd.arg(self.wine_bin_path());
        cmd.env("WINEPREFIX", self.wine_prefix_path());
        cmd.envs(
            self.get_env_vars()
                .iter()
                .map(|x| x.clone())
                .map(|x| x.to_key_value())
                .collect::<Vec<(String, String)>>(),
        );
        match self.config.sync {
            WineSync::AUTO => cmd.env("WINEESYNC", "1").env("WINEFSYNC", "1"),
            WineSync::ESYNC => cmd.env("WINEESYNC", "1"),
            WineSync::FSYNC => cmd.env("WINEFSYNC", "1"),
            WineSync::WINESYNC => todo!("winesync"),
        };
        cmd
    }
pub fn run ( & self ) -> Command { let mut launcher = FirejailLauncher :: default ( ) ; launcher . whitelist ( std :: fs :: canonicalize ( self . path . to_path_buf ( ) ) . unwrap ( ) ) ; let mut cmd = launcher . command ( ) ; cmd . arg ( self . wine_bin_path ( ) ) ; cmd . env ( " " , self . wine_prefix_path ( ) ) ; cmd . envs ( self . get_env_vars ( ) . iter ( ) . map ( | x | x . clone ( ) ) . map ( | x | x . to_key_value ( ) ) . collect :: < Vec < ( String , String ) > > ( ) , ) ; match self . config . sync { WineSync :: AUTO => cmd . env ( " " , " " ) . env ( " " , " " ) , WineSync :: ESYNC => cmd . env ( " " , " " ) , WineSync :: FSYNC => cmd . env ( " " , " " ) , WineSync :: WINESYNC => todo ! ( " " ) , } ; cmd }
Returns a `Command` that will start firejail with the proper profile and arguments
along with a wineserver with the current prefix.
Returns a ` Command ` that will start firejail with the proper profile and arguments along with a wineserver with the current prefix .
&self
&self