diff --git a/installJRMC b/installJRMC index e2cfa9f..b5e2e2d 100755 --- a/installJRMC +++ b/installJRMC @@ -575,6 +575,19 @@ install_external_repos() { install_package --no-install-check \ "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$VERSION_ID.noarch.rpm" fi + # Install freeworld mesa packages for better hardware acceleration + for pkg in mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers; do + freeworld_pkg="${pkg}-freeworld" + if ! "${PKG_QUERY[@]}" "$freeworld_pkg" &>/dev/null; then + if "${PKG_QUERY[@]}" "$pkg" &>/dev/null; then + if ! execute sudo dnf swap -y "$pkg" "$freeworld_pkg"; then + err "Package swap failed for $pkg!" + fi + else + "${PKG_INSTALL[@]}" "$freeworld_pkg" + fi + fi + done ;; suse) : # TODO may be needed if X11_XOrg is made unavailable in default repos # if ! zypper repos | grep -q "X11_XOrg"; then @@ -637,25 +650,6 @@ install_legacy_repo() { fi } -# @description Installs mesa-va-drivers-freeworld on Fedora -install_mesa_freeworld() { - debug "${FUNCNAME[0]}()" - local pkg freeworld_pkg - for pkg in mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers; do - freeworld_pkg="${pkg}-freeworld" - if ! "${PKG_QUERY[@]}" "$freeworld_pkg" &>/dev/null; then - if "${PKG_QUERY[@]}" "$pkg" &>/dev/null; then - if ! execute sudo dnf swap -y "$pkg" "$freeworld_pkg"; then - err "Package swap failed for $pkg!" - fi - else - "${PKG_INSTALL[@]}" "$freeworld_pkg" - fi - fi - done - -} - # @description Acquires the source DEB package from JRiver acquire_deb() { debug "${FUNCNAME[0]}()" @@ -686,7 +680,7 @@ acquire_deb() { fi fi - # Download the deb file using the containerized package manager + # Download the deb file using containerized package manager # shellcheck disable=SC2016 if ! { # Download to /tmp to silence _apt permission warnings @@ -1559,7 +1553,7 @@ service_jriver-createrepo() { "${ENABLE[@]}" "$TIMER_NAME" } -# @description Detects if MC is installed on btrfs and disables CoW +# @description Fixes $HOME/.jriver directory permissions fix_dotjriver_permissions() { debug "${FUNCNAME[0]}()" @@ -1797,11 +1791,6 @@ main() { gpgcheck = 0 name = JRiver Media Center hosted by BryanC EOF - case $ID in - fedora) - install_mesa_freeworld - ;; - esac ;; debian|ubuntu) local major_version="${VERSION_ID%%.*}" @@ -1901,8 +1890,7 @@ main() { # Install MC package case $ID in - fedora) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM"; install_mesa_freeworld ;; - centos|mandriva|suse) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM" ;; + fedora|centos|mandriva|suse) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM" ;; debian|ubuntu) install_mc_deb "$@" ;; arch) install_mc_arch ;; unknown) install_mc_generic ;;