Skip to content

Commit

Permalink
Dev/devcontainer (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKilipenko authored May 14, 2024
1 parent e8ffd7c commit 5c511a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
21 changes: 0 additions & 21 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,3 @@ RUN if [ "${REINSTALL_CLANG_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-clang.sh && /tmp/reinstall-clang.sh ${REINSTALL_CLANG_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-clang.sh

ARG LIBS_DIR=/usr/local/lib
ARG ANTLR_SRC=/usr/local/src
ARG ANTLR_RUNTIME=${ANTLR_SRC}/antlr4/runtime/Cpp

# Add ANTLR4 JAR file
ADD https://www.antlr.org/download/antlr-4.13.1-complete.jar /tmp/antlr-4.13.1-complete.jar
RUN cp /tmp/antlr-4.13.1-complete.jar ${LIBS_DIR}/antlr-4.13.1-complete.jar && \
rm /tmp/antlr-4.13.1-complete.jar

# Download and build C++ ANTLR4 runtime
RUN git clone https://github.com/antlr/antlr4.git ${ANTLR_SRC}/antlr4
RUN mkdir ${ANTLR_RUNTIME}/build && \
cd ${ANTLR_RUNTIME}/build && \
cmake .. && \
make && \
make install

# Set environment variables
ENV CLASSPATH=".:${LIBS_DIR}/antlr-4.13.1-complete.jar:$CLASSPATH"
ENV PATH="${ANTLR_RUNTIME}/build/bin:$PATH"
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd"
"llvm-vs-code-extensions.vscode-clangd",
"streetsidesoftware.code-spell-checker",
"donjayamanne.githistory"
]
}
}
Expand Down
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"recommendations": [
"ms-vscode.cpptools",
"josetr.cmake-language-support-vscode"
"josetr.cmake-language-support-vscode",
"llvm-vs-code-extensions.vscode-clangd",
"streetsidesoftware.code-spell-checker",
"donjayamanne.githistory",
"jeff-hykin.better-cpp-syntax"
]
}

0 comments on commit 5c511a7

Please sign in to comment.