Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


lordfp:building

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lordfp:building [2026-10-29 00:38] – created - external edit 127.0.0.1lordfp:building [2026-10-29 23:50] (current) – external edit 127.0.0.1
Line 6: Line 6:
 | Linux | ''bin/lord'', ''bin/lordcfg'': native x86-64 programs, statically linked. | Free Pascal 3.2.2 for Linux. | | Linux | ''bin/lord'', ''bin/lordcfg'': native x86-64 programs, statically linked. | Free Pascal 3.2.2 for Linux. |
 | DOS | ''LORD.EXE'', ''LORDCFG.EXE'', ''LORDFP.STR'': 16-bit DOS programs. | Free Pascal 3.2.2's i8086 cross compiler (target msdos, large memory model). | | DOS | ''LORD.EXE'', ''LORDCFG.EXE'', ''LORDFP.STR'': 16-bit DOS programs. | Free Pascal 3.2.2's i8086 cross compiler (target msdos, large memory model). |
-| Windows | ''lord.exe'', ''lordcfg.exe'' for 64-bit Windows (LORD Server). | Free Pascal 3.2.2 cross-compiling to win64. | +| Windows | ''bin-win/lord.exe'', ''bin-win/lordcfg.exe'' for 64-bit Windows: the DOOR32.SYS door (''LORDFPW.ZIP'') and LORD Server's game. | Free Pascal 3.2.2 cross-compiling to win64: ''make windows''. | 
-The code that differs is inside ''{$IFDEF MSDOS}'', ''{$IFDEF WINDOWS}'' and their ''{$ELSE}'': the DOS side talks to a COM port (''doordos.inc''), the Linux side to stdin/stdout (''doorunix.inc''), the Windows side to pipes (''doorwin.inc'').+The code that differs is inside ''{$IFDEF MSDOS}'', ''{$IFDEF WINDOWS}'' and their ''{$ELSE}'': the DOS side talks to a COM port (''doordos.inc''), the Linux side to stdin/stdout (''doorunix.inc''), the Windows side to the caller's socket from DOOR32.SYS, to pipes (LORD Server) or to the console (''doorwin.inc'').
  
 ===== The files ===== ===== The files =====
Line 52: Line 52:
 </code> This makes ''bin-dos/lord.exe'', ''bin-dos/lordcfg.exe'' and ''bin-dos/LORDFP.STR''. Copy them into the LORD directory as ''LORD.EXE'', ''LORDCFG.EXE'' and ''LORDFP.STR''. Built this way they are identical to the ones in LORDFP.ZIP. </code> This makes ''bin-dos/lord.exe'', ''bin-dos/lordcfg.exe'' and ''bin-dos/LORDFP.STR''. Copy them into the LORD directory as ''LORD.EXE'', ''LORDCFG.EXE'' and ''LORDFP.STR''. Built this way they are identical to the ones in LORDFP.ZIP.
 Steps 1-4 are only needed once. Steps 1-4 are only needed once.
 +
 +===== The Windows version =====
 +Free Pascal for Linux cross-compiles to Windows with its own linker; it only needs the x86_64-win64 units, built once from a clean Free Pascal 3.2.2 source (not the one patched for DOS):
 +<code bash>
 +git clone --depth 1 --branch release_3_2_2 https://gitlab.com/freepascal.org/fpc/source.git fpcsrc-win64
 +cd fpcsrc-win64
 +make all OS_TARGET=win64 CPU_TARGET=x86_64 FPC=ppcx64
 +make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 FPC=ppcx64 INSTALL_PREFIX=$HOME/fpc-win64
 +</code>
 +Then, in the source directory, ''make windows'' makes ''bin-win/lord.exe'' and ''bin-win/lordcfg.exe'' (''make windows WINUNITS=...'' if the units are elsewhere). Test the DOOR32.SYS socket mode on Windows: Wine doesn't let a program use a socket handle it inherited.
  
 ===== How the DOS build fits in 640K ===== ===== How the DOS build fits in 640K =====
lordfp/building.1793234317.txt.gz · Last modified: by 127.0.0.1