summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2023-09-06 22:25:31 +0300
committerStelios Tsampas2023-09-06 22:25:51 +0300
commit2ffa91b760da02741c0bf0cca14dbd0c01a7fc8b (patch)
tree9c7f69915b9a8fd36277184c0aa07d11e0c2dd0b
parentbff337ad15121fe7213d0e8323ec13ad4c66f38f (diff)
downloadaur-2ffa91b760da02741c0bf0cca14dbd0c01a7fc8b.tar.gz
[rbdoom-3-bfg] Fail if mergerfs is not found in launcher script
-rw-r--r--PKGBUILD8
-rw-r--r--PKGBUILD.live6
-rw-r--r--rbdoom-3-bfg-launcher31
-rw-r--r--rbdoom-3-bfg-launcher.desktop1
-rw-r--r--rbdoom-3-bfg.desktop1
5 files changed, 30 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bdcca8da4805..9e64bf09c5fb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=rbdoom-3-bfg
_srctag=1.5.1
pkgver=${_srctag//-/.}
-pkgrel=3
+pkgrel=4
pkgdesc="Doom 3 BFG Edition with modern engine features like PBR, Baked Global Illumination, Soft Shadows"
arch=('x86_64')
url="https://github.com/RobertBeckebans/RBDOOM-3-BFG"
@@ -40,9 +40,9 @@ source=(
)
sha256sums=('SKIP'
'0fb6a3bb9b47cad65d5012ba20dc9de3b1487f4ac1908ee847e6087511b7f09e'
- 'cba5d97ebf99e231623ba0c5b55e7ba0b25d0a2a8e319020236b5b52d1e89774'
- '0c32340a3cd348cfa73a3198fc8f93b793a918dda35b3d04036180c81a65dd5b'
- '83bc72d3565a79c69a1f9313ab66a61ce0982801548e318fd1bacd4a2c64be79')
+ 'f317d503d30ecc6e0a70e353cb020d2ea78ecb05d8d2e0250f39cfd8a4fe16a5'
+ 'a7b8d1631f5b66bdba9b76cf0700122b2d6eaa5d670e33675e300103b7a379e2'
+ 'c083d028b5dd6f7c0d13d8d3f7a4b73a0d57d414890fea454eecbbf2dbcdac6d')
prepare() {
cd RBDOOM-3-BFG
diff --git a/PKGBUILD.live b/PKGBUILD.live
index bc3bec0d7451..5d075314f466 100644
--- a/PKGBUILD.live
+++ b/PKGBUILD.live
@@ -39,9 +39,9 @@ source=(
)
sha256sums=('SKIP'
'0fb6a3bb9b47cad65d5012ba20dc9de3b1487f4ac1908ee847e6087511b7f09e'
- 'cba5d97ebf99e231623ba0c5b55e7ba0b25d0a2a8e319020236b5b52d1e89774'
- '0c32340a3cd348cfa73a3198fc8f93b793a918dda35b3d04036180c81a65dd5b'
- '83bc72d3565a79c69a1f9313ab66a61ce0982801548e318fd1bacd4a2c64be79')
+ 'f317d503d30ecc6e0a70e353cb020d2ea78ecb05d8d2e0250f39cfd8a4fe16a5'
+ 'a7b8d1631f5b66bdba9b76cf0700122b2d6eaa5d670e33675e300103b7a379e2'
+ 'c083d028b5dd6f7c0d13d8d3f7a4b73a0d57d414890fea454eecbbf2dbcdac6d')
pkgver() {
cd RBDOOM-3-BFG
diff --git a/rbdoom-3-bfg-launcher b/rbdoom-3-bfg-launcher
index e933fd4bc345..749ad1119730 100644
--- a/rbdoom-3-bfg-launcher
+++ b/rbdoom-3-bfg-launcher
@@ -1,18 +1,29 @@
#!/usr/bin/bash
+base_name="$(basename "$0")"
path_name=rbdoom3bfg-launcher
conf_dir="${XDG_CONFIG_HOME:-$HOME/.config}"/"$path_name"
data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"/"$path_name"
-if [ -f /usr/bin/yad ]; then
- gui="/usr/bin/yad"
+if [ -f "$(which yad)" ]; then
+ gui="$(which yad) --splash --class=$base_name --name=$base_name --title=$base_name"
file_select="$gui --file --directory"
fi
-if [ -f /usr/bin/zenity ]; then
- gui="/usr/bin/zenity"
+if [ -f "$(which zenity)" ]; then
+ gui="$(which zenity) --class=$base_name --name=$base_name --title=$base_name"
file_select="$gui --file-selection --directory"
fi
+if [ ! -f "$(which mergerfs)" ]; then
+ error_text="mergerfs is not installed."
+ if [ -z "$gui" ]; then
+ printf "%s: %s" "$(basename "$0")" "$error_text"
+ else
+ $gui --error --text="$error_text"
+ fi
+ exit 1
+fi
+
if [ ! -d "$conf_dir" ]; then
mkdir -p "$conf_dir"
fi
@@ -31,15 +42,16 @@ fi
basepath=""
if [ -z "$install_dir" ]; then
if [ -z "$gui" ]; then
- printf "%s: install_dir is not set.\n\n" "$(basename "$0")"
+ printf "%s: install_dir is not set." "$base_name"
+ printf "\n\n"
printf "\tThe default install locations will be searched.\n"
- printf "\tIf RBDoom3BFG fails to start, specify the Doom 3 BFG \n"
+ printf "\tIf RBDoom3BFG fails to start, specify the Doom 3 BFG\n"
printf "\tinstallation directory in %s.\n\n" "$conf"
else
info_text="install_dir is not set in the configuration file \n$conf\n"
info_text+="Without it, the default locations will be searched for game files.\n"
info_text+="\nDo you want to set it now?\n"
- if "$gui" --question --text="$info_text"; then
+ if $gui --question --text="$info_text"; then
install_dir="$($file_select)"
if [ -n "$install_dir" ]; then
echo "install_dir=\"$install_dir\"" >> "$conf"
@@ -60,4 +72,7 @@ fi
# what they are doing, they don't need the launcher anyways
RBDoom3BFG +set in_tty 0 $basepath "$@"
-umount "$data_dir"
+if mountpoint -q "$data_dir"; then
+ umount "$data_dir"
+fi
+exit 0
diff --git a/rbdoom-3-bfg-launcher.desktop b/rbdoom-3-bfg-launcher.desktop
index f9f88884e62c..222a53ed22c0 100644
--- a/rbdoom-3-bfg-launcher.desktop
+++ b/rbdoom-3-bfg-launcher.desktop
@@ -8,4 +8,3 @@ Terminal=false
Type=Application
Comment=Doom 3 BFG Edition with modern engine features
Categories=Game;ActionGame;
-Path=
diff --git a/rbdoom-3-bfg.desktop b/rbdoom-3-bfg.desktop
index da2845fb1e8b..ca21660edebd 100644
--- a/rbdoom-3-bfg.desktop
+++ b/rbdoom-3-bfg.desktop
@@ -8,4 +8,3 @@ Terminal=false
Type=Application
Comment=Doom 3 BFG Edition with modern engine features
Categories=Game;ActionGame;
-Path=