etc/scripts/ce-properties-wizard/README.md
An interactive command-line tool for adding custom compilers to your local Compiler Explorer installation.
The wizard requires Python 3.10+ and uv. The run scripts handle all setup automatically.
Run without arguments for a fully interactive experience:
Linux/macOS:
./run.sh
Windows:
.\run.ps1
Provide a compiler path to skip the first prompt:
Linux/macOS:
./run.sh /usr/local/bin/g++-13
Windows:
.\run.ps1 "C:\MinGW\bin\g++.exe"
Use command-line flags to automate the process:
Linux/macOS:
./run.sh /usr/local/bin/g++-13 --yes
Windows:
.\run.ps1 "C:\MinGW\bin\g++.exe" --yes
Linux/macOS:
./run.sh /path/to/compiler \
--id custom-gcc-13 \
--name "GCC 13.2.0" \
--group gcc \
--options "-std=c++20" \
--language c++ \
--yes
Windows:
.\run.ps1 "C:\path\to\compiler.exe" `
--id custom-gcc-13 `
--name "GCC 13.2.0" `
--group gcc `
--options "-std=c++20" `
--language c++ `
--yes
Automatically discover and add all compilers in your PATH:
./auto_discover_compilers.py --dry-run # Preview what would be found
./auto_discover_compilers.py --languages c++,rust # Add only C++ and Rust compilers
./auto_discover_compilers.py --yes # Add all found compilers automatically
Add multiple compilers with a simple loop:
Linux/macOS:
for compiler in /opt/compilers/*/bin/*; do
./run.sh "$compiler" --yes
done
Windows:
Get-ChildItem "C:\Compilers\*\bin\*.exe" | ForEach-Object {
.\run.ps1 $_.FullName --yes
}
COMPILER_PATH: Path to the compiler executable (optional in interactive mode)--id: Compiler ID (auto-generated if not specified)--name: Display name for the compiler--group: Compiler group to add to (e.g., gcc, clang)--options: Default compiler options--language: Programming language (auto-detected if not specified)--yes, -y: Skip confirmation prompts--non-interactive: Run in non-interactive mode with auto-detected values--config-dir: Path to etc/config directory (auto-detected if not specified)--verify-only: Only detect and display compiler information without making changes--list-types: List all supported compiler types and exit--reorganize LANGUAGE: Reorganize an existing properties file for the specified language--validate-discovery: Run discovery validation to verify the compiler is detected (default for local environment)--env ENV: Environment to target (local, amazon, etc.) - defaults to 'local'--sdk-path: Windows SDK base path for MSVC compilers (e.g., D:/efs/compilers/windows-kits-10)The wizard currently supports:
Systems Languages:
Popular Compiled Languages:
Functional Languages:
.NET Languages:
Scripting/Dynamic Languages:
Other Languages:
The wizard attempts to detect compiler type by running version commands:
--version--version--version/help--version--versionversion--versionIf detection fails, you can manually specify the compiler type.
When adding MSVC compilers, the wizard automatically configures additional tools:
undname.exe from the MSVC installation pathdemanglerType=win32 and demangler=<path-to-undname.exe>llvm-objdump.exe if available in the MSVC installationllvm-objdump.exe is foundobjdumperType=llvm and objdumper=<path-to-llvm-objdump.exe>--sdk-path to specify SDK path non-interactivelyWindows (Interactive):
.\run.ps1 "D:\efs\compilers\msvc-2022-ce\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"
Windows (Non-Interactive):
.\run.ps1 "D:\efs\compilers\msvc-2022-ce\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe" `
--sdk-path "D:\efs\compilers\windows-kits-10" `
--non-interactive
The wizard will automatically configure:
D:/efs/compilers/msvc-2022-ce/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/undname.exeD:/efs/compilers/msvc-2022-ce/VC/Tools/Llvm/x64/bin/llvm-objdump.exe (if available)The wizard modifies <language>.local.properties files in etc/config/. It:
Linux/macOS:
./run.sh /opt/gcc-13.2.0/bin/g++
Windows:
.\run.ps1 "C:\TDM-GCC-64\bin\g++.exe"
Linux/macOS:
./run.sh /usr/bin/arm-linux-gnueabihf-g++ \
--name "ARM GCC 11.2" \
--group arm-gcc \
--yes
Windows:
.\run.ps1 "C:\arm-toolchain\bin\arm-none-eabi-g++.exe" `
--name "ARM GCC 11.2" `
--group arm-gcc `
--yes
Linux/macOS:
./run.sh /usr/local/bin/python3.12 --yes
Windows:
.\run.ps1 "C:\Python312\python.exe" --yes
Linux/macOS:
./run.sh /usr/bin/g++-13 --verify-only
Windows:
.\run.ps1 "C:\MinGW\bin\g++.exe" --verify-only
Linux/macOS:
./run.sh --list-types
Windows:
.\run.ps1 --list-types
This will output something like:
Detected compiler information:
Path: /usr/bin/g++-13
Language: C++
Compiler Type: gcc
Version: 13.2.0
Semver: 13.2.0
Suggested ID: custom-gcc-13-2-0
Suggested Name: GCC 13.2.0
Suggested Group: gcc
If the wizard can't detect your compiler type, it will prompt you to select one manually.
Ensure you have write permissions to the etc/config directory.
If validation reports errors, check the generated properties file for syntax issues. You can run npm run test:props to validate all property files.
To contribute to the wizard:
./run.sh --format./run.sh --format --checkuv run pytest (after uv sync --all-extras)The --format flag runs black, ruff, and pytype formatters on the codebase.