2020-05-09 02:07:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
id
|
|
|
|
pwd
|
|
|
|
cat /etc/os-release
|
|
|
|
|
2020-05-16 01:17:54 +00:00
|
|
|
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
|
|
|
|
|
|
|
|
#echo $SCRIPT_DIR;
|
|
|
|
|
2020-05-09 02:07:19 +00:00
|
|
|
gcc --version
|
|
|
|
python2 --version
|
|
|
|
python3 --version
|
|
|
|
|
2020-05-15 20:14:03 +00:00
|
|
|
INSTALL_PREFIX=/tmp/fceux
|
|
|
|
|
|
|
|
echo '****************************************'
|
|
|
|
echo "APPVEYOR_SSH_KEY=$APPVEYOR_SSH_KEY";
|
|
|
|
echo "APPVEYOR_SSH_BLOCK=$APPVEYOR_SSH_BLOCK";
|
|
|
|
echo '****************************************'
|
|
|
|
|
|
|
|
echo '****************************************'
|
|
|
|
echo '****************************************'
|
|
|
|
echo '*** Installing Package Dependencies ***'
|
|
|
|
echo '****************************************'
|
|
|
|
echo '****************************************'
|
|
|
|
# Install Lua-5.1 development package
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency lua5.1-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install lua5.1-dev
|
2020-05-14 22:16:04 +00:00
|
|
|
pkg-config --cflags --libs lua5.1
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# Install libSDL-1.2 and libSDL-2
|
2020-06-13 01:10:52 +00:00
|
|
|
# libSDL-1.2 no long needed
|
|
|
|
#echo '****************************************'
|
|
|
|
#echo 'Install Dependency libsdl1.2-dev'
|
|
|
|
#echo '****************************************'
|
|
|
|
#sudo apt-get --assume-yes install libsdl1.2-dev
|
|
|
|
#sdl-config --cflags --libs
|
2020-05-15 20:14:03 +00:00
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency libsdl2-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libsdl2-dev
|
2020-05-14 22:16:04 +00:00
|
|
|
sdl2-config --cflags --libs
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# Install libminizip-dev
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency libminizip-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libminizip-dev
|
2020-05-14 22:16:04 +00:00
|
|
|
pkg-config --cflags --libs minizip
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# GTK+-2 is no longer needed
|
2020-05-09 02:07:19 +00:00
|
|
|
#sudo apt-get install libgtk2.0-dev
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# Install GTK+-3
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency libgtk-3-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libgtk-3-dev
|
2020-05-14 22:16:04 +00:00
|
|
|
pkg-config --cflags --libs gtk+-3.0
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# Install GTK+-3 Sourceview
|
|
|
|
sudo apt-get --assume-yes install libgtksourceview-3.0-dev
|
2020-05-14 22:16:04 +00:00
|
|
|
pkg-config --cflags --libs gtksourceview-3.0
|
2020-05-09 02:07:19 +00:00
|
|
|
|
2020-05-15 20:14:03 +00:00
|
|
|
# Install scons
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Build Dependency scons'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install scons
|
|
|
|
|
|
|
|
# Install cppcheck
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Check Dependency cppcheck'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install cppcheck
|
|
|
|
|
|
|
|
echo '**************************'
|
|
|
|
echo '*** Building Project ***'
|
|
|
|
echo '**************************'
|
|
|
|
mkdir -p $INSTALL_PREFIX/usr;
|
2020-05-14 11:55:57 +00:00
|
|
|
scons --clean
|
2020-05-15 20:14:03 +00:00
|
|
|
scons GTK3=1 SYSTEM_LUA=1 SYSTEM_MINIZIP=1 CREATE_AVI=1 install --prefix=$INSTALL_PREFIX/usr
|
|
|
|
|
|
|
|
# Debug via ssh if necessary
|
|
|
|
if [ ! -z $APPVEYOR_SSH_BLOCK ]; then
|
|
|
|
curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e $INSTALL_PREFIX/usr/bin/fceux ]; then
|
|
|
|
echo '**************************************************************'
|
|
|
|
echo 'Printing Shared Object Dependencies for ./bin/fceux Executable'
|
|
|
|
echo '**************************************************************'
|
|
|
|
ldd $INSTALL_PREFIX/usr/bin/fceux
|
|
|
|
else
|
|
|
|
echo "Error: Executable Failed to build: $INSTALL_PREFIX/usr/bin/fceux";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo '**************************************************************'
|
2020-05-16 01:17:54 +00:00
|
|
|
echo 'Printing To Be Packaged Files '
|
2020-05-15 20:14:03 +00:00
|
|
|
echo '**************************************************************'
|
|
|
|
find $INSTALL_PREFIX
|
2020-05-09 02:07:19 +00:00
|
|
|
|
2020-05-16 01:17:54 +00:00
|
|
|
echo '**************************************************************'
|
|
|
|
echo 'Creating Debian Package'
|
|
|
|
echo '**************************************************************'
|
|
|
|
$SCRIPT_DIR/debpkg.pl;
|
|
|
|
|
|
|
|
echo '**************************************************************'
|
|
|
|
echo 'Testing Install of Package'
|
|
|
|
echo '**************************************************************'
|
2020-05-16 01:27:17 +00:00
|
|
|
sudo dpkg -i /tmp/fceux-*.deb
|
2020-06-16 13:12:55 +00:00
|
|
|
|
|
|
|
echo 'Pushing Debian Package to Build Artifacts'
|
|
|
|
appveyor PushArtifact /tmp/fceux-*.deb
|