Tepiloxtl @ Neocities~:Golden Age Minecraft/
> Mappers/c10t
Created: 06.03.2024Updated: 06.03.2024
Copy of Github source at commit 1df97e869a1fe3c57773f407feedf17cb5b6cd32
Build instructions on Debian 12
# setup
sudo apt-get install build-essential cmake libpng-dev zlib1g-dev
libboost-all-dev libfreetype6-dev git
# clone repo and reset to commit for b173
git clone https://github.com/udoprog/c10t && cd c10t
git reset --hard 1df97e869a1fe3c57773f407feedf17cb5b6cd32
# change CMakeLists to conform with new stuff, and make so code
need not conform with new stuff lol
sed -i 's|CMAKE_SOURCE_DIR}/cmake/modules;${||g' CMakeLists.txt
sed -i 's|FreeType REQUIRED|Freetype REQUIRED|g' CMakeLists.txt
sed -i '36i set(CMAKE_CXX_FLAGS "-fpermissive -std=c++14")'
CMakeLists.txt
# fix for change in math or smth
sed -i 's|abs(x2-x1)|abs(int(x2-x1))|g' src/image/image_base.cpp
sed -i 's|abs(y2-y1)|abs(int(y2-y1))|g' src/image/image_base.cpp
# add this file cos it doesnt exist?
cat >>src/image/format/base.hpp <<'EOF'
#ifndef _IMAGE_FORMAT_BASE_HPP_
#define _IMAGE_FORMAT_BASE_HPP_
#include <exception>
class format_exception : public std::exception
{
private:
const char* why;
public:
format_exception(const char* why) : why(why) { }
const char* what() throw() {
return this->why;
}
};
#endif /* _IMAGE_FORMAT_BASE_HPP_ */
EOF
# build time!
mkdir build && cd build
cmake ..
make c10t
This makes a dynamic-linked (probably?) Linux executable that can read and make maps of Beta 1.7.3 worlds.
Further on, in dist/ directory of the repo there are instructions and makefiles for crosscompiling c10t to other platforms, but I could not make it work, in both cases I managed to get as far as linker step of make before it crashed hard... Tried it both from Debian with mingw and from Windows using MSYS2 MINGW64. You can see my .bash_history from MSYS2 here if you want to learn what I tried? It doesn't tell the full story, but I'm tired of it for now. Theres a make.sh inside dist/ that you call from root directory with name of platform you want to build for. You will probably have to adjust the makefile and config.mk files to point to proper libraries as at least for me they were different from what was set up.