Skip to content

Building from Source

SMUnlimited edited this page Sep 18, 2026 · 1 revision

Building from Source

AI scripts

Install Perl (Strawberry Perl or ActivePerl on Windows). From the repository root, compile one target:

.\MakeREFORGED.bat
.\MakeTFT.bat
.\MakeROC.bat

Or compile all normal and optimized targets:

.\MakeAll.bat

Generated map-ready files are written beneath Scripts. Never make source-only fixes there; rebuild output from the .eai, version table, and race files.

Optimized scripts

After compiling a normal target, run its optimizer:

.\MakeOptREFORGED.bat

This creates Scripts\OPTREFORGED (or the corresponding TFT/ROC directory). Install an optimized target with the generic installer when working at the command line:

.\InstallVERToMap.bat OPTREFORGED "C:\path\to\Map.w3x" 0

The public version-specific installer takes map then mode; the generic installer takes version, map, then mode. Keep that argument-order difference in mind.

Strategy Manager

The editor additionally requires the Perl/Tk modules. Start it from the repository root so it can find Versions.txt and the version directories:

perl .\AMAIStrategyManager.pl

See Strategy Manager for its workflow.

Electron installer

The current installer uses Angular 16, Electron 22, Node.js 14.15 or later, and npm. From Electron:

npm install
npm start

Create a Windows release:

npm run electron:build

The build compiles the Angular renderer and Electron main process, packages the executable, then creates a release ZIP containing the portable executable, MPQEditor.exe, and a separate customizable Scripts directory.

Useful checks are:

npm run lint
npm test
npm run test:installer

Electron packaging targets the operating system on which it runs. The project intentionally remains on Electron 22 for its existing OS compatibility baseline.

Clone this wiki locally