aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-08-12 12:10:00 +0000
committersaturneric <[email protected]>2024-08-12 12:10:00 +0000
commit96e7bb95d73a4562505ab1832c808bd6f1e563a5 (patch)
tree05e742d5626aaf400d2e83fc38ff253447bbc33b
parentfeat: more customization and fix post create commands (diff)
downloadGpgFrontend-96e7bb95d73a4562505ab1832c808bd6f1e563a5.tar.gz
GpgFrontend-96e7bb95d73a4562505ab1832c808bd6f1e563a5.zip
feat: setup vnc support and post-create.sh
-rw-r--r--.devcontainer/devcontainer.json32
-rw-r--r--.devcontainer/post-create.sh12
2 files changed, 26 insertions, 18 deletions
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index bab59d2d..372e62af 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -4,7 +4,7 @@
"name": "C++",
"hostRequirements": {
"cpus": 4,
- "memory": "8gb",
+ "memory": "16gb",
"storage": "32gb"
},
"build": {
@@ -12,23 +12,15 @@
},
"features": {
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {},
- "ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {}
- },
-
- // 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": [],
-
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
- // "remoteUser": "root"
-
- "postCreateCommand": {
- "git": "git submodule update --recursive --init",
- "build": "cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug",
- "clangd": "ln -s build/compile_commands.json $(pwd)/compile_commands.json"
+ "ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
+ "ghcr.io/devcontainers/features/desktop-lite:1": {}
},
+ "forwardPorts": [6080],
+ "portsAttributes": {
+ "6080": {
+ "label": "desktop"
+ }
+ },
"customizations": {
"vscode": {
"extensions": [
@@ -44,6 +36,10 @@
"yzhang.markdown-all-in-one",
"stkb.rewrap"
]
+ },
+ "settings": {
+ "clangd.path": "/usr/bin/clangd"
}
- }
+ },
+ "postCreateCommand": "bash .devcontainer/post-create.sh"
}
diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh
new file mode 100644
index 00000000..0d8411d6
--- /dev/null
+++ b/.devcontainer/post-create.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+git submodule update --recursive --init
+cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
+ln -s build/compile_commands.json $(pwd)/compile_commands.json
+
+# gather informations
+PROJECT_VERSION=$(cmake --system-information | awk -F= '$1~/CMAKE_PROJECT_VERSION:STATIC/{print$2}')
+
+# modules development
+cmake -B build-sdk -G Ninja -DCMAKE_BUILD_TYPE=Debug -DGPGFRONTEND_BUILD_TYPE_ONLY_SDK=On -DCMAKE_INSTALL_PREFIX=$pwd/modules/sdk/$PROJECT_VERSION
+cmake -B modules/build -S modules -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$pwd/build/artifacts \ No newline at end of file