Reverted Mac OSX build back to Qt5. Added an SDL2 build from source in the event that brew install sdl2 fails.

This commit is contained in:
mjbudd77 2021-04-13 23:01:45 -04:00
parent 029cea534c
commit c4fa40975a
1 changed files with 26 additions and 5 deletions

View File

@ -6,11 +6,12 @@ pwd
uname -a
sw_vers
QT_MAJOR=6;
QT_MAJOR=5;
QT_PKGNAME=qt$QT_MAJOR;
FCEUX_VERSION_MAJOR=2
FCEUX_VERSION_MINOR=3
FCEUX_VERSION_PATCH=0
SDL2_VERSION=2.0.14
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
@ -30,6 +31,19 @@ echo '****************************************'
echo 'Install Dependency sdl2'
echo '****************************************'
brew install sdl2
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
echo '****************************************'
echo "Install Dependency $QT_PKGNAME"
@ -45,19 +59,26 @@ brew install minizip
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:
#QT_CMAKE=`find /usr/local -name Qt5Config.cmake`
#echo $QT_CMAKE;
#export Qt5_DIR=`dirname $QT_CMAKE`;
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;
if [ $QT_MAJOR == 6 ]; then
export Qt6_DIR=`brew --prefix qt6`;
echo "Qt6_DIR=$Qt6_DIR";
Qt_DIR=$Qt6_DIR;
USE_QT6=1;
else
export Qt5_DIR=`brew --prefix qt5`;
echo "Qt5_DIR=$Qt5_DIR";
Qt_DIR=$Qt5_DIR;
USE_QT6=0;
fi
#ls $Qt_DIR;
echo '**************************'
echo '*** Building Project ***'
@ -68,7 +89,7 @@ cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_PREFIX_PATH=`brew --prefix $QT_PKGNAME` \
-DCMAKE_PREFIX_PATH=$Qt_DIR \
-DCMAKE_PROJECT_VERSION_MAJOR=$FCEUX_VERSION_MAJOR \
-DCMAKE_PROJECT_VERSION_MINOR=$FCEUX_VERSION_MINOR \
-DCMAKE_PROJECT_VERSION_PATCH=$FCEUX_VERSION_PATCH \