diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4f34e9168a28b0d88759984809449040353c5da2 --- /dev/null +++ b/.devcontainer/.gitignore @@ -0,0 +1 @@ +Sic* diff --git a/.devcontainer/DockerFile b/.devcontainer/DockerFile new file mode 100644 index 0000000000000000000000000000000000000000..d9b10caa3af40e90cdea0a9d9a7bfb4894f47a3d --- /dev/null +++ b/.devcontainer/DockerFile @@ -0,0 +1,29 @@ +FROM rocker/geospatial:4.3.2 + +RUN apt-get update \ + && DEBIAN_FRONTEND="noninteractive" apt-get install -y --install-recommends \ + gnupg \ + && rm -rf /var/lib/apt/lists/* + +# Install wine +ARG WINE_BRANCH="stable" +RUN wget -nv -O- https://dl.winehq.org/wine-builds/winehq.key | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ + && echo "deb https://dl.winehq.org/wine-builds/ubuntu/ $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2) main" >> /etc/apt/sources.list \ + && dpkg --add-architecture i386 \ + && apt-get update \ + && DEBIAN_FRONTEND="noninteractive" apt-get install -y --install-recommends \ + winehq-${WINE_BRANCH} \ + && rm -rf /var/lib/apt/lists/* + +# Install winetricks +RUN wget -nv -O /usr/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/bin/winetricks + +ENV XVFB_RESOLUTION 320x240x8 +ENV XVFB_SCREEN 0 +ENV XVFB_SERVER :95 +RUN nohup /usr/bin/Xvfb "${XVFB_SERVER}" -screen "${XVFB_SCREEN}" "${XVFB_RESOLUTION}" >/dev/null 2>&1 & + +# Install SIC +COPY Sic542a1 /sic/ +RUN mv sic/exe/extra/ithea.dll /sic/exe/. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000000000000000000000000000000..a5208600c158d69ca128f8de83516d9ae13ef1ce --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "SIC²", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + //"image": "geaucassiopee/ci-cd-cross-platform-webapp:v3", + "build": { "dockerfile": "./Dockerfile" }, + "customizations": { + "vscode": { + "extensions": [ + "janisdd.vscode-edit-csv", + "eamodio.gitlens", + "streetsidesoftware.code-spell-checker", + "streetsidesoftware.code-spell-checker-french", + "REditorSupport.r" + ] + } + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "R -q -e 'install.packages(c(\"languageserver\"));remotes::install_deps(dep = TRUE)'", + "postStartCommand": "R -q -e 'devtools::install(dependencies = TRUE)'" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +}