mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-27 11:33:35 +00:00
Merge branch '4jcraft:dev' into dev
This commit is contained in:
commit
ff3b7789d5
36
.devcontainer/Dockerfile
Normal file
36
.devcontainer/Dockerfile
Normal 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
|
||||
17
.devcontainer/devcontainer.json
Normal file
17
.devcontainer/devcontainer.json
Normal 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"
|
||||
}
|
||||
13
README.md
13
README.md
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue