forked from project-slippi/Ishiiruka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-linux.sh
executable file
·40 lines (32 loc) · 940 Bytes
/
build-linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash -e
# build-linux.sh
CMAKE_FLAGS='-DLINUX_LOCAL_DEV=true'
PLAYBACK_CODES_PATH="./Data/PlaybackGeckoCodes/"
DATA_SYS_PATH="./Data/Sys/"
BINARY_PATH="./build/Binaries/"
# 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
cmake ${CMAKE_FLAGS} ../
make -j$(nproc)
popd
# Copy the Sys folder in
rm -rf ${BINARY_PATH}/Sys
cp -r ${DATA_SYS_PATH} ${BINARY_PATH}
touch ./build/Binaries/portable.txt
# Copy playback specific codes if needed
if [ "$1" == "playback" ]
then
# Update Sys dir with playback codes
echo "Copying Playback gecko codes"
rm -rf "${BINARY_PATH}/Sys/GameSettings" # Delete netplay codes
cp -r "${PLAYBACK_CODES_PATH}/." "${BINARY_PATH}/Sys/GameSettings/"
fi