Getting Started - hikawi/cc-sakura GitHub Wiki
I want to program!
This project is built in pure C language and build tool CMake. For consistency among all contributors (me, my personal PC on Windows, and that personal PC's WSL), we're using vendored libraries in this project. It seems like a proper and an acceptable way to setup a CMake project.
Clone this repository:
git clone https://github.com/hikawi/cc-sakura --recurse-submodules
It should install all submodules, including the one vendored in by SDL themselves. But if they're not (cause they hate you), you can trigger some downloads by using their provided scripts.
./vendored/SDL/external/download.sh
./vendored/SDL_image/external/download.sh
./vendored/SDL_mixer/external/download.sh
./rendered/SDL_ttf/external/download.sh
Now it should be ready to be setup. You can build it directly like this:
cmake -S . -B build -G "YOUR_BUILD_TYPE"
cmake --build build
The binary should be created in build/bin for you. To package it into something you can give to others to run, there are also scripts present within ./scripts. You can pick the one for your OS and run it at the project's directory.
Linux Building
SDL3 requires some libraries itself to even run. This was taken from SDL's repository.
sudo apt-get install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev
Ubuntu 22.04+ can also add libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev to that command line.
For other distributions, there are similar commands on SDL's intro page.
MacOS
brew install pkg-config
Windows
You need some packages on Windows, I recommend Chocolatey and VCPKG.
This is to install Chocolatey, ignore if you already got it. This should be ran in an administrative PowerShell terminal.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Install CMake (the C -> Ninja build tool) & Ninja (the Ninja -> exe build tool)
choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y ninja
refreshenv
Install VCPKG (package manager for C/C++, made by Microsoft)
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat -disableMetrics
./vcpkg/vcpkg.exe integrate install
./vcpkg/vcpkg.exe install freetype harfbuzz
Remember to add that vcpkg folder into your environment's PATH variable, so you can use vcpkg command anywhere.
cmake -S . -B build -G Ninja -DCMAKE_CXX_FLAGS="-Wa,-mbig-obj" -DCMAKE_TOOLCHAIN_FILE="THAT_VCPKG_FOLDER_PATH\scripts\buildsystems\vcpkg.cmake"
cmake --build build
Make sure to replace THAT_VCPKG_FOLDER_PATH with the directory path you installed vcpkg in. Now a .exe file should be placed in the build/bin folder.
I just want to run!
You can check out binaries built by Github Actions in the releases page. At the time of writing this, I have not checked that Linux binaries will run.
MacOS Issues
MacOS will always throw an error and refuse to run the application because I'm not paying $100 for a Developer Account. The way around this is to run it, then go into Settings > Privacy, and there should be a message that says along the lines of "Security blocked an app from running". If you trust me, you can choose to allow it to run anyway, and ignore MacOS's security measures.