2020-07-01 00:20:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo ' MacOS Build !!! '
|
|
|
|
id
|
|
|
|
pwd
|
|
|
|
uname -a
|
|
|
|
sw_vers
|
|
|
|
|
2021-04-14 03:01:45 +00:00
|
|
|
QT_MAJOR=5;
|
2021-04-12 00:56:47 +00:00
|
|
|
QT_PKGNAME=qt$QT_MAJOR;
|
2020-07-12 15:50:18 +00:00
|
|
|
FCEUX_VERSION_MAJOR=2
|
2021-05-19 00:19:56 +00:00
|
|
|
FCEUX_VERSION_MINOR=4
|
2020-12-11 02:43:50 +00:00
|
|
|
FCEUX_VERSION_PATCH=0
|
2021-04-14 03:01:45 +00:00
|
|
|
SDL2_VERSION=2.0.14
|
2020-07-12 15:50:18 +00:00
|
|
|
|
2020-07-01 00:20:50 +00:00
|
|
|
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
|
|
|
|
|
2020-07-10 18:57:55 +00:00
|
|
|
NPROC=`getconf _NPROCESSORS_ONLN`;
|
|
|
|
echo "Number of Processors: $NPROC";
|
|
|
|
|
2020-07-10 18:09:33 +00:00
|
|
|
INSTALL_PREFIX=/tmp/fceux
|
|
|
|
|
2021-06-26 04:16:53 +00:00
|
|
|
# Clean build and packaging directories
|
|
|
|
sudo rm -rf build;
|
|
|
|
sudo rm -rf $INSTALL_PREFIX/fceux.app;
|
|
|
|
|
|
|
|
# Remove windows specific DLLs so that they don't get installed
|
|
|
|
find output -name *.dll -exec rm -f {} \;
|
|
|
|
|
2020-07-01 00:20:50 +00:00
|
|
|
gcc --version
|
|
|
|
|
|
|
|
echo '****************************************'
|
|
|
|
echo "APPVEYOR_SSH_KEY=$APPVEYOR_SSH_KEY";
|
|
|
|
echo "APPVEYOR_SSH_BLOCK=$APPVEYOR_SSH_BLOCK";
|
|
|
|
echo '****************************************'
|
|
|
|
|
2020-07-01 01:37:09 +00:00
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency sdl2'
|
|
|
|
echo '****************************************'
|
2020-07-01 00:20:50 +00:00
|
|
|
brew install sdl2
|
2021-04-14 03:01:45 +00:00
|
|
|
BREW_SDL2=$?
|
|
|
|
echo "brew install sdl2 Return: $BREW_SDL2";
|
|
|
|
#sleep 10
|
|
|
|
if [ $BREW_SDL2 != 0 ]; then
|
|
|
|
echo "brew install sdl2 FAILED: Attempted to build from $SDL2_VERSION release source";
|
|
|
|
curl -o SDL2-$SDL2_VERSION.tar.gz https://www.libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz
|
|
|
|
tar -xvf SDL2-$SDL2_VERSION.tar.gz
|
|
|
|
cd SDL2-$SDL2_VERSION;
|
|
|
|
./configure --without-x --enable-hidapi
|
|
|
|
make -j $NPROC
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
fi
|
2020-07-01 01:37:09 +00:00
|
|
|
|
|
|
|
echo '****************************************'
|
2021-04-12 00:56:47 +00:00
|
|
|
echo "Install Dependency $QT_PKGNAME"
|
2020-07-01 01:37:09 +00:00
|
|
|
echo '****************************************'
|
2021-04-12 00:56:47 +00:00
|
|
|
brew install $QT_PKGNAME
|
2020-07-01 01:37:09 +00:00
|
|
|
|
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Dependency minizip'
|
|
|
|
echo '****************************************'
|
2020-07-01 00:42:16 +00:00
|
|
|
brew install minizip
|
2020-07-01 01:37:09 +00:00
|
|
|
|
2021-04-30 18:09:22 +00:00
|
|
|
echo '****************************************'
|
|
|
|
echo 'Install Optional Dependency x264'
|
|
|
|
echo '****************************************'
|
|
|
|
brew install x264
|
|
|
|
|
2020-07-01 01:28:18 +00:00
|
|
|
#brew install zlib # Already installed in appveyor macOS
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:
|
|
|
|
|
2021-04-14 03:01:45 +00:00
|
|
|
ls -ltr $HOME/Qt;
|
|
|
|
|
|
|
|
#find $HOME/Qt -name Qt5Config.cmake
|
|
|
|
#find $HOME/Qt -name Qt6Config.cmake
|
|
|
|
|
|
|
|
#export Qt6_DIR=$HOME/Qt/6.0/clang_64;
|
|
|
|
#export Qt5_DIR=$HOME/Qt/5.15/clang_64;
|
2021-04-12 00:56:47 +00:00
|
|
|
|
|
|
|
if [ $QT_MAJOR == 6 ]; then
|
|
|
|
export Qt6_DIR=`brew --prefix qt6`;
|
|
|
|
echo "Qt6_DIR=$Qt6_DIR";
|
2021-04-14 03:01:45 +00:00
|
|
|
Qt_DIR=$Qt6_DIR;
|
2021-04-12 01:26:46 +00:00
|
|
|
USE_QT6=1;
|
2021-04-12 00:56:47 +00:00
|
|
|
else
|
|
|
|
export Qt5_DIR=`brew --prefix qt5`;
|
2020-07-10 18:09:33 +00:00
|
|
|
echo "Qt5_DIR=$Qt5_DIR";
|
2021-04-14 03:01:45 +00:00
|
|
|
Qt_DIR=$Qt5_DIR;
|
2021-04-12 01:26:46 +00:00
|
|
|
USE_QT6=0;
|
2021-04-12 00:56:47 +00:00
|
|
|
fi
|
2021-04-14 03:01:45 +00:00
|
|
|
#ls $Qt_DIR;
|
2020-07-01 00:42:16 +00:00
|
|
|
|
2020-07-01 01:37:09 +00:00
|
|
|
echo '**************************'
|
|
|
|
echo '*** Building Project ***'
|
|
|
|
echo '**************************'
|
2020-07-01 00:42:16 +00:00
|
|
|
mkdir build;
|
|
|
|
cd build;
|
2020-07-10 18:09:33 +00:00
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2020-07-12 15:50:18 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
|
2020-07-10 18:09:33 +00:00
|
|
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
2021-04-14 03:01:45 +00:00
|
|
|
-DCMAKE_PREFIX_PATH=$Qt_DIR \
|
2020-07-12 15:50:18 +00:00
|
|
|
-DCMAKE_PROJECT_VERSION_MAJOR=$FCEUX_VERSION_MAJOR \
|
|
|
|
-DCMAKE_PROJECT_VERSION_MINOR=$FCEUX_VERSION_MINOR \
|
|
|
|
-DCMAKE_PROJECT_VERSION_PATCH=$FCEUX_VERSION_PATCH \
|
|
|
|
-DCPACK_PACKAGE_VERSION_MAJOR=$FCEUX_VERSION_MAJOR \
|
|
|
|
-DCPACK_PACKAGE_VERSION_MINOR=$FCEUX_VERSION_MINOR \
|
|
|
|
-DCPACK_PACKAGE_VERSION_PATCH=$FCEUX_VERSION_PATCH \
|
2021-04-12 01:26:46 +00:00
|
|
|
-DQT6=$USE_QT6 \
|
2020-07-10 18:48:46 +00:00
|
|
|
.. || exit 1
|
2020-07-10 18:57:55 +00:00
|
|
|
make -j $NPROC || exit 1
|
2020-07-12 16:33:42 +00:00
|
|
|
sudo make install || exit 1
|
|
|
|
sudo cpack -G DragNDrop || exit 1
|
2020-07-01 00:20:50 +00:00
|
|
|
|
2020-07-12 20:11:23 +00:00
|
|
|
echo 'Pushing DMG Package to Build Artifacts'
|
|
|
|
appveyor PushArtifact fceux-*.dmg
|
|
|
|
|
2020-07-01 00:20:50 +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
|
2020-07-12 13:00:17 +00:00
|
|
|
|