You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
3.6 KiB
Bash

#!/bin/bash
# Fanta <fanta@56k.es>
# Script to compile the most recent dosbox-x version on diferent GNU+Linux distros.
# Script para compilar la versión más reciente de dosbox-x en diferentes distros GNU+Linux
d="/tmp/dosbox-x"
if [ "$(whoami)" != "root" ]; then
echo "[+] Checking root user"
echo -e "\e[31m\e[1m[NOT OK]\e[0m Run it with root please" && exit
fi
# Arch Linux
if [ -f "/etc/arch-release" ]; then
pacman -Syu --noconfirm ; pacman -S git base-devel autoconf sdl sdl2 libpng automake gzip gcc ncurses opusfile alsa-lib sdl_net fluidsynth --noconfirm
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install; sleep 2; rm -rf $d
fi
# Debian 10
cat /etc/issue | grep "Debian GNU/Linux 10" 1>/dev/null ; if [ "$?" -ne 1 ]; then
apt update -y ; apt install automake git gcc g++ make libncurses-dev nasm libsdl-net1.2-dev libsdl2-net-dev libpcap-dev fluidsynth libfluidsynth-dev libavdevice58 libavformat-dev libavcodec-dev libavcodec-extra libavcodec-extra58 libswscale-dev libfreetype6-dev libxkbfile-dev libxrandr-dev -y
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install ; sleep 2; rm -rf $d
fi
# Debian 11
cat /etc/issue | grep "Debian GNU/Linux 11" 1>/dev/null ; if [ "$?" -ne 1 ]; then
apt update -y ; apt install automake git gcc g++ make libncurses-dev nasm libsdl-net1.2-dev libsdl2-net-dev libpcap-dev fluidsynth libfluidsynth-dev libavdevice58 libavformat-dev libavcodec-dev libavcodec-extra libavcodec-extra58 libswscale-dev libfreetype6-dev libxkbfile-dev libxrandr-dev -y
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install ; sleep 2; rm -rf $d
fi
# Debian 12
cat /etc/issue | grep "Debian GNU/Linux 12" 1>/dev/null ; if [ "$?" -ne 1 ]; then
apt update -y ; apt install automake git gcc g++ make libncurses-dev nasm libsdl-net1.2-dev libsdl2-net-dev libpcap-dev fluidsynth libfluidsynth-dev libavdevice59 libavformat-dev libavcodec-dev libavcodec-extra libavcodec-extra59 libswscale-dev libfreetype6-dev libxkbfile-dev libxrandr-dev -y
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install ; sleep 2; rm -rf $d
fi
# Ubuntu 20.04.4 LTS
cat /etc/issue | grep "Ubuntu 20.04.4 LTS" 1>/dev/null ; if [ "$?" -ne 1 ]; then
apt update -y ; apt install automake git gcc g++ make libncurses-dev nasm libsdl-net1.2-dev libsdl2-net-dev libpcap-dev fluidsynth libfluidsynth-dev libavdevice58 libavformat-dev libavcodec-dev libavcodec-extra libavcodec-extra58 libswscale-dev libfreetype6-dev libxkbfile-dev libxrandr-dev -y
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install ; rm -rf $d
fi
# Ubuntu 22.04.1 LTS
cat /etc/issue | grep "Ubuntu 22.04.1 LTS" 1>/dev/null ; if [ "$?" -ne 1 ]; then
apt update -y ; apt install automake git gcc g++ make libncurses-dev nasm libsdl-net1.2-dev libsdl2-net-dev libpcap-dev fluidsynth libfluidsynth-dev libavdevice58 libavformat-dev libavcodec-dev libavcodec-extra libavcodec-extra58 libswscale-dev libfreetype6-dev libxkbfile-dev libxrandr-dev -y
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
bash build-debug-sdl2 ; make install ; rm -rf $d
fi
# OpenSUSE Leap 15.4
cat /etc/os-release | grep -iE "openSUSE Leap 15.4" 1>/dev/null ; if [ "$?" -ne 1 ]; then
zypper refresh ; zypper in -y git gcc gcc-c++ make nasm libncurses* libSDL2_net* fluidsynth libpcap-devel automake ncurses-devel zlib-devel
git clone "https://github.com/joncampbell123/dosbox-x" $d ; cd $d
export LDFLAGS="-Wl,--copy-dt-needed-entries"
bash build-debug-sdl2 ; make install ; rm -rf $d
fi