#!/bin/bash
# v=2501011356
# this bash script was written by al derosa (bucko) for the bbs on a stick project
# released by the wrong number family of bbs' please do not remove these hastag
# statements for more info on the bbs on a stick project go to www.wrgnbr.com
# thank you - al derosa
#
#update and upgrade
sudo apt -y update
sudo apt -y upgrade 
#install network & pre-requisites
sudo apt-get -y install cifs-utils gvfs-backends make gcc build-essential subversion autoconf
sudo apt-get -y install automake byacc flex xa65 texinfo texlive-fonts-recommended dos2unix libpulse-dev
sudo apt-get -y install libasound2-dev libglew-dev texi2html
sudo apt-get -y install libreadline-dev libgif-dev libjpeg-dev libpcap-dev libpng-dev
sudo apt-get -y install libsdl2-dev libsdl2-image-dev libcurl4-openssl-dev libevdev-dev
#build tcpser
cd
cd IM3/tcpser
sudo make clean
sudo make
sudo cp tcpser /usr/local/bin/tcpser_1.1.5
cd
#build and make vice
mkdir myworkdir
cd myworkdir
svn checkout https://svn.code.sf.net/p/vice-emu/code/trunk vice-trunk
cd 
cd aciafix
sudo cp -r -p aciacore.c ~/myworkdir/vice-trunk/vice/src
sudo cp -r -p rs232.c ~/myworkdir/vice-trunk/vice/src/rs232drv
sudo cp -r -p rs232.h ~/myworkdir/vice-trunk/vice/src/rs232drv
sudo cp -r -p rs232net.c ~/myworkdir/vice-trunk/vice/src/rs232drv
sudo cp -r -p rs232net.h ~/myworkdir/vice-trunk/vice/src/rs232drv
cd
cd myworkdir/vice-trunk/vice
./autogen.sh
# if you would like to use GTK interface instead of SDL2 add a hash tag to the SDL2 configure line
# and take the hashtag off of the GTK3 UI line right underneath it.
./configure --enable-sdl2ui --with-sdlsound --without-png
#./configure --enable-gtk3ui --with-pulse --with-resid --enable-ethernet --with-alsa --enable-cpuhistory --enable-ffmpeg
make
sudo make install
cd
#chomod script files

exit 0


