Browse Source

Add nxengine

master
mid-kid 8 years ago
parent
commit
c511a080e8
  1. 8
      satellites/extrafiles/nxengine/nxengine.desktop
  2. BIN
      satellites/extrafiles/nxengine/nxengine.png
  3. 22
      satellites/extrafiles/nxengine/nxengine.sh
  4. 48
      satellites/nxengine.sat

8
satellites/extrafiles/nxengine/nxengine.desktop

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=NXEngine (Cave Story)
Comment=A clone/engine-rewrite of the classic jump-and-run platformer Cave Story/Doukutsu Monogatari
Exec=nxengine
Icon=nxengine
Terminal=false
Categories=Game;AdventureGame;

BIN
satellites/extrafiles/nxengine/nxengine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

22
satellites/extrafiles/nxengine/nxengine.sh

@ -0,0 +1,22 @@
#!/bin/sh -e
dir_prefix="%PREFIX%"
dir_runtime="%RUNTIME%"
files="
lib/nxengine/nx
share/nxengine/font.ttf
share/nxengine/smalfont.bmp
share/nxengine/sprites.sif
share/nxengine/tilekey.dat
share/nxengine/Doukutsu.exe
share/nxengine/data
"
mkdir -p "$dir_runtime"
for file in $files; do
[ ! -L "$dir_runtime/$(basename "$file")" ] && ln -sf -t "$dir_runtime" "$dir_prefix/$file"
done
cd "$dir_runtime" && ./nx

48
satellites/nxengine.sat

@ -0,0 +1,48 @@
name=nxengine
version=1006
update_url="http://nxengine.sourceforge.net/"
dlextract "http://nxengine.sourceforge.net/dl/nx-src-$version.tar.bz2" \
"cc0d1f5608bba70df86a6f5a3b4dd3bd"
download "http://www.cavestory.org/downloads/cavestoryen.zip" \
"5aad47f1cb72185d6e7f4c8c392f6b6e"
extrafile "nxengine.sh"
extrafile "nxengine.desktop"
extrafile "nxengine.png"
header_end
extract "cavestoryen.zip" '' "unzip -qd {dst} {src}"
# Some keyboards don't have an accessible backtick.
console_key="$(safe_sed $(option console_key=\`))"
sed -i -e "s/\`/$console_key/" nx/input.cpp
sed -i -e "s/\`/$console_key/" nx/console.cpp
# Allow custom CFLAGS to the Makefile
sed -i -e '/g++/s/-o/$(CFLAGS) -o/g' nx/Makefile
# Build the nx executable
make -C nx
# Install the nxengine executable
install -Dm755 nx/nx "$dir_install/$dir_prefix/lib/nxengine/nx"
# Install the necessary data
mkdir -p "$dir_install/$dir_prefix/share/nxengine"
install -m644 nx/font.ttf nx/smalfont.bmp nx/sprites.sif nx/tilekey.dat CaveStory/Doukutsu.exe "$dir_install/$dir_prefix/share/nxengine/"
cp -r CaveStory/data "$dir_install/$dir_prefix/share/nxengine/data"
# Install the run script
# Where the files will be copied to on runtime.
dir_runtime="$(option dir_runtime=\$HOME/.nxengine)"
sed -i -e "s/%PREFIX%/$(safe_sed "$dir_prefix")/" \
-e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \
nxengine.sh
install -Dm755 nxengine.sh "$dir_install/$dir_prefix/bin/nxengine"
# Install desktop file and icon
install -Dm644 nxengine.png "$dir_install/$dir_prefix/share/pixmaps/nxengine.png"
install -Dm644 nxengine.desktop "$dir_install/$dir_prefix/share/applications/nxengine.desktop"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:
Loading…
Cancel
Save