See doc/help.txt: https://github.com/Chasyxx/chtracker/blob/main/doc/help.txt. It says hi!
- SDL2 (
sudo apt-get install libsdl2-dev
orsudo pacman -S sdl2
) - libfmt (
sudo apt-get install libfmt-dev
orsudo pacman -S fmt
)
Ensure you're in the source tree (the directory contaaining src
, not src
itself).
./configure
- This sets everything up for you.
- If you have MinGW-w64 and want to make a Windows build, try the below command instead. It assumes you cross-compiled SDL statically to
$HOME/.local/sdl2-mingw-w64
, and libfmt to$HOME/.local/fmt-mingw-w64
. You can change these paths if needed.
make clean all
- Time to build the source tree!
Now you have chtracker
or chtracker.exe
.
# Example windows cross compilation command
CFLAGS="-O2 -I$HOME/.local/{sdl2,fmt}-mingw-w64/include/ -Dmain=SDL_main -I$PWD/src/headers -Wall -Wextra -Werror" LIBS="$($HOME/.local/sdl2-mingw-w64/bin/sdl2-config --libs) -L$HOME/.local/fmt-mingw-w64/lib/ -lfmt --static" CC="x86_64-w64-mingw32-gcc -c" CXX="x86_64-w64-mingw32-g++ -c" CCLD=x86_64-w64-mingw32-g++ RES=x86_64-w64-mingw32-windres ./configure --disable-sdl --icon
# big command!
After configuring, you'll need to do some things to ensure you don't get any errors that shouldn't be there:
- Add the headers folder (run
echo $(pwd)/src/headers
to get a path) to your include path (This is just for the language server, the build itself has this done by the configure script) make font
removes an error invisual.o
aboutfont.i
not existing.