Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
154686a
Create Windows local deployment branch (CE-for-Win-Pascal-2025)
pmcgee69 Nov 22, 2025
1c7559e
Add Windows compiler configurations
pmcgee69 Nov 22, 2025
7e8c421
Update compiler configurations for current system
pmcgee69 Nov 22, 2025
21febb7
Enable Clippy and set Rust version to 1.85.0
pmcgee69 Nov 22, 2025
eed1ce0
Configure Python 3.13.9 with correct executable path
pmcgee69 Nov 22, 2025
1a1c466
Add C++Builder and fix Studio version mappings
pmcgee69 Nov 22, 2025
4765888
Update to Compiler Explorer 2025 framework
pmcgee69 Nov 22, 2025
08021c9
Add quick guide for local compiler configuration
pmcgee69 Nov 22, 2025
2c4eb9c
Update README and add Delphi/C++Builder documentation
pmcgee69 Nov 22, 2025
41d0dfc
Fix Pascal language not appearing in dropdown
pmcgee69 Nov 22, 2025
4f0c779
Add FPC (Free Pascal Compiler) support
pmcgee69 Nov 23, 2025
875d3ba
Fix FPC executable not found on Windows
pmcgee69 Nov 23, 2025
5899d5b
Update compiler version names
pmcgee69 Nov 23, 2025
30ecaa8
Simplify C++Builder modern group name
pmcgee69 Nov 23, 2025
15f6d58
Add source-to-assembly highlighting for Delphi compilers
pmcgee69 Nov 24, 2025
8e029e3
Remove debug logging from Delphi source highlighting
pmcgee69 Nov 24, 2025
9efe58e
Add source-to-assembly highlighting for Delphi compilers
pmcgee69 Nov 25, 2025
3255c83
Addressing regex matches occuring in comments
pmcgee69 Nov 27, 2025
f6ac5a9
Improve Delphi source highlighting for x86 and unit compilation
pmcgee69 Nov 27, 2025
ba5119a
Enable demangling and Intel syntax for C++Builder compilers
pmcgee69 Nov 27, 2025
6fcaa50
Clean up debug logging and fix duplicate compiler configuration
pmcgee69 Nov 27, 2025
4fab011
Consolidate Pascal configuration and improve prog.dpr filtering
pmcgee69 Nov 27, 2025
e261d9c
Simplify comment stripping to single line-preserving approach
pmcgee69 Nov 27, 2025
f51f55c
Simplify segment iteration in deleteBeforeUserCode()
pmcgee69 Nov 27, 2025
ea516dd
Refactor truncateUnmappedSections and add map file error handling
pmcgee69 Nov 28, 2025
cfd5fc9
Readme - Add YouTube Demo of LCE
pmcgee69 Nov 28, 2025
bb72a8a
Automated checkin - update browsers list
mattgodbolt Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,291 changes: 4,291 additions & 0 deletions CUsersUserDocumentsce_branch_diff.txt

Large diffs are not rendered by default.

285 changes: 285 additions & 0 deletions MIGRATION-FROM-2021.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
# Migration from CE-for-Win-Pascal (2021) to CE-for-Win-Pascal-2025

## Summary of Changes

Your original `CE-for-Win-Pascal` branch from 2021 has been modernized to `CE-for-Win-Pascal-2025`.

### What Was Migrated

✅ **Preserved**:
- All your compiler configurations (FPC, Delphi, C++Builder)
- Windows-specific paths and settings
- Minimal language selection (C++, Pascal + Rust, Python)
- Local deployment customizations

✅ **Improved**:
- JavaScript → TypeScript (better type safety)
- Pascal program/unit detection (now automatic!)
- 4+ years of bug fixes and improvements
- Modern build tooling

### What Changed

| Aspect | 2021 Branch | 2025 Branch |
|--------|-------------|-------------|
| **Language** | JavaScript | TypeScript |
| **Pascal Detection** | Hardcoded `output.dpr` | Smart detection via `pascalUtils.isProgram()` |
| **Languages File** | `lib/languages.js` | `lib/languages.ts` (minimal) |
| **Compiler Configs** | `.local.properties` | Same (copied forward) |
| **Build System** | Webpack 4 | Webpack 5 |

## Your Original Changes (2021)

### What You Modified

1. **lib/compilers/pascal.js**
- Changed executable from `prog` to `output`
- Changed project file to `output.dpr`

**Status**: ✅ **No longer needed** - Modern code has better implementation!

2. **lib/languages.js**
- Removed most languages
- Kept only C++, Pascal

**Status**: ✅ **Migrated** to `lib/languages.ts` with C++, Pascal, Rust, Python

3. **Configuration Files**
- `etc/config/pascal.local.properties`
- `etc/config/pascal-win.local.properties`
- `etc/config/c++.local.properties`

**Status**: ✅ **Copied forward** - Ready to update paths

4. **Documentation**
- `Delphi & C++Builder Specifics.md`
- README modifications

**Status**: ✅ **Replaced** with `WINDOWS-DEPLOYMENT.md`

## Modern Implementation Benefits

### Pascal Program Detection (2025)

The new code is **smarter** than your 2021 changes:

**Old way (2021)**:
```javascript
// Hardcoded
getExecutableFilename(dirPath) {
return path.join(dirPath, 'output');
}
```

**New way (2025)**:
```typescript
getExecutableFilename(dirPath: string, outputFilebase: string, key?: CacheKey) {
const source = (key && (key as CacheKey).source) || '';
if (key && pascalUtils.isProgram(source)) {
return path.join(dirPath, pascalUtils.getProgName(source)); // Extracts from source!
}
return path.join(dirPath, 'prog');
}
```

