2021-02-03 21:29:46 -05:00
|
|
|
#!/usr/bin/env bash
|
2020-11-19 21:22:16 -05:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo "======================================="
|
|
|
|
echo "= Jak Project Offline Test ="
|
|
|
|
echo "======================================="
|
|
|
|
echo ""
|
|
|
|
echo " ================= Cloning..."
|
|
|
|
|
|
|
|
ISO_DATA_PATH=${1}
|
|
|
|
BRANCH_NAME=${2:-master}
|
2020-11-21 10:30:19 -05:00
|
|
|
# Provide a default location to bind the ISO_DATA_PATH
|
|
|
|
ISO_DATA_SYM_LINK_DIR=${3:-iso_data}
|
2020-11-19 21:22:16 -05:00
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
|
|
|
echo "Must supply path to iso data folder!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " Branch: ${BRANCH_NAME}"
|
|
|
|
mkdir project
|
|
|
|
cd project
|
|
|
|
git clone https://github.com/water111/jak-project.git
|
|
|
|
cd jak-project
|
|
|
|
git checkout $BRANCH_NAME
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
# create symlink to the iso_data folder.
|
|
|
|
rm -r iso_data
|
2020-11-21 10:30:19 -05:00
|
|
|
ln -s $ISO_DATA_PATH $ISO_DATA_SYM_LINK_DIR
|
2020-11-19 21:22:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
echo " =============== Building..."
|
|
|
|
cmake ..
|
|
|
|
make -j
|
|
|
|
|
|
|
|
echo " ================ Running unit tests..."
|
|
|
|
../test.sh
|
|
|
|
|
|
|
|
echo " ================ Decompiling..."
|
|
|
|
../decomp.sh
|
|
|
|
|
|
|
|
echo " ================ Building assets..."
|
2020-11-24 20:48:38 -05:00
|
|
|
../gc.sh -cmd \(build-data\)
|
2020-11-19 21:22:16 -05:00
|
|
|
|
|
|
|
echo " ================ Checking assets..."
|
|
|
|
../check.sh
|
|
|
|
|
2020-11-24 20:48:38 -05:00
|
|
|
echo " ================ Building game..."
|
|
|
|
../gc.sh -cmd \(build-game\)
|
|
|
|
|
|
|
|
echo " ================ Booting game..."
|
|
|
|
../boot_game.sh
|
|
|
|
|
2020-11-19 21:22:16 -05:00
|
|
|
echo "Offline test has completed successfully!"
|