From 8cbaaf0b457837130058cc0ca36d8ff4fea3e752 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Thu, 9 Jul 2020 21:55:01 +0200 Subject: [PATCH] [Build] Add a dependency on Borland C++ 5.5 for the 32-bit build part Yup. Lengthy justification and official download link in the README. It's also been added to the DevKit. --- README.md | 23 +++++++++++++++++++++++ build32b.bat | 9 +++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index 85587837..706c3256 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,27 @@ You will need: ---- +* **Borland C++ 5.5, for 32-bit Windows (`BCC32.EXE`)** + + Released as freeware, and as of July 2020, still sort of officially downloadable from + + http://altd.embarcadero.com/download/bcppbuilder/freecommandLinetools.exe + + (SHA-256 `433b44741f07f2ad673eb936511d498c5a6b7f260f98c4d9a6da70c41a56d855`) + + Needed to fulfill the role of being "just *any* native C++ compiler" for our own tools that either don't necessarily *have* to run on 16-bit DOS, or are required by the 32-bit build step, as long as that one still exists (see above). + + Currently, this category of tools only includes the [converter for hardcoded sprites]. Since that one is written to be as platform-independent as possible, it could easily be compiled with any other native C compiler you happen to have already installed. (Which also means that future port developers hopefully have one less thing to worry about.) + However, choosing Borland C++ 5.5 fits ReC98 very well for a number of reasons: + + * It still happens to be the most hassle- and bloat-free way to get *any* sort of 32-bit Windows C++ compiler to people, clearly beating Open Watcom, and the required registration for [Borland/Embarcadero's own C++ 7.30]. Depending on anything bigger would be way out of proportion, considering how little we use it for + * We already rely on a 32-bit Windows tool + * Turbo C++ 4.0J defines the lower bound for our allowed level of C++ features anyway, making Borland C++ 5.5's old age and lacking C++ standard compliance a non-issue + * Unlike 7.30, 5.5 still works on Windows 9x, which is what typically runs on the real PC-98 hardware that some people might want to compile ReC98 on. + * Other tiny C compilers have no C++ support. + + ---- + * **DOSBox** (if you're running a 64-bit version of Windows, or a non-Windows operating system) For the most part, it shouldn't matter whether you use [the original DOSBox](https://dosbox.com) or your favorite fork. A DOSBox with dynamic recompilation is highly recommended for faster compilation, though. Make sure to enable that feature by setting the following options in its configuration file (`dosbox.conf` for the original version): @@ -104,3 +125,5 @@ To build, simply run `build.bat` and follow any instructions. The final executab [indistinguishable]: https://github.com/nmlgc/mzdiff [can't be decompiled]: Research/Borland%20C++%20decompilation.md#limits-of-decompilability +[converter for hardcoded sprites]: https://github.com/nmlgc/ReC98/issues/8 +[Borland/Embarcadero's own C++ 7.30]: https://www.embarcadero.com/de/free-tools/ccompiler/free-download diff --git a/build32b.bat b/build32b.bat index b03045e6..1686bf22 100755 --- a/build32b.bat +++ b/build32b.bat @@ -2,6 +2,7 @@ echo Running the first, 32-bit part of the ReC98 build process. set ReC98_ASM=tasm32 /m /mx /kh32768 /t /ilibs\master.lib\ +set CXX32=bcc32 del /S *.obj for /L %%i in (1,1,5) do mkdir bin\th0%%i 2>NUL @@ -9,6 +10,9 @@ for /L %%i in (1,1,5) do mkdir bin\th0%%i 2>NUL %ReC98_ASM% 1>NUL 2>NUL if errorlevel 9009 goto no_tasm32 +%CXX32% 1>NUL 2>NUL +if errorlevel 9009 goto no_bcc32 + %ReC98_ASM% th01_op.asm bin\th01\op.obj %ReC98_ASM% th01_reiiden.asm bin\th01\reiiden.obj %ReC98_ASM% th01_fuuin.asm bin\th01\fuuin.obj @@ -37,5 +41,10 @@ echo Could not find TASM32. echo Please make sure that the BIN directory of Turbo Assembler 5.0 is in your PATH. goto eof +:no_bcc32 +echo Could not find BCC32. +echo Please make sure that the BIN directory of Borland C++ 5.5 is in your PATH. +goto eof + :eof echo -------------------------------------------------------------------------------