Skip to content

Commit

Permalink
move animations under /usr/lib by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Vilchanskyi committed Mar 13, 2017
1 parent 7a13207 commit f347e60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions quickinstall
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SRCDIR="src"
BINDIR="bin"
[[ "$OSTYPE" == "darwin"* ]] && BINDIR="ckb.app"
# This script respects the PREFIX variable on Linux (always /Applications on OSX)
[[ $PREFIX == "" ]] && PREFIX="/usr/bin"
[[ $PREFIX == "" ]] && PREFIX="/usr"
[[ "$OSTYPE" == "darwin"* ]] && PREFIX="/Applications"

tab=$'\t'
Expand Down Expand Up @@ -125,22 +125,24 @@ else
# Linux
newtmp
# Install apps
sudo mkdir -p "$PREFIX"
sudo mkdir -p "$PREFIX/bin"
sudo mkdir -p "$PREFIX/lib"
checkfail $?
sudo install bin/ckb "$PREFIX"/ckb 2>"$TMPFILE"
sudo install bin/ckb "$PREFIX/bin/ckb" 2>"$TMPFILE"
checkfail $?
sudo install bin/ckb-daemon "$PREFIX"/ckb-daemon 2>"$TMPFILE"
sudo install bin/ckb-daemon "$PREFIX/bin/ckb-daemon" 2>"$TMPFILE"
checkfail $?
sudo mkdir -p "$PREFIX"/ckb-animations 2>"$TMPFILE"
sudo mkdir -p "$PREFIX/lib/ckb-animations" 2>"$TMPFILE"
checkfail $?
sudo install bin/ckb-animations/* "$PREFIX"/ckb-animations 2>"$TMPFILE"
sudo install bin/ckb-animations/* "$PREFIX/lib/ckb-animations" 2>"$TMPFILE"
checkfail $?
# Install icon and .desktop
sudo xdg-icon-resource install --novendor --size 512 usr/ckb.png 2>"$TMPFILE"
checkfail $?
sudo xdg-desktop-menu install --novendor usr/ckb.desktop 2>"$TMPFILE"
checkfail $?
echo "Installed in $PREFIX"
echo "Binaries were installed under $PREFIX/bin"
echo "Animations were installed under $PREFIX/lib/ckb-animations"
fi

# Offer to run as a system service
Expand Down
2 changes: 1 addition & 1 deletion src/ckb/animscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QString AnimScript::path(){
#ifdef __APPLE__
return QDir(QApplication::applicationDirPath() + "/../Resources").absoluteFilePath("ckb-animations");
#else
return QDir(QApplication::applicationDirPath()).absoluteFilePath("ckb-animations");
return QDir("/usr/lib").absoluteFilePath("ckb-animations");
#endif
}

Expand Down

0 comments on commit f347e60

Please sign in to comment.