diff --git a/.gitignore b/.gitignore index b87be60..3d8c137 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ mupen64plus/ *zip +*.dylib diff --git a/README.md b/README.md index 23f4789..17c0a73 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,20 @@ Linux Dependencies (Fedora) ``` sudo dnf install minizip-compat mesa-libGLU hidapi p7zip qt5-qtwebsockets ``` + +Mac OSX Dependencies + +```sh +# First, install brew: https://brew.sh/ + +# Now, install dependencies +brew install freetype cmake libsamplerate hidapi unixodbc libpng pkg-config sdl2_net sdl2 qt libpq + +# Work around brew + QT bug - https://github.com/Homebrew/legacy-homebrew/issues/29938 +# Note that you should swap out the 5.15.1 with the version of Qt that was installed above +ln -s /usr/local/Cellar/qt/5.15.1/plugins /usr/local/plugins +ln -s /usr/local/Cellar/qt/5.15.1/mkspecs /usr/local/mkspecs +``` ___ Building: ``` diff --git a/build.sh b/build.sh index c38cba4..24fc0a0 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,7 @@ set -e UNAME=$(uname -s) +gui_dir_suffix="" if [[ $UNAME == *"MINGW"* ]]; then suffix=".dll" if [[ $UNAME == *"MINGW64"* ]]; then @@ -10,6 +11,9 @@ if [[ $UNAME == *"MINGW"* ]]; then else mingw_prefix="mingw32" fi +elif [[ $UNAME == *"Darwin"* ]]; then + suffix=".dylib" + gui_dir_suffix=".app/Contents/MacOs/mupen64plus-gui" else suffix=".so" fi @@ -38,7 +42,7 @@ make -j4 if [[ $UNAME == *"MINGW"* ]]; then cp $base_dir/mupen64plus-input-qt/build/release/mupen64plus-input-qt.dll $install_dir else - cp $base_dir/mupen64plus-input-qt/build/libmupen64plus-input-qt.so $install_dir/mupen64plus-input-qt.so + cp $base_dir/mupen64plus-input-qt/build/libmupen64plus-input-qt$suffix $install_dir/mupen64plus-input-qt$suffix fi cd $base_dir/mupen64plus-audio-sdl2/projects/unix @@ -65,7 +69,7 @@ make -j4 if [[ $UNAME == *"MINGW"* ]]; then cp $base_dir/mupen64plus-gui/build/release/mupen64plus-gui.exe $install_dir else - cp $base_dir/mupen64plus-gui/build/mupen64plus-gui $install_dir + cp $base_dir/mupen64plus-gui/build/mupen64plus-gui$gui_dir_suffix $install_dir fi cd $base_dir/GLideN64/src