diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kpresenter/scripts | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/scripts')
-rwxr-xr-x | kpresenter/scripts/automate_presentation.sh | 25 | ||||
-rwxr-xr-x | kpresenter/scripts/mkstandalone.sh | 91 |
2 files changed, 116 insertions, 0 deletions
diff --git a/kpresenter/scripts/automate_presentation.sh b/kpresenter/scripts/automate_presentation.sh new file mode 100755 index 00000000..1f91f641 --- /dev/null +++ b/kpresenter/scripts/automate_presentation.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# This script uses KPresenter's DCOP interface to automate a presentation +# Every 10 seconds, it goes to the next sequence or page (just as if +# 'space' was pressed) +# +# Idea from Christopher Molnar <[email protected]> +# Implementation by David Faure <[email protected]> using Matthias Ettrich dcop shell +# +# Open the presentation in kpresenter, then launch this script +# +appname=`dcop | grep -m 1 ^kpresenter` +#echo $appname + +viewname=`dcop $appname | grep ^View` +#echo $viewname + +dcop $appname $viewname screenStart + +sleep 5; + +while true; do + sleep 10; + dcop $appname $viewname screenNext +done diff --git a/kpresenter/scripts/mkstandalone.sh b/kpresenter/scripts/mkstandalone.sh new file mode 100755 index 00000000..ebd2fd8a --- /dev/null +++ b/kpresenter/scripts/mkstandalone.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# This script copies everything that is needed to run kpresenter on a +# computer where KDE isn't installed. +# Relies on kpresenter being installed on the local machine, in $KDEDIR +# +# The script copies everything into a directory. You just need to tar it up, +# transfer it (CD-ROM or via Internet), untar it, cd into it, +# and run the script "go.sh" with your presentation as argument. +# Debug output goes to kpresenter.out to avoid cluttering the terminal +# with our junk :-) Check it out in case of problems. +# +# (C) David Faure <[email protected]> + +# Pass output dir as argument +if [ $# -ne 1 ]; then + echo "Usage : $0 <outputdir>" +else + out=$1 +########### Data + mkdir -p $out + mkdir -p $out/share + mkdir -p $out/share/apps + cp -r $KDEDIR/share/apps/kpresenter $out/share/apps/ + cp -r $KDEDIR/share/apps/koffice $out/share/apps/ + cp -r $KDEDIR/share/apps/kstyle $out/share/apps/ + mkdir -p $out/share/config + cp $KDEDIR/share/config/kdebug.areas $out/share/config/ + cp ~/.kde/share/config/kdeglobals $out/share/config/ + cp ~/.kde/share/config/kpresenterrc $out/share/config/ + ### cp $KDEDIR/share/icons $out/share/ + cp -r $KDEDIR/share/toolbar $out/share/ + mkdir -p $out/share/servicetypes + cp $KDEDIR/share/servicetypes/kofficepart.desktop $out/share/servicetypes + mkdir -p $out/share/applnk + cp $KDEDIR/share/applnk/KOffice/kpresenter.desktop $out/share/applnk/ + +########### Libraries (warning, using Linux specific ldd !) + TMPFILE=/tmp/__kpresenter_ldd.tmp + mkdir -p $out/lib + ldd $KDEDIR/bin/kpresenter | sed -e 's/.*=> \([^ ]*\).*/\1/' > $TMPFILE + # Add style libs + echo $KDEDIR/lib/basicstyle.so >> $TMPFILE + echo $KDEDIR/lib/kstepstyle.so >> $TMPFILE + # Add image handler libs + echo $KDEDIR/lib/kimg_jpeg.so >> $TMPFILE + echo $KDEDIR/lib/kimg_tiff.so >> $TMPFILE + # Add libs for embedded parts here + + cat $TMPFILE | while read libfile; do + # ldd shows the fullpath to a link. + # Extract the directory from the fullpath + origdir=`dirname $libfile` + libfile=`basename $libfile` + while [ -L $origdir/$libfile ]; do + # Follow the symlink and create the same in $out/lib + pointsto=`readlink $origdir/$libfile` + echo "ln -s $out/$libfile $pointsto" + ln -s $pointsto $out/lib/$libfile + libfile=$pointsto; + done + # Copy the library itself + echo "cp $origdir/$libfile $out/lib" + cp $origdir/$libfile $out/lib + # Copy the .la file as well + lafile=`echo $libfile | sed -e 's/\.so.*/\.la/'` + if [ -f $origdir/$lafile ]; then cp $origdir/$lafile $out/lib ; fi + done + rm -f $TMPFILE + +########### Binaries + mkdir -p $out/bin + cp $KDEDIR/bin/kpresenter $out/bin/ + cp $KDEDIR/bin/dcopserver $out/bin/ + # Take kded as well - we could copy the ksycoca file but we would have + # to install it in ~/.kde ... + cp $KDEDIR/bin/kded $out/bin/ + +########### Startup script + echo '#!/bin/sh' > $out/go.sh + echo 'export KDEDIR=`pwd`' >> $out/go.sh + echo 'export LD_LIBRARY_PATH=$KDEDIR/lib' >> $out/go.sh + echo 'mkdir -p ~/.kde 2>/dev/null' >> $out/go.sh + echo 'mkdir -p ~/.kde/share 2>/dev/null' >> $out/go.sh + echo 'mkdir -p ~/.kde/share/config 2>/dev/null' >> $out/go.sh + echo 'cp share/config/* ~/.kde/share/config' >> $out/go.sh + echo 'bin/dcopserver 2>/dev/null' >> $out/go.sh + echo 'sleep 1 ; bin/kded 2>/dev/null' >> $out/go.sh + echo 'sleep 1 ; bin/kpresenter $* 1>/dev/null 2>kpresenter.out &' >> $out/go.sh + chmod u+x $out/go.sh +fi + |