-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch-devbench.sh
More file actions
executable file
·77 lines (62 loc) · 2.12 KB
/
launch-devbench.sh
File metadata and controls
executable file
·77 lines (62 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# C++ Heavy Development Environment Launcher
# Launches the devcontainer for C++ development
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
print_info() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
print_error "Docker is not running. Please start Docker first."
exit 1
fi
# Check if VS Code is installed
if ! command -v code &> /dev/null; then
print_error "VS Code is not installed or not in PATH."
print_info "Please install VS Code and the Dev Containers extension."
exit 1
fi
# Check for Dev Containers extension
print_info "Checking for VS Code Dev Containers extension..."
# Get the script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
print_info "🚀 Launching C++ Heavy Development Environment..."
print_info "This will build and start the devcontainer if needed."
# Change to the script directory
cd "$SCRIPT_DIR"
# Launch VS Code with devcontainer
print_info "Opening VS Code devcontainer..."
code .
print_success "C++ Heavy Development Environment launched!"
print_info "VS Code should open the devcontainer automatically."
print_info ""
print_info "📚 Quick Start:"
print_info " 1. Wait for the container to build (first time only)"
print_info " 2. Open terminal in VS Code"
print_info " 3. Navigate to sample project: cd /workspace/projects/sample-cpp"
print_info " 4. Build sample project: ./build.sh"
print_info ""
print_info "🔧 Environment Features:"
print_info " • GCC 12 and Clang 15 compilers"
print_info " • CMake and Ninja build systems"
print_info " • vcpkg and Conan package managers"
print_info " • GDB, Valgrind, and static analysis tools"
print_info " • Google Test framework"
print_info " • Full VS Code C++ extension suite"
print_info ""
print_info "📖 For troubleshooting, see .devcontainer/BUILD_FIXES.md"