This repository contains wmake style makefiles an patches to build Lua 5.4.6 on Open Watcom 1.9 or later. The primary goal for these is to allow Lua scripts to be run on DOS systems in real mode.
To run Lua built by Open Watcom you will need the following:
Requirement | Sources/Comment |
---|---|
8088 CPU**or compatibiles |
86Box (GitHub) DOSBox-X (GitHub) PCem (GitHub) |
PC-DOS 2.1 or higher | FreeDOS DOSBox-X (GitHub) SvarDOS |
At least 320 kilobytes of total system memory |
Any memory above |
At least 600 kilobytes of hard disk space or x2 360 kilobyte diskettes |
Can be ran directly |
If in doubt, install DOSBox-X
To build Lua with Open Watcom you will need the following:
Requirement | Sources |
---|---|
Lua 5.4.6 source code | lua.org (GitHub) |
Open Watcom 1.9 (or later) | openwatcom.org (GitHub) FreeDOS Bonus CD ( FDIMPLES )SvarDOS ( PKGNET repository) |
DOS operating system (MS-DOS 5.0 compatible) |
FreeDOS DOSBox-X (GitHub) SvarDOS |
80386 compatible processor* *Any AMD or Intel CPU |
86Box (GitHub) DOSBox-X (GitHub) PCem (GitHub) Qemu (GitLab) |
A patching utility | GNU Patch DifPat |
If in doubt, install DOSBox-X
- Extract Luas source code
- Copy all files in this repository to the
src
folder of the extracted content - Patch the source code for Watcom:
GNU Patch | DifPat |
---|---|
patch luaconf.h luaconf.pat |
pat luaconf.pat luaconf.h |
patch lopcodes.h lopcodes.pat |
pat lopcodes.pat lopcodes.h |
patch lutf8lib.c lutf8lib.pat |
pat lutf8lib.pat lutf8lib.c |
If no patching program is available mimic the changes in each
.pat
file manually. Patch changes are minimal
- Build Lua for real mode DOS with
wmake -f watcom_l.mak
- If successful
dist/bin/dos16.exe
anddist/bin/dosc16.exe
will be created
- If successful
- Clean up object files with
wmake -f watcom_l.mak clean
- Build Lua for DOS4GW with
wmake -f watcom_f.mak
- If successful
dist/bin/dos4g.exe
anddist/bin/dosc4g.exe
will be created
- If successful
- Clean up object files with
wmake -f watcom_f.mak clean
Other targets may work but are untested