From 50e48664e102c8188935d66dbbd6f2249ad48ef6 Mon Sep 17 00:00:00 2001 From: Manuel Dewald Date: Thu, 31 Jan 2019 09:00:06 +0100 Subject: [PATCH] add package script and install howto --- INSTALL.md | 40 +++++++++++++++++++++++++++++++++ sbin/package.sh | 32 ++++++++++++++++++++++++++ run_once.sh => sbin/run_once.sh | 0 3 files changed, 72 insertions(+) create mode 100644 INSTALL.md create mode 100755 sbin/package.sh rename run_once.sh => sbin/run_once.sh (100%) diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..c63c001 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,40 @@ +# Installing slide + +## Install dependencies + +This project depends on the following dynamically linked libraries: + +* qt5 +* libexif + +### OSX + +``` +brew install qt libexif +``` + +### Raspbian Stretch + +``` +brew install qt5 libexif12 +``` + +## Extract binaries + +``` +tar xf slide__.tar.gz +``` + +## Move binary to executable folder + +### OSX + +``` +mv slide_/slide.app/Contents/MacOS/slide /usr/bin/ +``` + +### Linux + +``` +mv slide_/slide /usr/bin/ +``` diff --git a/sbin/package.sh b/sbin/package.sh new file mode 100755 index 0000000..f5b1075 --- /dev/null +++ b/sbin/package.sh @@ -0,0 +1,32 @@ +#!/bin/bash + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +ARCH=$1 +VERSION=$2 + +set -euo pipefail + +if [[ "$ARCH" == "" ]]; then + echo "missing argument target_architecture" + exit 1 +fi +if [[ "$VERSION" == "" ]]; then + echo "missing argument version" + exit 1 +fi + +BINARY=slide +if [[ "$ARCH" == "osx" ]]; then + BINARY=slide.app +fi + +cd "$DIR/.." +mkdir -p make/slide_$VERSION +cd make +qmake ../src/slide.pro +make +cp -r "$BINARY" "slide_$VERSION/" +cp "../INSTALL.md" "slide_$VERSION/" +cp "../LICENSE" "slide_$VERSION/" +tar cfz slide_${ARCH}_$VERSION.tar.gz "slide_$VERSION" diff --git a/run_once.sh b/sbin/run_once.sh similarity index 100% rename from run_once.sh rename to sbin/run_once.sh