From b1478571a4d3b17aa4fac9a80410e5899af2c9ee Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Wed, 24 Jan 2024 19:32:51 +0100 Subject: [PATCH 1/2] add devcontainer --- .devcontainer/Dockerfile | 78 +++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 34 ++++++++++++++ docker-compose.yaml | 4 ++ 3 files changed, 116 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 docker-compose.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..66eb020007 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,78 @@ +FROM ubuntu:22.04 + +RUN apt update;\ + apt install --yes software-properties-common; \ + apt update +RUN DEBIAN_FRONTEND=noninteractive apt install --yes \ + autoconf \ + automake \ + bison \ + build-essential \ + ccache \ + clang-15 \ + freeglut3-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavformat-dev \ + libcpptest-dev \ + libcurl4-openssl-dev \ + libfreetype6-dev \ + libgif-dev \ + libgsf-1-dev \ + libjpeg-dev \ + liblua5.2-dev \ + libluabind-dev \ + liblzma-dev \ + libmysqlclient-dev \ + libogg-dev \ + libopenal-dev \ + libpng-dev \ + libpostproc-dev \ + libsquish-dev \ + libssl-dev \ + libswscale-dev \ + libvorbis-dev \ + libxml2-dev \ + mingw-w64 \ + mingw-w64-tools \ + ninja-build \ + qtbase5-dev \ + qttools5-dev \ + qttools5-dev-tools \ + libqtpropertybrowser-dev \ + qt6-base-dev \ + qt6-l10n-tools \ + qt6-tools-dev \ + qt6-tools-dev-tools + + +RUN apt install --yes \ + doxygen \ + gdb \ + git \ + graphviz \ + libxrandr-dev \ + wget + +# work arround as there is no debug version available +RUN cp /lib/x86_64-linux-gnu/libcpptest.so /lib/x86_64-linux-gnu/libcpptestd.so + +RUN wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \ + && mkdir --parents "$CMAKE_INSTALL_DIR" \ + && sh /tmp/cmake.sh --skip-license --prefix="$CMAKE_INSTALL_DIR" \ + && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/cmake" /usr/local/bin/cmake + +ARG CMAKE_VERSION=3.27.9 +ARG CMAKE_INSTALL_DIR=/opt/cmake-$CMAKE_VERSION +ARG USERNAME=ryzom +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ + && apt-get update \ + && apt-get install --yes sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME + +USER $USERNAME diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..38abcc0097 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +{ + "build": { + "dockerfile": "Dockerfile" + }, + "containerUser": "ryzom", + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools-extension-pack" + ], + "settings": { + "cmake.configureArgs": [ + "-DWITH_STATIC=ON", + "-DWITH_NEL_TESTS=OFF", + "-DWITH_NEL_SAMPLES=ON", + "-DWITH_LUA51=OFF", + "-DWITH_LUA52=ON", + "-DWITH_RYZOM=ON", + "-DWITH_RYZOM_SERVER=ON", + "-DWITH_RYZOM_CLIENT=ON", + "-DWITH_RYZOM_TOOLS=ON", + "-DWITH_NEL_TOOLS=ON", + "-DWITH_NELNS=ON", + "-DWITH_NELNS_LOGIN_SYSTEM=ON", + "-DWITH_NELNS_SERVER=ON", + "-DWITH_QT5=ON", + "-DWITH_LIBGSF=ON", + "-DWITH_MONGODB=OFF", + "-DWITH_PCH=OFF" + ] + } + } + } +} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000..023fe9df5e --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,4 @@ +services: + devcontainer: + image: "ryzomcore/devcontainer" + build: ./.devcontainer From d11b716b4e3e8bf97de43e87f84bf975531594d0 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 17:14:46 +0100 Subject: [PATCH 2/2] adjust devcontainer --- .devcontainer/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 66eb020007..cf9ba3f2be 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,9 +1,8 @@ FROM ubuntu:22.04 -RUN apt update;\ - apt install --yes software-properties-common; \ - apt update -RUN DEBIAN_FRONTEND=noninteractive apt install --yes \ +RUN apt update; \ + DEBIAN_FRONTEND=noninteractive \ + apt install --yes \ autoconf \ automake \ bison \ @@ -57,10 +56,6 @@ RUN apt install --yes \ # work arround as there is no debug version available RUN cp /lib/x86_64-linux-gnu/libcpptest.so /lib/x86_64-linux-gnu/libcpptestd.so -RUN wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \ - && mkdir --parents "$CMAKE_INSTALL_DIR" \ - && sh /tmp/cmake.sh --skip-license --prefix="$CMAKE_INSTALL_DIR" \ - && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/cmake" /usr/local/bin/cmake ARG CMAKE_VERSION=3.27.9 ARG CMAKE_INSTALL_DIR=/opt/cmake-$CMAKE_VERSION @@ -68,6 +63,11 @@ ARG USERNAME=ryzom ARG USER_UID=1000 ARG USER_GID=$USER_UID +RUN wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \ + && mkdir --parents "$CMAKE_INSTALL_DIR" \ + && sh /tmp/cmake.sh --skip-license --prefix="$CMAKE_INSTALL_DIR" \ + && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/cmake" /usr/local/bin/cmake + RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ && apt-get update \