Skip to content

Commit

Permalink
setup devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
RadWolfie committed Feb 21, 2024
1 parent e91ed08 commit e615401
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ghcr.io/xboxdev/nxdk:latest

# NOTE: curl-dev is require to workaround unknown option failure from libcurl (assumed is old version)
RUN apk add build-base ninja zip unzip curl-dev curl git

# Initial env variable for vcpkg path
ENV VCPKG_ROOT="/usr/local/vcpkg"
ENV PATH="${PATH}:${VCPKG_ROOT}"

# Install vcpkg
RUN git clone https://github.com/microsoft/vcpkg ${VCPKG_ROOT} \
&& ${VCPKG_ROOT}/bootstrap-vcpkg.sh

# Include missing path to nxdk's bin directory.
ENV PATH="${NXDK_DIR}/bin:${PATH}"
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Xbox Development",

"build": {
"dockerfile": "Dockerfile"
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"ms-vscode.makefile-tools"
]
}
}
}
22 changes: 22 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"configurations": [
{
"name": "nxdk",
"includePath": [
"${default}",
"${NXDK_DIR}/lib",
"${NXDK_DIR}/lib/pdclib/include",
"${NXDK_DIR}/lib/pdclib/platform/xbox/include",
"${NXDK_DIR}/lib/winapi",
"${NXDK_DIR}/lib/xboxrt/libc_extensions",
"${NXDK_DIR}/lib/xboxrt/vcruntime"
],
"compilerArgs": [
"-fms-extensions"
],
"compilerPath": "${NXDK_DIR}/bin/nxdk-cc",
"intelliSenseMode": "windows-clang-x86"
}
],
"version": 4
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"C_Cpp.autoAddFileAssociations": false,
"C_Cpp.default.includePath": [
"${workspaceFolder}/src"
],
"files.exclude": {
"**/*.d": true,
"**/*.obj": true
}
}

0 comments on commit e615401

Please sign in to comment.