Files
Ishiiruka/build-mac.sh

39 lines
965 B
Bash
Raw Normal View History

2020-12-02 18:37:11 -08:00
#!/bin/bash -e
# build-mac.sh
CMAKE_FLAGS=''
2021-06-26 14:29:52 -07:00
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
2020-12-02 18:37:11 -08:00
DATA_SYS_PATH="./Data/Sys/"
2020-12-04 08:30:20 -08:00
BINARY_PATH="./build/Binaries/Slippi Dolphin.app/Contents/Resources/"
2020-12-02 18:37:11 -08:00
# Build type
if [ "$1" == "playback" ]
then
CMAKE_FLAGS+=" -DIS_PLAYBACK=true"
echo "Using Playback build config"
else
echo "Using Netplay build config"
fi
# Move into the build directory, run CMake, and compile the project
mkdir -p build
pushd build
2020-12-04 08:30:20 -08:00
cmake ${CMAKE_FLAGS} ..
make -j$(sysctl -n hw.ncpu)
2020-12-02 18:37:11 -08:00
popd
# Copy the Sys folder in
2020-12-04 08:30:20 -08:00
echo "Copying Sys files into the bundle"
cp -Rfn "${DATA_SYS_PATH}" "${BINARY_PATH}"
2020-12-02 18:37:11 -08:00
# Copy playback specific codes if needed
if [ "$1" == "playback" ]
then
2021-06-26 14:29:52 -07:00
# Update Sys dir with playback codes
echo "Copying playback gecko codes into the bundle"
rm -rf "${BINARY_PATH}/Sys/GameSettings" # Delete netplay codes
cp -r "${PLAYBACK_CODES_PATH}/." "${BINARY_PATH}/Sys/GameSettings/"
fi