#!/bin/sh

launchdir=$(dirname "$0")
copyattr -d "$launchdir/PDF Writer" "$HOME/config/add-ons/Print/PDF Writer"
# copyattr -d "$launchdir/libpdf.so" "$HOME/config/lib/libpdf.so"

mkdir /boot/home/config/settings/PDF\ Writer
cd $launchdir
cp encoding/* $HOME/config/settings/PDF\ Writer/

mkdir /boot/home/config/settings/PDF\ Writer/bookmarks
cp bookmarks/* /boot/home/config/settings/PDF\ Writer/bookmarks

mkdir /boot/home/config/settings/PDF\ Writer/xrefs
cp xrefs/* /boot/home/config/settings/PDF\ Writer/xrefs

# restart print_server
/boot/beos/system/servers/print_server

alert --info "PDF Writer driver is installed"
