OdbDesign ODB++ Parser

REST API and C++ library for parsing ODB++ Design archives

View the Project on GitHub nam20485/OdbDesign

Linux Setup Script

The scripts/setup-linux.sh script provides an automated way to set up a complete development environment for OdbDesign on Linux systems.

⚠️ Security Warning

Running scripts from the internet can execute arbitrary code on your system! Always approach with caution and verify scripts are safe before running them on your own system. Since this script is open-source, you can view the entire contents at: https://github.com/nam20485/OdbDesign/blob/main/scripts/setup-linux.sh

We encourage you to review the script for yourself before running it to ensure it meets your security requirements.

Features

Quick Start

# Clone the repository
git clone https://github.com/nam20485/OdbDesign.git
cd OdbDesign

# Run the setup script
./scripts/setup-linux.sh

That’s it! The script will handle everything automatically.

Usage Options

./scripts/setup-linux.sh [OPTIONS]

OPTIONS:
    -h, --help              Show help message
    -d, --debug             Build in Debug mode (default: Release)
    -t, --tests             Build and run tests
    --no-docker             Skip Docker installation
    --skip-build            Only install dependencies, skip building
    --vcpkg-dir DIR         Custom vcpkg installation directory (default: ~/vcpkg)

Examples

# Basic setup and build
./scripts/setup-linux.sh

# Debug build with tests
./scripts/setup-linux.sh --debug --tests

# Skip Docker installation  
./scripts/setup-linux.sh --no-docker

# Only install dependencies, don't build
./scripts/setup-linux.sh --skip-build

# Use custom vcpkg directory
./scripts/setup-linux.sh --vcpkg-dir /opt/vcpkg

What the Script Does

  1. Detects your Linux distribution and selects appropriate package manager
  2. Installs system dependencies including:
    • Build tools (gcc, g++, make)
    • CMake and Ninja build system
    • Git, curl, zip utilities
    • pkg-config
    • Docker (optional)
  3. Sets up vcpkg by cloning and bootstrapping the Microsoft vcpkg package manager
  4. Configures environment by adding VCPKG_ROOT to your shell profile
  5. Builds the project using the appropriate CMake preset
  6. Runs tests (if requested)
  7. Verifies installation to ensure everything is working correctly

Supported Distributions

Requirements

Troubleshooting

If the script fails:

  1. Check the error message - the script provides detailed error information
  2. Verify internet connectivity - vcpkg needs to download packages
  3. Ensure you have sudo access - system packages require root privileges
  4. Check disk space - the build process requires several GB of space

Manual Alternative

If you prefer manual setup, see the BUILD.md documentation for step-by-step instructions.