- Install wsl and ubuntu (use wsl2):
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common qemu-user-static debootstrap
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install docker-ce -y
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
sudo qemu-debootstrap --arch arm64 bookworm /mnt/data/arm64 http://deb.debian.org/debian/
-- Use bullseye instead of bookworm if building compatibility.
Note: The folder /mnt/data/arm64
can be modified, for example to /mnt/data/bookworm-arm64
. This is useful if you like to maintain multiple chroots.
sudo chroot /mnt/data/arm64/`
apt -y install wget gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libglew-dev
wget https://github.com/Kitware/CMake/releases/download/v3.24.4/cmake-3.24.4-linux-aarch64.sh
chmod +x cmake-3.24.4-linux-aarch64.sh
./cmake-3.24.4-linux-aarch64.sh --prefix=/usr
echo 'export PATH=/usr/cmake-3.24.4-linux-aarch64/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Note: You may need to build and install tinyxml2 from source
git clone https://github.com/HarbourMasters/2ship2harkinian.git && cd 2ship2harkinian
git checkout tags/x.x.x
git submodule update --init --recursive
cmake -H. -Bbuild-cmake -GNinja -DUSE_OPENGLES=1 -DBUILD_CROWD_CONTROL=0 -DCMAKE_BUILD_TYPE=Release
cmake --build build-cmake --config Release --target Generate2ShipOtr -j$(nproc)
cmake --build build-cmake --config Release -j$(nproc)
cd build-cmake/mm
strip 2s2h.elf
mv 2s2h.elf performance.elf
-- Or compatibility.elf if you built on bullseye.- Copy the
.elf
toroms/ports/soh2/bin/
and copy2ship.o2r
toroms/ports/soh2
. - Copy the
build-cmake/assets
folder toports/soh2
and copybuild-cmake/ZAPD/ZAPD.out
toports/soh2/assets/extractor
. - If the build is a new version open
ports/soh2/assets/extractor/otrgen.txt
and edit--portVer
around Line 33.