diff --git a/README.md b/README.md index 0300e14..0d80df6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ -# compile-Dosbox-x +Bash script to compile the most recent dosbox-x version on diferents GNU+Linux distros. -compile dosbox-x script \ No newline at end of file +This script works on these distributions: + +* OpenSuse 15.4 Leap +* Debian 10 +* Debian 11 +* Arch Linux +* Ubuntu 20.04 + +dosbox-x diff --git a/compileDosBox-x.sh b/compileDosBox-x.sh new file mode 100755 index 0000000..4b6d238 --- /dev/null +++ b/compileDosBox-x.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Fanta +# Script to compile the most recent dosbox-x version on diferent GNU+Linux distros. +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 + +# 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 + +# 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 diff --git a/imgs/dosbox01.png b/imgs/dosbox01.png new file mode 100644 index 0000000..9b0eb39 Binary files /dev/null and b/imgs/dosbox01.png differ