fn create_bootstrapper(bundle_dir: &Path, settings: &Settings) -> crate::Result<()> {
  let file = &mut common::create_file(&bundle_dir.join("MacOS/__bootstrapper"))?;
  // Create a shell script to bootstrap the  $PATH for Tauri, so environments like node are available.
  write!(
    file,
    "#!/usr/bin/env sh
# This bootstraps the environment for Tauri, so environments are available.

if [ -e ~/.bash_profile ]
then 
  . ~/.bash_profile
fi
if [ -e ~/.zprofile ]
then 
  . ~/.zprofile
fi
if [ -e ~/.profile ]
then 
  . ~/.profile
fi
if [ -e ~/.bashrc ]
then 
  . ~/.bashrc
fi

if [ -e ~/.zshrc ]
then 
  . ~/.zshrc
fi

if pidof \"__bootstrapper\" >/dev/null; then
    exit 0
else
    exec \"`dirname \\\"$0\\\"`/{}\" $@ & disown
fi
exit 0",
    settings.bundle_name()
  )?;
  file.flush()?;

  // We have to make the __bootstrapper executable, or the bundle will not work
  Command::new("chmod")
    .arg("+x")
    .arg("__bootstrapper")
    .current_dir(&bundle_dir.join("MacOS/"))
    .stdout(Stdio::piped())
    .stderr(Stdio::piped())
    .spawn()?;

  Ok(())
}
// Creates the bootstrap script file.
Creates the bootstrap script file.
Creates the bootstrap script file .
fn create_bootstrapper(bundle_dir: &Path, settings: &Settings) -> crate::Result<()> {
  let file = &mut common::create_file(&bundle_dir.join("MacOS/__bootstrapper"))?;
  // Create a shell script to bootstrap the  $PATH for Tauri, so environments like node are available.
  write!(
    file,
    "#!/usr/bin/env sh
# This bootstraps the environment for Tauri, so environments are available.
if [ -e ~/.bash_profile ]
then 
  . ~/.bash_profile
fi
if [ -e ~/.zprofile ]
then 
  . ~/.zprofile
fi
if [ -e ~/.profile ]
then 
  . ~/.profile
fi
if [ -e ~/.bashrc ]
then 
  . ~/.bashrc
fi
if [ -e ~/.zshrc ]
then 
  . ~/.zshrc
fi
if pidof \"__bootstrapper\" >/dev/null; then
    exit 0
else
    exec \"`dirname \\\"$0\\\"`/{}\" $@ & disown
fi
exit 0",
    settings.bundle_name()
  )?;
  file.flush()?;
  // We have to make the __bootstrapper executable, or the bundle will not work
  Command::new("chmod")
    .arg("+x")
    .arg("__bootstrapper")
    .current_dir(&bundle_dir.join("MacOS/"))
    .stdout(Stdio::piped())
    .stderr(Stdio::piped())
    .spawn()?;
  Ok(())
}
fn create_bootstrapper ( bundle_dir : & Path , settings : & Settings ) -> crate :: Result < ( ) > { let file = & mut common :: create_file ( & bundle_dir . join ( " " ) ) ? ; // Create a shell script to bootstrap the  $PATH for Tauri, so environments like node are available. write ! ( file " \" \" \" \\ \" \\ \" \" " settings bundle_name ( ) ) ? ; file . flush ( ) ? ; // We have to make the __bootstrapper executable, or the bundle will not work Command :: new ( " " ) . arg ( " " ) . arg ( " " ) . current_dir ( & bundle_dir . join ( " " ) ) . stdout ( Stdio :: piped ( ) ) . stderr ( Stdio :: piped ( ) ) . spawn ( ) ? ; Ok ( ( ) ) }
Creates the bootstrap script file.
Creates the bootstrap script file .
bundle_dir
&Path
settings
&Settings
bundle_dir
&Path
settings
&Settings