Comprehensive build and utility scripts for the CS2 External Cheat project, featuring automated pipelines, error handling, and cross-platform compatibility.
| Script | Purpose | Features |
|---|---|---|
build.sh |
Application compilation | MSBuild integration, Debug/Release modes, error filtering |
dump.sh |
Memory offset generation | Multi-method execution, verification, background processing |
update-dumper.sh |
Dumper maintenance | GitHub API integration, certificate handling, progress tracking |
run.sh(Root) - Complete automation pipeline with intelligent workflow management
# Build application with specific configuration
./scripts/build.sh # Release build (default)
./scripts/build.sh --debug # Debug build with symbols
# Generate fresh memory offsets
./scripts/dump.sh # Requires CS2 running + admin privileges
# Update dumper tool
./scripts/update-dumper.sh # Downloads latest from GitHub# Full automated pipeline
./run.sh --build # Force rebuild with fresh offsets
# Quick launch mode
./run.sh # Skip dumper, use existing build
# First-time setup
git clone <repo> && cd External-cheat && ./run.sh --build- 🔧 Modular Design - Single responsibility per script
- ⚡ Error Recovery - Graceful failure handling with user choices
- 🌍 Cross-Platform - Git Bash, WSL, Linux compatibility
- 📊 User Feedback - Step-by-step progress with clear status indicators
- 🔄 Background Processing - Non-blocking operations where appropriate
All scripts implement:
- Configuration validation before execution
- Environment checks for required tools
- Progress tracking with visual indicators
- Error handling with actionable recovery options
- Summary reporting with completion status
Purpose: Compile the CS2 External Cheat using MSBuild
Features:
- Automatic MSBuild detection (
msbuild/msbuild.exe) - Configuration selection (Release/Debug)
- Build output filtering and error highlighting
- Post-build verification and launch options
- Clean build management with user prompts
Usage Examples:
./scripts/build.sh # Release build
./scripts/build.sh --debug # Debug build
./scripts/build.sh -d # Debug build (short form)Dependencies:
- MSBuild (Visual Studio Build Tools)
- Application.sln in project root
- Windows environment (MSVC compiler)
Purpose: Execute CS2 dumper to generate current memory offsets and signatures
Features:
- Multi-method execution for Windows compatibility
- Background process management with PID tracking
- Comprehensive output verification
- File listing with size information
- Fallback execution methods (direct, cmd, winpty)
Execution Methods:
- Direct execution (
./cs2-dumper.exe) - CMD wrapper (
cmd.exe //c) - WinPTY wrapper (
winpty ./cs2-dumper.exe) - CMD fallback (
cmd //c)
Usage Examples:
./scripts/dump.sh # Generate offsets (requires CS2 running)Dependencies:
- cs2-dumper.exe in Engine/GameDumper/
- CS2 process running
- Administrator privileges
- Windows environment
Output Location: Engine/GameDumper/Dumps/ (C++ header files)
Purpose: Download and update the CS2 dumper from GitHub releases
Features:
- GitHub API integration with latest release detection
- Certificate handling for Git Bash compatibility
- Progress indication during download
- File verification with size and timestamp
- Immediate execution option post-download
API Integration:
- Endpoint:
https://api.github.com/repos/a2x/cs2-dumper/releases/latest - Certificate handling with
--insecureflags - Timeout management (connect: 10s, download: 300s)
- JSON parsing for release tag extraction
Usage Examples:
./scripts/update-dumper.sh # Download latest dumperDependencies:
- curl command
- Internet connectivity
- GitHub API accessibility
- Write permissions to Engine/GameDumper/
Purpose: Complete automation pipeline with intelligent workflow management
Execution Modes:
- Build Mode (
--build,-b) - Force rebuild with fresh offsets - Quick Mode (no args) - Skip dumper operations, use existing build
- Full Mode (any other args) - Complete pipeline with user prompts
Workflow Logic:
- Status Assessment - Check existing application and dumps
- Dumper Management - Update and execute dumper if needed
- Build Management - Compile application with dependency checks
- Launch Preparation - CS2 detection and application launch
Smart Features:
- Dump requirement detection via source code scanning
- Forced dump generation for build dependencies
- CS2 process detection with external cheat messaging
- Cross-platform application launching
| Tool | Purpose | Detection Command |
|---|---|---|
| MSBuild | C++ compilation | msbuild --version |
| curl | GitHub API / Downloads | curl --version |
| tasklist | Process detection | tasklist | grep cs2.exe |
Scripts automatically detect:
- OSTYPE - Platform detection (msys, cygwin, linux)
- PATH - Tool availability checking
- Working Directory - Project root validation
Scripts automatically handle:
- Execute permissions on dumper (
chmod +x) - Directory creation (
mkdir -p) - Cross-platform path handling
MSBuild Not Found
# Install Visual Studio Build Tools
# Or run from Developer Command Prompt
# Verify: msbuild --versionDumper Execution Failures
# Run as Administrator (required for memory access)
# Ensure CS2 is running
# Check antivirus exclusions
# Verify dumper exists: ls -la Engine/GameDumper/cs2-dumper.exeDownload/Certificate Issues
# Scripts use --insecure flags for Git Bash compatibility
# Check internet connectivity
# Manual download: https://github.com/a2x/cs2-dumper/releases/latestBuild Failures
# Check if dumps are required but missing
# Verify Visual Studio installation
# Try debug build: ./scripts/build.sh --debugEnable verbose output for troubleshooting:
# Run individual scripts directly to see full output
bash -x ./scripts/build.sh # Trace execution
./scripts/dump.sh 2>&1 | tee dump.log # Capture output# Pre-commit hook example
#!/bin/bash
./scripts/build.sh --debug || exit 1Scripts can be integrated into IDEs:
- VS Code Tasks - Use run_in_terminal for build tasks
- Visual Studio - External tools integration
- Command Palette - Quick script execution
Scripts are designed for CI/CD integration:
- Exit codes for success/failure detection
- Automated dependency management
- Non-interactive execution modes
- Parallel Operations - Background dumper execution
- Cached Checks - Avoid redundant validations
- Selective Updates - Only download when needed
- Progress Feedback - Non-blocking user interactions
- Incremental Builds - MSBuild handles dependency tracking
- Parallel Compilation -
/mflag for multi-core builds - Configuration Caching - Persistent build settings
- Follow existing architecture patterns
- Implement comprehensive error handling
- Add progress indication and user feedback
- Test on multiple environments (Git Bash, WSL)
- Update this documentation
# Use consistent formatting
set -e # Exit on error
echo "🔧 Clear status messages" # Emoji indicators
local variable_name # Proper scoping
return 0 # Explicit return codes- Works in Git Bash on Windows
- Handles missing dependencies gracefully
- Provides clear error messages
- Follows existing UI patterns
- Includes comprehensive help text
💡 Tip: All scripts include built-in help and error recovery. When in doubt, just run the script - it will guide you through any issues!