view build_release @ 1374:8f404b1fa572

Go back to resetting the refresh counter after a DMA. Probably not quite correct as it is probably reset on VDP triggered refresh, but this is close enough for now given the general limitations with my refresh code. VDP FIFO Testing seems to be passing 100% reliably again (was occassionally failing still with the last commit)
author Michael Pavone <pavone@retrodev.com>
date Tue, 23 May 2017 23:47:40 -0700
parents e1a6e8ee656f
children 05c34078e1ac
line wrap: on
line source

#!/bin/sh

set -e

if [ -z "$OS" ]; then
	OS=`uname -s`
fi

if [ $OS = "Linux" ]; then
	cd sdl
	./configure
	make all
	cd ..
	rm -rf lib
	mkdir lib
	cp sdl/build/.libs/libSDL2-*.so.*.*.* lib
	sdl=`ls lib`
	link=`echo $sdl | sed -E 's/(so\.[0-9]*).*/\1/'`
	cd lib
	ln -s "$sdl" "$link"
	ln -s "$sdl" libSDL2.so
	cd ..
	cd glew
	make all
	cd ..
fi
echo "Path is: $PATH"
make PORTABLE=1 clean all
make menu.bin
if [ $OS = "Windows" ]; then
	binaries="dis.exe zdis.exe stateview.exe vgmplay.exe blastem.exe SDL2.dll"
	verstr=`sed -E -n 's/^[^B]+BLASTEM_VERSION "([^"]+)"/blastem \1/p' blastem.c`
	txt=".txt"
else
	binaries="dis zdis stateview vgmplay blastem termhelper"
	if [ $OS = "Darwin" ]; then
		binaries="$binaries Frameworks"
	else
		binaries="$binaries lib"
	fi
	verstr=`./blastem -v`
	txt=""
fi
binaries="$binaries menu.bin"
ver=`echo $verstr | awk '/blastem/ { gsub(/\r/, "", $2); print $2 }'`
if [ $OS = "Windows" ]; then
	suffix='-win32'
elif [ $OS = "Darwin" ]; then
	suffix='-osx'
else
	suffix=`file ./blastem | sed -E 's/^[^:]*: [^ ]* ([0-9]*)-bit .*/\1/'`
fi
dir="blastem${suffix}-${ver}"
echo $dir
rm -rf "$dir"
mkdir "$dir"
cp -r $binaries shaders default.cfg rom.db gamecontrollerdb.txt "$dir"
for file in README COPYING CHANGELOG; do
	cp "$file" "$dir"/"$file$txt"
done
if [ $OS = "Darwin" ]; then
	cp SDL-LICENSE "$dir"
else
	cp sdl/COPYING.txt "$dir"/SDL-LICENSE$txt
fi
cp glew/LICENSE.txt "$dir"/GLEW-LICENSE$txt

if [ $OS = "Windows" ]; then
	rm -f "${dir}.zip"
	zip -r "${dir}.zip" "$dir"
	echo "${dir}.zip"
else
	rm -f "${dir}.tar.gz"
	tar -cvzf "${dir}.tar.gz" "$dir"
	echo "${dir}.tar.gz"
fi