**Benefit**: Automatically extracts program name from your source code!

```pascal
program MyCalculator; // Executable will be named "MyCalculator"
```

## Migration Steps

### 1. Update Compiler Paths

Your compiler paths from 2021 may have changed. Edit:

**`etc/config/pascal.local.properties`**:
```properties
# Update these paths to match your current installations
compiler.fpc331.exe=C:\fpcupdeluxe\fpc\bin\x86_64-win64\fpc.exe
compiler.delphi27.exe=C:\Program Files (x86)\Embarcadero\Studio\21.0\Bin\DCC32.EXE
```

### 2. Update Delphi Versions

You had Delphi 10.2, 10.3, 10.4 configured. Update to your current versions:

```properties
# Example: Add Delphi 11 Alexandria
compiler.delphi28.exe=C:\Program Files (x86)\Embarcadero\Studio\22.0\Bin\DCC32.EXE
compiler.delphi28.name=x86 Delphi 11 Alexandria

compiler.delphi28_64.exe=C:\Program Files (x86)\Embarcadero\Studio\22.0\Bin\DCC64.EXE
compiler.delphi28_64.name=x64 Delphi 11 Alexandria

# Add to group
group.delphi.compilers=delphi25:delphi26:delphi27:delphi28
group.delphi64.compilers=delphi25_64:delphi26_64:delphi27_64:delphi28_64
```

### 3. Test the Build

```bash
npm install
npm run webpack
npm start
```

Browse to http://localhost:10240/

### 4. Verify Compilers

1. Select **Pascal** language
2. Try each compiler version
3. Test both Programs and Units
4. Verify assembly output works

## What You DON'T Need to Do

❌ **Don't** manually edit `lib/compilers/pascal.ts` - It's already better!
❌ **Don't** worry about TypeScript - It works like JavaScript
❌ **Don't** modify core files - Only edit `.local.properties`

## Recommended: Delete Old Branch

Once you've verified the new branch works:

```bash
# The old branch is backed up in a tag
git tag # Verify CE-for-Win-Pascal-backup-20251122 exists

# Safe to delete old branch
git branch -D CE-for-Win-Pascal

# Keep only the new one
git branch -m CE-for-Win-Pascal-2025 CE-for-Win-Pascal
```

## Comparison: Old vs New

### File Count

| Category | 2021 Branch | 2025 Branch |
|----------|-------------|-------------|
| Modified Files | 15+ files | 3 files |
| Custom Code | 200+ lines | 90 lines |
| Merge Commits | 10 | 0 |

The new branch is **cleaner** and **easier to maintain**!

### Technical Debt

**2021 Branch**:
- 4,627 commits behind main
- JavaScript (no type safety)
- Hardcoded values
- Manual merges needed

**2025 Branch**:
- ✅ Up to date with main
- ✅ TypeScript (full type safety)
- ✅ Smart detection
- ✅ Clean rebase possible

## Adding More Languages

If you want to add more languages, edit `lib/languages.ts`:

```typescript
const definitions: Record<LanguageKey, LanguageDefinition> = {
'c++': { ... },
pascal: { ... },
rust: { ... },
python: { ... },

// Add more here - copy from lib/languages.ts.full-backup
d: {
name: 'D',
monaco: 'd',
extensions: ['.d'],
alias: [],
logoFilename: 'd.svg',
logoFilenameDark: null,
formatter: null,
previewFilter: null,
monacoDisassembly: null,
},
};
```

## FAQ

### Q: Why recreate instead of rebase?

**A**: With 4,627 commits divergence and JS→TS migration, clean recreation was:
- Faster (hours vs days)
- Safer (no conflict resolution needed)
- Cleaner (no merge commits)
- Better (got improvements for free)

### Q: Did I lose any custom features?

**A**: No! Your custom features are **better** in the new code:
- Pascal program support: Now automatic
- Compiler configs: All copied forward
- Language filtering: Preserved and improved

### Q: Can I still update from main?

**A**: Yes! Much easier now:
```bash
git merge origin/main
# Only conflicts will be in lib/languages.ts - just keep your minimal version
```

### Q: What if I need the old branch?

**A**: It's tagged:
```bash
git checkout CE-for-Win-Pascal-backup-20251122
```

## Next Steps

1. ✅ Update compiler paths in `.local.properties` files
2. ✅ Test build with `npm install && npm start`
3. ✅ Verify all compilers work
4. ✅ Read `WINDOWS-DEPLOYMENT.md` for detailed docs
5. ✅ Consider deleting old branch once verified

## Success Indicators

You'll know migration succeeded when:

- ✅ Server starts on http://localhost:10240/
- ✅ You see only 4 languages (C++, Pascal, Rust, Python)
- ✅ Your compilers appear in dropdown
- ✅ Compilation works
- ✅ Assembly output displays

## Rollback Plan

If anything goes wrong:

```bash
# Go back to old branch
git checkout CE-for-Win-Pascal-backup-20251122

# Or restore old config
git checkout CE-for-Win-Pascal-backup-20251122 -- etc/config/
```

## Support

Need help? Check:
1. This migration guide
2. `WINDOWS-DEPLOYMENT.md` - Full documentation
3. Original CE docs - Most still apply
4. Git tag - Backup of old branch

---

**Migration Date**: November 22, 2025
**From**: CE-for-Win-Pascal (2021, JavaScript)
**To**: CE-for-Win-Pascal-2025 (TypeScript)
Loading