Skip to content

Instantly share code, notes, and snippets.

@oxr463
Last active March 30, 2021 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxr463/dce55b2a7e364f42ebb92891dc31ef7e to your computer and use it in GitHub Desktop.
Save oxr463/dce55b2a7e364f42ebb92891dc31ef7e to your computer and use it in GitHub Desktop.
Installing Spriter r10 on Ubuntu 20.04 LTS

Installing Spriter r10 on Ubuntu 20.04 LTS

Instructions

# Ensure the script is executable.
chmod +x install.sh
# Run installer script
./install.sh

License

SPDX-License-Identifier: MIT

#!/bin/sh
# Install Spriter r10 on Ubuntu 20.04 LTS
# SPDX-License-Identifier: MIT
set -eu
# Install to the current working directory
INSTALL_DIR="$(pwd)"
# Directory inside the Spriter archive
SPRITER_DIR='SpriterR10(64)'
TMP="$(mktemp -d)"
# Download Spriter archive and missing dependencies
URL="https://brashmonkey.com/brashmonkey/spriter/linux/Spriter_free_R10.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2ubuntu0.2_amd64.deb"
cd "${TMP}"
for url in ${URL};
do
curl -O "${url}"
done
# Extract libraries from dependency packages
DEB="$(find . -name '*.deb')"
for deb in ${DEB};
do
DEB_DIR="$(echo ${deb} | sed 's/_amd64\.deb//g')"
mkdir "${DEB_DIR}"
cd "${DEB_DIR}"
cp "../${deb}" .
ar x *.deb
tar xf data.tar.xz
cd ..
done
# Remove dangling symlinks
find . -xtype l -exec rm {} \;
# Extract Spriter
tar xf Spriter_free_R10.tar.gz
# Copy dependency libraries to Spriter directory
cd "${SPRITER_DIR}"
find .. -name "*.so*" -exec cp -n "{}" . \;
# Copy Spriter directory to working directory
cd ..
cp -R "${SPRITER_DIR}" "${INSTALL_DIR}"
# Clean up temporary files
rm -rf "${TMP}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment