Skip to content
Jordan Christiansen edited this page Nov 7, 2023 · 7 revisions

Requirements

  • gcc/g++
  • cmake 2.6+
  • SDL2-devel
  • SDL2_ttf-devel
  • libpng-devel
  • SDL2_mixer-devel
  • libjpeg-devel

To install/update these requirements (using apt, which is easier to use on Debian and Ubuntu-based systems), run the following in your Terminal:

sudo apt install build-essential libpng-dev libjpeg-dev make cmake cmake-data git libsdl2-dev libsdl2-doc libsdl2-gfx-dev libsdl2-gfx-doc libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev -y -qq

Building

git clone https://github.com/nxengine/nxengine-evo
cd nxengine-evo
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
cd ..

You can speed up the compilation process by adding -j n to the make, where n is the number of parallel jobs to run. You can use nproc to find out how many cores your computer has. make -j $(nproc) will run make with as many parallel jobs as you have cores.

The compiled binaries nxengine-evo and nxextract should now be in the build/ directory.

Then, extract the assets from cavestoryen.zip (Aeon Genesis version). Copy all contents of the data folder into the data/ and put Doukutsu.exe into the project directory (nxengine-evo), then run nxextract to get data out of the .exe file:

unzip cavestoryen.zip
cp -r CaveStory/Doukutsu.exe CaveStory/data ./
./build/nxextract

Finally, in the project directory run:

cd build
sudo make install

Portable mode

By default, nxengine-evo looks for data files in PREFIX/share/nxengine/ (typically /usr/share/nxengine or /usr/local/share/nxengine). It also has a "portable" position-independent mode that makes nxengine to look for data files relative to the binary. The AppImage uses portable mode to enable nxengine-evo to look for data files inside the AppImage instead of relative to /.

You can also use portable mode to build nxengine-evo self-contained in a directory. Add -DPORTABLE=ON to CMake's build-time options to enable it:

git clone https://github.com/nxengine/nxengine-evo
cd nxengine-evo
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPORTABLE=ON ..
make
cd ..

Now, extract the data files from cavestoryen.zip as usual and run nxextract.

unzip cavestoryen.zip
cp -r CaveStory/Doukutsu.exe CaveStory/data ./
./build/nxextract

Instead of make install, you can copy the binary and data files to a new self-contained directory:

mkdir dest
cp -r build/nxengine-evo data dest/

Now you can run nxengine-evo directly from this self-contained directory that only contains the binary and data files.

Clone this wiki locally