Branch: CE-for-Win-Pascal-2025
This is a customized build of Compiler Explorer for local Windows deployment with commercial and open-source compilers. It is NOT intended for public cloud deployment.
This branch removes the hundreds of cloud-based compilers from the public Compiler Explorer and configures it to use:
- Commercial Compilers: Delphi (Embarcadero), C++Builder
- Free Pascal Compilers: Multiple FPC versions
- Open Source Compilers: Rust, Python (local installations)
-
Minimal Language Support (
lib/languages.ts)- Only includes: C++, Pascal, Rust, Python
- Full language list backed up in
lib/languages.ts.full-backup
-
Local Compiler Configurations (
etc/config/*.local.properties)- Pascal compilers (FPC + Delphi)
- C++ compilers (C++Builder, MinGW)
- Paths configured for Windows file system
-
TypeScript Modernization
- Migrated from 2021 JavaScript to 2025 TypeScript
- Better type safety and modern features
- Smart Pascal program/unit detection
- Node.js: Latest LTS version (v18+ recommended)
- npm: Latest version
- Compilers installed locally (see Configuration section)
-
Clone this branch:
git clone -b CE-for-Win-Pascal-2025 https://github.com/pmcgee69/compiler-explorer.git cd compiler-explorer -
Install dependencies:
npm install npm install -g webpack webpack-cli
-
Configure compilers (see Configuration section below)
-
Build:
npm run webpack
-
Start server:
npm start
-
Access: Browse to http://localhost:10240/
Edit etc/config/pascal.local.properties to configure your local installations:
compiler.fpc331.exe=C:\fpcupdeluxe\fpc\bin\x86_64-win64\fpc.exe
compiler.fpc322.exe=C:\FPC\3.2.2\bin\i386-win32\fpc.exe
# Add more FPC versions as needed# 32-bit Delphi
compiler.delphi27.exe=C:\Program Files (x86)\Embarcadero\Studio\21.0\Bin\DCC32.EXE
compiler.delphi27.name=x86 Delphi 10.4.2 Sydney
# 64-bit Delphi
compiler.delphi27_64.exe=C:\Program Files (x86)\Embarcadero\Studio\21.0\Bin\DCC64.EXE
compiler.delphi27_64.name=x64 Delphi 10.4.2 SydneyConfigure objdump for assembly output:
group.fpc.objdumper=C:\Program Files (x86)\Embarcadero\Dev-Cpp\TDM-GCC-64\bin\objdump.exe
group.delphi.objdumper=C:\Program Files (x86)\Embarcadero\Dev-Cpp\TDM-GCC-64\bin\objdump.exeEdit etc/config/c++.local.properties for C++Builder and other C++ compilers.
- Edit the appropriate
.local.propertiesfile - Follow the existing patterns for compiler groups
- Ensure paths use Windows format (
C:\...) - Test with
npm start
The current implementation includes smart program/unit detection:
pascal-utils.ts: Automatically detects whether source is aprogramorunit- Extracts program name from source code
- Handles both
.pas(units) and.dpr(programs) files - No hardcoded filenames - intelligent detection
Example:
program MyApp; // Detected as program, executable named "MyApp"unit MyUnit; // Detected as unit, wrapped in dummy project- C++: Full support with multiple compilers
- Pascal: FPC and Delphi with program/unit detection
- Rust: Local rustc installation
- Python: Local Python installation
To update this branch with latest improvements from public CE:
git checkout CE-for-Win-Pascal-2025
git fetch origin main
git merge origin/main
# Resolve conflicts in lib/languages.ts - keep your minimal version
# Test thoroughlyThis is more complex but gives cleaner history. See REBASE-NOTES.md for details.
When merging/rebasing, preserve these customizations:
lib/languages.ts- Your minimal language listetc/config/*.local.properties- Your compiler pathsWINDOWS-DEPLOYMENT.md- This documentation
These are the only files that differ significantly from main branch.
- Development mode:
npm run webpack:dev - Production build:
npm run webpack - Watch mode:
npm run webpack:watch
- All tests:
npm test - Minimal tests:
npm run test-min - TypeScript check:
npm run ts-check - Linting:
npm run lint
Always run before committing:
npm run ts-check
npm run lint
npm run test-minOr use the comprehensive check:
make pre-commitIssue: TypeScript compilation errors
- Solution: Run
npm run ts-checkto see detailed errors - Check that
lib/languages.tshas correct type definitions
Issue: Missing dependencies
- Solution: Delete
node_modulesand runnpm installagain
Issue: Compiler not found
- Solution: Check paths in
.local.propertiesfiles - Ensure compilers are actually installed at those paths
- Use absolute Windows paths (e.g.,
C:\...)
Issue: objdump errors
- Solution: Install TDM-GCC or similar to get objdump.exe
- Update objdumper paths in properties files
The modern TypeScript implementation uses:
- Type-safe language definitions:
types/languages.interfaces.ts - Monaco editor integration: Each language maps to Monaco syntax highlighting
- Example code loading: Automatic loading from
examples/{lang}/default{ext}
pascal.ts: Main FPC compiler class (cross-platform)pascal-win.ts: Windows-specific Delphi compilerpascal-utils.ts: Helper functions for program/unit detection
- Update version in
.local.properties - Test compilation
- Update README if version numbers are mentioned
- Add to appropriate
.local.propertiesfile - Test with sample code
- Document in this file
- 2021: Original
CE-for-Win-Pascalbranch created - 2025: Modernized to
CE-for-Win-Pascal-2025- Migrated to TypeScript
- Updated to latest CE architecture
- Added Rust and Python support
- Improved Pascal program/unit handling
The following backups are maintained:
lib/languages.ts.full-backup: Complete language list from main branch- Git tag:
CE-for-Win-Pascal-backup-20251122- Previous branch state
Same as Compiler Explorer: BSD 2-Clause License
This is a private/local deployment. For issues:
- Check this documentation
- Check public CE docs: https://github.com/compiler-explorer/compiler-explorer
- For commercial compiler issues, contact vendor support
- Main CE Project: https://github.com/compiler-explorer/compiler-explorer
- CE Documentation: https://github.com/compiler-explorer/compiler-explorer/blob/main/docs/
- Windows Native Guide: https://github.com/compiler-explorer/compiler-explorer/blob/main/docs/WindowsNative.md