davinci-resolve.sh 2.01 KB
Newer Older
1
#!/bin/sh
2

3 4 5 6 7 8 9 10
TAR="$1"
RETURNTARNAME="$2"
PRODUCT=davinci-resolve

. $(dirname $0)/common.sh

# DaVinci_Resolve_18.6.5_Linux.run
BASENAME=$(basename $1 .run)
11
VERSION=$(echo $BASENAME | sed -e 's|DaVinci_Resolve_||' -e 's|_Linux||')
12 13 14 15 16 17 18
mkdir -p opt/davinci-resolve

$1 --appimage-extract &> /dev/null

mv -v squashfs-root/* opt/davinci-resolve/

install -Dm0644 opt/davinci-resolve/share/default-config.dat -t opt/$PRODUCT/configs
19
install -Dm0644 opt/davinci-resolve/share/log-conf.xml -t opt/$PRODUCT/configs
20 21 22 23 24 25 26 27 28 29 30 31 32
install -Dm0644 opt/davinci-resolve/share/default_cm_config.bin -t opt/$PRODUCT/DolbyVision

install -Dm0644 opt/davinci-resolve/share/*.desktop -t usr/share/applications
install -Dm0644 opt/davinci-resolve/share/DaVinciResolve.directory -t usr/share/desktop-directories
install -Dm0644 opt/davinci-resolve/share/DaVinciResolve.menu -t etc/xdg/menus
install -Dm0644 opt/davinci-resolve/graphics/DV_Resolve.png -t usr/share/icons/hicolor/64x64/apps
install -Dm0644 opt/davinci-resolve/graphics/DV_ResolveProj.png -t usr/share/icons/hicolor/64x64/apps
install -Dm0644 opt/davinci-resolve/share/resolve.xml -t usr/share/mime/packages

install -Dm0644 opt/davinci-resolve/share/etc/udev/rules.d/99-BlackmagicDevices.rules -t usr/lib/udev/rules.d
install -Dm0644 opt/davinci-resolve/share/etc/udev/rules.d/99-ResolveKeyboardHID.rules -t usr/lib/udev/rules.d
# install -Dm0644 opt/davinci-resolve/share/etc/udev/rules.d/99-DavinciPanel.rules -t usr/lib/udev/rules.d

33 34 35 36
echo "StartupWMClass=resolve" >> usr/share/DaVinciResolve.desktop

subst "s|RESOLVE_INSTALL_LOCATION|/opt/davinci-resolve|" usr/share/applications/*.desktop 
subst "s|RESOLVE_INSTALL_LOCATION|/opt/davinci-resolve|" usr/share/desktop-directories/*
37
# fix for libpango.so error too
38

39 40 41
rm -v opt/davinci-resolve/libs/libglib-2.0.so*
rm -v opt/davinci-resolve/libs/libgio-2.0.so*
rm -v opt/davinci-resolve/libs/libgmodule-2.0.so*
42 43 44 45 46 47 48
# ln -s /usr/lib/libglib-2.0.so.0 opt/davinci-resolve/libs/libglib-2.0.so.0

PKGNAME=$PRODUCT-$VERSION

erc pack $PKGNAME.tar opt usr etc || fatal

return_tar $PKGNAME.tar