10 changed files with 383 additions and 57 deletions
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
</head> |
||||
<body> |
||||
<div style="font-family: Helvetica; padding-left: 10px;" align="left"> |
||||
<h3>Zrythm</h3> |
||||
<p style="color: #020202; font-size: 11px;">Thank you for installing Zrythm..</p> |
||||
<h5>Run Zrythm</h5> |
||||
<p style="color: #020202; font-size: 11px;">Open a new terminal and run the following command to run Zrythm:</p> |
||||
<code style="color: #c6a72b; font-size: 11px;"> $ <span style="color: #abb0b0">Zrythm-@ZRYTHM_PRODUCT_VERSION@</span></code> |
||||
</div> |
||||
<div style="font-family: Helvetica; padding-left: 10px;" align="left"> |
||||
<br/> |
||||
<h5>Resources</h5> |
||||
<p style="color: #020202; font-size: 11px;">Go through following links for additional information.</p> |
||||
<ul> |
||||
<li><a href="https://manual.zrythm.org/en/" style="font-size: 11px;">Documentation</a></li> |
||||
</ul> |
||||
</div> |
||||
<div style="font-family: Helvetica; padding-left: 10px;" align="left"> |
||||
<br/> |
||||
<h5>Uninstall Zrythm</h5> |
||||
<p style="color: #020202; font-size: 11px;">Run the following command to uninstall Zrythm. <br /> |
||||
<code style="color: #c6a72b; font-size: 11px;"><br /> $ <span style="color: #abb0b0">sudo bash /Library/Zrythm/@ZRYTHM_PRODUCT_VERSION@/uninstall.sh</span></code> |
||||
</p> |
||||
</div> |
||||
<div style="font-family: Helvetica; padding-left: 10px;" align="left"><br /> |
||||
<p style="color: #abb0b0; font-size: 10px;">Copyright © 2021 The Zrythm contributors.<br/>Zrythm and the Zrythm logo are registered trademarks of Alexandros Theodotou in the United Kingdom.</p> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash |
||||
|
||||
#Generate application uninstallers for macOS. |
||||
|
||||
#Parameters |
||||
DATE=`date +%Y-%m-%d` |
||||
TIME=`date +%H:%M:%S` |
||||
LOG_PREFIX="[$DATE $TIME]" |
||||
|
||||
#Functions |
||||
log_info() { |
||||
echo "${LOG_PREFIX}[INFO]" $1 |
||||
} |
||||
|
||||
log_warn() { |
||||
echo "${LOG_PREFIX}[WARN]" $1 |
||||
} |
||||
|
||||
log_error() { |
||||
echo "${LOG_PREFIX}[ERROR]" $1 |
||||
} |
||||
|
||||
#Check running user |
||||
if (( $EUID != 0 )); then |
||||
echo "Please run as root." |
||||
exit |
||||
fi |
||||
|
||||
echo "Welcome to Application Uninstaller" |
||||
echo "The following packages will be REMOVED:" |
||||
echo " Zrythm-@ZRYTHM_PRODUCT_VERSION@" |
||||
while true; do |
||||
read -p "Do you wish to continue [Y/n]?" answer |
||||
[[ $answer == "y" || $answer == "Y" || $answer == "" ]] && break |
||||
[[ $answer == "n" || $answer == "N" ]] && exit 0 |
||||
echo "Please answer with 'y' or 'n'" |
||||
done |
||||
|
||||
|
||||
#Need to replace these with install preparation script |
||||
VERSION=@ZRYTHM_PRODUCT_VERSION@ |
||||
PRODUCT=Zrythm |
||||
|
||||
echo "Application uninstalling process started" |
||||
# remove link to shorcut file |
||||
find "/usr/local/bin/" -name "zrythm-@ZRYTHM_PRODUCT_VERSION@" | xargs rm |
||||
if [ $? -eq 0 ] |
||||
then |
||||
echo "[1/5] [DONE] Successfully deleted shortcut links" |
||||
else |
||||
echo "[1/5] [ERROR] Could not delete shortcut links" >&2 |
||||
fi |
||||
|
||||
# remove bundled Lv2 plugins |
||||
find "/Library/Audio/Plug-Ins/LV2" -name "Zrythm-$VERSION*" | \ |
||||
xargs rm -rf |
||||
if [ $? -eq 0 ] |
||||
then |
||||
echo "[2/5] [DONE] Successfully deleted bundled plugins" |
||||
else |
||||
echo "[2/5] [ERROR] Could not delete bundled plugins" >&2 |
||||
fi |
||||
|
||||
# remove .app |
||||
find "/Applications" -name "Zrythm-$VERSION.app" | \ |
||||
xargs rm -rf |
||||
if [ $? -eq 0 ] |
||||
then |
||||
echo "[3/5] [DONE] Successfully deleted Zrythm.app" |
||||
else |
||||
echo "[3/5] [ERROR] Could not delete Zrythm.app" >&2 |
||||
fi |
||||
|
||||
#forget from pkgutil |
||||
pkgutil --forget "org.$PRODUCT.$VERSION" > /dev/null 2>&1 |
||||
if [ $? -eq 0 ] |
||||
then |
||||
echo "[4/5] [DONE] Successfully deleted application informations" |
||||
else |
||||
echo "[4/5] [ERROR] Could not delete application informations" >&2 |
||||
fi |
||||
|
||||
#remove application source distribution |
||||
[ -e "/Library/${PRODUCT}/${VERSION}" ] && rm -rf "/Library/${PRODUCT}/${VERSION}" |
||||
if [ $? -eq 0 ] |
||||
then |
||||
echo "[5/5] [DONE] Successfully deleted application" |
||||
else |
||||
echo "[5/5] [ERROR] Could not delete application" >&2 |
||||
fi |
||||
|
||||
echo "Application uninstall process finished" |
||||
exit 0 |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
APPNAME=${2:-$(basename "${1}" '.sh')}; |
||||
DIR="${APPNAME}.app/Contents/MacOS"; |
||||
|
||||
if [ -a "${APPNAME}.app" ]; then |
||||
echo "${PWD}/${APPNAME}.app already exists"; |
||||
exit 1; |
||||
fi; |
||||
|
||||
mkdir -p "${DIR}"; |
||||
cp "${1}" "${DIR}/${APPNAME}"; |
||||
chmod +x "${DIR}/${APPNAME}"; |
||||
|
||||
echo "${PWD}/$APPNAME.app"; |
Loading…
Reference in new issue