diff options
Diffstat (limited to 'bin/package-ooo')
-rwxr-xr-x | bin/package-ooo | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/bin/package-ooo b/bin/package-ooo index 42bdb544a..dd83ba78a 100755 --- a/bin/package-ooo +++ b/bin/package-ooo @@ -52,6 +52,33 @@ create_simple_wrapper() cat <<EOT >$2 #!/bin/sh +# Keep in ~sync with ooo-wrapper + +SystemInstallDir="$OOINSTBASE" + +if [ -n "\$GNOME_DESKTOP_SESSION_ID" -a -d "\$SystemInstallDir/program/resource.gnome" ]; then + icon_set="gnome" +elif [ -n "\$KDE_FULL_SESSION" -a -d "\$SystemInstallDir/program/resource.kde" ]; then + icon_set="kde" +fi + +if [ -z "\$icon_set" ]; then + if [ -d "\$SystemInstallDir/program/resource.default" ]; then + icon_set="default" + elif [ -d "\$SystemInstallDir/program/resource.kde" ]; then + icon_set="kde" + elif [ -d "\$SystemInstallDir/program/resource.gnome" ]; then + icon_set="gnome" + else + icon_set="default" + fi +fi + +if [ -d "\$SystemInstallDir/program/resource.\$icon_set" ]; then + OOO_PREFERRED_RESOURCE_PATH="\$SystemInstallDir/program/resource.\$icon_set" + export OOO_PREFERRED_RESOURCE_PATH +fi + exec "$1" "\$@" EOT chmod 755 $2 @@ -100,7 +127,7 @@ if test "z$VENDORNAME" = "zRedHat" ; then mkdir -p $PREFIX/share/applications for i in openoffice-printeradmin openoffice-setup redhat-drawing \ redhat-math redhat-presentations redhat-word-processor redhat-spreadsheet; do - cp -f /usr/share/desktop-menu-patches/$i.desktop $PREFIX/share/applications/$i.desktop + ln -sf /usr/share/desktop-menu-patches/$i.desktop $PREFIX/share/applications/$i.desktop echo "StartupNotify=true" >> $PREFIX/share/applications/$i.desktop done |