Skip to content
Snippets Groups Projects
sflphone.in 1.05 KiB
Newer Older
yanmorin's avatar
yanmorin committed
#!/bin/sh
# SFLphone bin launcher script v 3
# Setup ld's environment

prefix=@prefix@
exec_prefix=@exec_prefix@

LD_LIBRARY_PATH=@libdir@:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

message="Warning, you probably did not extract the archive in the / directory,
you must edit this script ($0) and change SFLPHONE_DIR to the correct location.
yanmorin's avatar
 
yanmorin committed
@libexecdir@ must contain the provided libraries."
if [ ! -d ${SFLPHONE_DIR} ]; then
  echo $message
  exit 1
yanmorin's avatar
yanmorin committed
else
yanmorin's avatar
 
yanmorin committed
  if [ ! -d @libexecdir@ ]; then
    echo $message
    exit 1
  fi
yanmorin's avatar
yanmorin committed
fi

# Let's try to go..
PATH=@libexecdir@:${PATH}
yanmorin's avatar
 
yanmorin committed
binaryqtname=sflphone-qt
binaryqt=@libexecdir@/${binaryqtname}
binarycliname=sflphone-cli
binarycli=@libexecdir@/${binarycliname}
if [ "$1" != "--text" ]; then
  if [ -x ${binaryqt} ]; then
    exec $binaryqt
  else
    echo "Could not find the ${binaryqtname} executable in @libexecdir@ !"
    exit 1
  fi
else 
  if [ -x ${binarycli} ]; then
    SFLPHONE_CORE_DIR=@libexecdir@ exec $binarycli
  else
    echo "Could not find the ${binarycliname} executable in @libexecdir@ !"
    exit 1
  fi
yanmorin's avatar
yanmorin committed
fi

# EOF