Merge branch '4jcraft:dev' into dev

This commit is contained in:
JuiceyDev 2026-03-06 17:05:35 +01:00 committed by GitHub
commit ff3b7789d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 65 additions and 1 deletions

36
.devcontainer/Dockerfile Normal file
View file

@ -0,0 +1,36 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04
ENV DEBIAN_FRONTEND=noninteractive
# Dependencies
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get update \
&& apt-get install -y \
build-essential \
cmake \
libglfw3-dev \
libgl-dev \
libglu1-mesa-dev \
libopenal-dev \
libvorbis-dev \
libpng-dev \
libpthread-stubs0-dev \
lld \
meson \
ninja-build \
gcc-15 \
g++-15 \
# Clean up lol
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Set GCC 15 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 100 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100
ENV DEBIAN_FRONTEND=dialog

View file

@ -0,0 +1,17 @@
{
"name": "4JCraft Dev Container",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"mesonbuild.mesonbuild"
]
}
},
"remoteUser": "vscode"
}

View file

@ -32,7 +32,7 @@ sudo apt install \
build-essential cmake \
libglfw3-dev libgl-dev libglu1-mesa-dev \
libopenal-dev libvorbis-dev \
libpthread-stubs0-dev
libpng-dev libpthread-stubs0-dev
```
On Arch/Manjaro:
@ -43,6 +43,17 @@ sudo pacman -S base-devel gcc pkgconf cmake glfw-x11 mesa openal libvorbis glu
If you are on wayland, you may swap `glfw-x11` to `glfw-wayland` for native wayland windowing instead of xwayland.
On Docker:
If you don't want to deal with installing dependencies, you can use the included devcontainer. Open the project in VS Code with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension and it will set everything up for you — GCC 15, Meson, Ninja, lld, and all the libraries.
Alternatively, you can build and use the container manually:
```bash
docker build -t 4jcraft-dev .devcontainer/
docker run -it -v $(pwd):/workspaces/4jcraft -w /workspaces/4jcraft 4jcraft-dev bash
```
### Configure & Build
> [!IMPORTANT]