2020-05-09 02:07:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
id
|
|
|
|
pwd
|
2020-07-01 00:20:50 +00:00
|
|
|
uname -a
|
2020-05-09 02:07:19 +00:00
|
|
|
cat /etc/os-release
|
2022-10-01 20:29:02 +00:00
|
|
|
env
|
2020-05-09 02:07:19 +00:00
|
|
|
|
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
|
2022-02-13 13:04:22 +00:00
|
|
|
#python2 --version
|
|
|
|
#python3 --version
|
2020-05-09 02:07:19 +00:00
|
|
|
|
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 '****************************************'
|
|
|
|
|
2022-10-01 20:29:02 +00:00
|
|
|
if [ ! -z $FCEU_RELEASE_VERSION ]; then
|
|
|
|
APPVEYOR_CMAKE_FLAGS=" -DPUBLIC_RELEASE=1 ";
|
|
|
|
fi
|
|
|
|
|
2020-05-15 20:14:03 +00:00
|
|
|
echo '****************************************'
|
|
|
|
echo '****************************************'
|
|
|
|
echo '*** Installing Package Dependencies ***'
|
|
|
|
echo '****************************************'
|
|
|
|
echo '****************************************'
|
2020-11-25 01:32:41 +00:00
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency Updates'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes update
|
2020-05-15 20:14:03 +00:00
|
|
|
# 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
|
|
|
|
2023-04-25 03:11:20 +00:00
|
|
|
# Install libarchive-dev
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency libarchive-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libarchive-dev
|
|
|
|
pkg-config --cflags --libs libarchive
|
|
|
|
|
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
|
|
|
|
2020-07-10 18:57:55 +00:00
|
|
|
# GTK3 was retired in favor of cross platform QT
|
2020-07-01 02:28:02 +00:00
|
|
|
## Install GTK+-3
|
|
|
|
#echo '****************************************'
|
|
|
|
#echo 'Install Dependency libgtk-3-dev'
|
|
|
|
#echo '****************************************'
|
2021-04-12 00:34:43 +00:00
|
|
|
#sudo apt-get --assume-yes install libgtk-3-dev
|
|
|
|
#pkg-config --cflags --libs gtk+-3.0
|
2020-07-01 02:28:02 +00:00
|
|
|
#
|
|
|
|
## Install GTK+-3 Sourceview
|
|
|
|
#sudo apt-get --assume-yes install libgtksourceview-3.0-dev
|
|
|
|
#pkg-config --cflags --libs gtksourceview-3.0
|
|
|
|
|
|
|
|
# Install QT5
|
2020-05-15 20:14:03 +00:00
|
|
|
echo '****************************************'
|
2020-07-01 02:28:02 +00:00
|
|
|
echo 'Install Dependency Qt5'
|
2020-05-15 20:14:03 +00:00
|
|
|
echo '****************************************'
|
2020-07-01 02:28:02 +00:00
|
|
|
sudo apt-get --assume-yes install qt5-default
|
2021-08-18 01:23:39 +00:00
|
|
|
sudo apt-get --assume-yes install qttools5-dev # For Qt Help
|
2020-05-09 02:07:19 +00:00
|
|
|
|
2021-04-30 18:09:22 +00:00
|
|
|
# Install x264
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Optional Dependency libx264-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libx264-dev
|
|
|
|
|
2021-09-01 01:15:51 +00:00
|
|
|
# Install x265
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Optional Dependency libx265-dev'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libx265-dev
|
|
|
|
|
2021-09-24 23:42:56 +00:00
|
|
|
# Install libav (ffmpeg)
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Optional Dependency libav (ffmpeg)'
|
|
|
|
echo '****************************************'
|
|
|
|
sudo apt-get --assume-yes install libavcodec-dev
|
|
|
|
sudo apt-get --assume-yes install libavformat-dev
|
|
|
|
sudo apt-get --assume-yes install libavutil-dev
|
|
|
|
sudo apt-get --assume-yes install libswscale-dev
|
2022-05-30 08:55:47 +00:00
|
|
|
sudo apt-get --assume-yes install libswresample-dev
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# 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-10-23 02:54:00 +00:00
|
|
|
|
2020-06-20 04:36:43 +00:00
|
|
|
echo "Num CPU: `nproc`";
|
2021-08-18 02:16:57 +00:00
|
|
|
./scripts/unix_make_docs.sh;
|
2021-08-18 01:23:39 +00:00
|
|
|
|
2020-08-07 17:40:28 +00:00
|
|
|
mkdir buildQT; cd buildQT;
|
2020-07-10 17:51:32 +00:00
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2020-10-23 02:54:00 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2020-07-10 17:51:32 +00:00
|
|
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
2022-10-01 20:29:02 +00:00
|
|
|
$APPVEYOR_CMAKE_FLAGS \
|
2020-07-10 17:51:32 +00:00
|
|
|
..
|
2020-08-07 17:40:28 +00:00
|
|
|
make -j `nproc`
|
2020-10-23 02:54:00 +00:00
|
|
|
make install DESTDIR=$INSTALL_PREFIX
|
2020-08-07 17:40:28 +00:00
|
|
|
|
|
|
|
cd ..;
|
2021-04-12 00:34:43 +00:00
|
|
|
#mkdir buildGTK; cd buildGTK;
|
|
|
|
#cmake \
|
|
|
|
# -DGTK=1 \
|
|
|
|
# -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
# -DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
|
|
|
# ..
|
|
|
|
#make -j `nproc`
|
|
|
|
#make install DESTDIR=$INSTALL_PREFIX
|
2020-07-02 00:33:32 +00:00
|
|
|
|
|
|
|
# Install Files
|
2020-07-10 17:51:32 +00:00
|
|
|
#cd .. # cd out of build
|
|
|
|
#mkdir -p $INSTALL_PREFIX/usr/bin/.
|
|
|
|
#mkdir -p $INSTALL_PREFIX/usr/share/fceux
|
|
|
|
#mkdir -p $INSTALL_PREFIX/usr/share/pixmaps
|
|
|
|
#mkdir -p $INSTALL_PREFIX/usr/share/applications
|
|
|
|
#mkdir -p $INSTALL_PREFIX/usr/man/man6
|
|
|
|
#
|
|
|
|
#cp -f ./build/fceux $INSTALL_PREFIX/usr/bin/.
|
|
|
|
#cp -a ./output/* $INSTALL_PREFIX/usr/share/fceux/.
|
|
|
|
#cp -a ./src/auxlib.lua $INSTALL_PREFIX/usr/share/fceux/.
|
|
|
|
#cp -a ./fceux.png $INSTALL_PREFIX/usr/share/pixmaps/.
|
|
|
|
#cp -a ./fceux.desktop $INSTALL_PREFIX/usr/share/applications/.
|
|
|
|
#cp -a ./documentation/fceux.6 $INSTALL_PREFIX/usr/man/man6/.
|
|
|
|
#cp -a ./documentation/fceux-net-server.6 $INSTALL_PREFIX/usr/man/man6/.
|
2020-07-02 00:33:32 +00:00
|
|
|
|
2020-05-15 20:14:03 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2021-04-12 00:34:43 +00:00
|
|
|
#if [ -e $INSTALL_PREFIX/usr/bin/fceux-gtk ]; then
|
|
|
|
# echo '**************************************************************'
|
|
|
|
# echo 'Printing Shared Object Dependencies for fceux-gtk Executable'
|
|
|
|
# echo '**************************************************************'
|
|
|
|
# ldd $INSTALL_PREFIX/usr/bin/fceux-gtk
|
|
|
|
#else
|
|
|
|
# echo "Error: Executable Failed to build: $INSTALL_PREFIX/usr/bin/fceux-gtk";
|
|
|
|
# exit 1;
|
|
|
|
#fi
|
2020-08-07 18:59:55 +00:00
|
|
|
|
2020-05-15 20:14:03 +00:00
|
|
|
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
|
|
|
|
2022-10-01 20:29:02 +00:00
|
|
|
if [ ! -z $APPVEYOR ]; then
|
|
|
|
echo 'Pushing Debian Package to Build Artifacts'
|
|
|
|
if [ -z $FCEU_RELEASE_VERSION ]; then
|
|
|
|
cp /tmp/fceux-*.deb /tmp/fceux-ubuntu-x64.deb
|
|
|
|
appveyor PushArtifact /tmp/fceux-ubuntu-x64.deb
|
|
|
|
appveyor SetVariable -Name LINUX_ARTIFACT -Value fceux-ubuntu-x64.deb
|
|
|
|
else
|
|
|
|
appveyor PushArtifact /tmp/fceux-*.deb
|
|
|
|
fi
|
|
|
|
fi
|