Building with Meson
Compilation
First, install the tools necessary to build all the dependencies:
You must install MSYS2. Afterwards:
Launch any of the MSYS2 command prompts from your Start Screen.
Type
pacman -Syuu
to begin updating MSYS. When the process is over, it will ask you to close the window.Open the MSYS2 MinGW 64-bit command prompt from your Start Screen. Type
pacman -Syuu
again, and allow it to finish updating.
pacman -S git ruby vim base-devel \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-meson \
mingw-w64-x86_64-autotools \
mingw-w64-x86_64-gcc
Next, clone mkxp-z's git repository, cd
into your platform-specific directory, and run the build script:
git clone https://gitlab.com/mkxp-z/mkxp-z --recursive
cd mkxp-z/windows
make
All you should need to do now is build mkxp-z itself.
# Export the variables necessary to find the stuff we built
source vars.sh
# Configure the build
cd ..; meson build
# Build the thing
cd build && ninja
# Copy dependent libraries to the same folder
# for fun and profit
cp ${MKXPZ_PREFIX}/bin/x64-msvcrt-ruby310.dll $PWD
cp /mingw64/bin/zlib1.dll $PWD
# Strip it to save space
strip mkxp-z.exe
# Feast your eyes upon your work
start .
Packaging (Linux)
You have two options for grouping everything together to distribute: loose files or AppImage.
This will set up the executable to load dependencies from an adjacent lib
/lib64
folder, so that it is easier to distribute.
# Set up the build to install everything locally
meson configure --bindir=. --prefix=$PWD/local
# Do the thing
ninja install
# See the thing
xdg-open $PWD/local
Last updated