Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cave Story #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions examples/cavestory/build_steamlink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/bin/bash
#

TOP=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
if [ "${MARVELL_SDK_PATH}" = "" ]; then
MARVELL_SDK_PATH="$(cd "${TOP}/../.." && pwd)"
fi

# Get the code
git clone https://github.com/nxengine/nxengine-evo.git
cd nxengine-evo

# Make the extract binary
mkdir build
cd build
cmake ..
make extract
cd ..
rm -rf build

# Download and extract game files
wget -nc https://github.com/nxengine/translations/releases/download/v1.8/all.zip
unzip -n all.zip
wget -nc http://www.cavestory.org/downloads/cavestoryen.zip
unzip -n cavestoryen.zip
cd CaveStory
../bin/extract
cp -r data/* ../data/
cd ..


if [ "${MARVELL_ROOTFS}" = "" ]; then
source "${MARVELL_SDK_PATH}/setenv.sh" || exit 1
fi
cd "${TOP}/nxengine-evo"


# Build the game
mkdir build && cd build
MARVELL_SDK_PATH="${MARVELL_SDK_PATH}" cmake -DMARVELL_SDK_PATH="${MARVELL_SDK_PATH}" -DCMAKE_TOOLCHAIN_FILE="${TOP}/../../toolchain/steamlink-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release ..
make || exit 2

export DESTDIR="${TOP}/steamlink/apps/CaveStory"

# Copy the files to the app directory
mkdir -p "${DESTDIR}"
cp -v -r "${TOP}/nxengine-evo/data" "${DESTDIR}/"
cp -v "${TOP}/nxengine-evo/bin/nx" "${DESTDIR}"

# Create the table of contents and icon
cat >"${DESTDIR}/toc.txt"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PxfmhZj/Xxkp0P9fE1rmqAs9Hbhl9NUfAr6oyz08KeqKOD7nf7NmdBviaC1C7S/1K
0l9ZXuxd6htchKnAOmSG1wWav/40cgLp/sAT19M4/0z0Paku5+XIzXgXITMDxqkycFI1fo520otY
aPB1LsQkZHbAOcCTyDGAach+oT5gfOiQu8hxzmFV574M/IFc0TgYeOIWRkYA/wHFYwX3TdBgPQAA
AABJRU5ErkJggg==
__EOF__

# Pack it up
name=$(basename ${DESTDIR})
pushd "$(dirname ${DESTDIR})"
tar zcvf $name.tgz $name || exit 3
rm -rf $name
popd

# All done!
echo "Build complete!"
echo
echo "Put the steamlink folder onto a USB drive, insert it into your Steam Link, and cycle the power to install."