Skip to content

Commit 5eb5f94

Browse files
authored
Fix Arch install scripts (#8497)
* Add missing dependencies for Arch Linux installation scripts: Previously compilation of oF and PG would fail otherwise. * comments * Update install_dependencies.sh
1 parent 7e2d57d commit 5eb5f94

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
pacman -S --needed mpg123 gst-plugins-ugly
1+
if [ $EUID != 0 ]; then
2+
echo "this script must be run as root"
3+
echo ""
4+
echo "usage:"
5+
echo "sudo ./install_codecs.sh"
6+
exit $exit_code
7+
exit 1
8+
fi
29

10+
pacman -S --needed mpg123 gst-plugins-ugly

scripts/linux/archlinux/install_dependencies.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
ROOT=$(cd $(dirname $0); pwd -P)
1313

14-
pacman -S --needed make pkgconf gcc openal glew freeglut freeimage gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav opencv libxcursor assimp glfw-x11 uriparser curl pugixml rtaudio poco brotli
14+
pacman -S --needed make pkgconf gcc openal glm glew freeglut gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav opencv libxcursor assimp glfw-x11 uriparser curl pugixml rtaudio poco brotli
1515

1616
exit_code=$?
1717
if [ $exit_code != 0 ]; then
@@ -31,3 +31,26 @@ else
3131
sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv\s/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4 /g' "$addons_dir/ofxOpenCv/addon_config.mk"
3232
sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv$/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4/g' "$addons_dir/ofxOpenCv/addon_config.mk"
3333
fi
34+
35+
# freeimage has been dropped from Arch main rep's so we need to install it manually with yay, paru or makepkg -si
36+
if command -v paru &> /dev/null; then
37+
AUR_HELPER_INTALL_CMD="paru -S --noconfirm freeimage"
38+
echo "Installing freeimage from AUR using paru"
39+
elif command -v yay &> /dev/null; then
40+
AUR_HELPER_INTALL_CMD="yay -S --noconfirm freeimage"
41+
echo "Installing freeimage from AUR using yay"
42+
else
43+
echo "use makepkg -si to install freeimage from AUR: https://aur.archlinux.org/packages/freeimage"
44+
exit 1
45+
fi
46+
47+
sudo -u $(logname) bash -c "$AUR_HELPER_INTALL_CMD"
48+
exit_code=$?
49+
50+
if [ $exit_code != 0 ]; then
51+
echo "error installing freeimage from AUR"
52+
exit 1
53+
fi
54+
55+
echo "all dependencies installed successfully!"
56+

0 commit comments

Comments
 (0)