File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1111
1212ROOT=$( 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
1616exit_code=$?
1717if [ $exit_code != 0 ]; then
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"
3333fi
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+
You can’t perform that action at this time.
0 commit comments