This folder contains the sources for rebuilding the SysToolsLib C tools.
It contains the following subfolders:
Folder | Content |
---|---|
BiosLib | Routines for writing C programs running in the legacy BIOS. |
LoDosLib | Routines for writing MS-DOS drivers and TSRs. |
MsvcLibX | Microsoft Visual C++ runtime library extensions |
PModeLib | Routines for managing the x86 processors protected mode. |
SysLib | Cross-OS system management library |
SRC | Sources of the SysToolsLib C tools |
For detailed information about each component, refer to the README.md file in each folder.
For a list of all available tools, see Catalog.md.
-
Install Microsoft Visual C++ if you don't have it already.
If needed, it's part of the free Visual Studio Community Edition, available from this URL:
https://www.visualstudio.com/downloads/
Important: While installing Visual Studio Community Edition, make sure to select the following optional components:- The workload "Desktop Development with C++"
- Options "C++/CLI support" and "Standard Library modules" (In the list at the right of the installation wizard)
-
Optional. Install the other compilers and SDKs for DOS and Windows that some tools depend on. See details further down.
Note: All tools will build correctly without these optional compilers and SDKs, with just some features missing. -
Download the whole SysToolsLib C folder contents into a %WORKDIR% directory.
-
Rebuild everything
cd %WORKDIR% configure make
Note:
- The configure.bat script needs to be run only once, the first time a build is done.
- Before running make.bat, verify in the configure.bat output that it correctly detected the location of your C compiler (CC) and Windows Software Development Kit (WINSDK).
- Configure.bat must only be run again if other versions of the build tools (C compiler, etc) are installed, including the optional ones listed below, or if some of the build tools or libraries have been moved to another directory.
If you have a C compiler for DOS:
-
Rebuild the BiosLib library.
cd %WORKDIR%\BiosLib configure make
-
Rebuild the loDosLib library.
cd %WORKDIR%\loDosLib configure make
-
Rebuild the PModeLib library.
cd %WORKDIR%\PModeLib configure make
In all cases:
-
Rebuild the MsvcLibX library.
cd %WORKDIR%\MsvcLibX\src configure make
-
Rebuild the SysLib library.
cd %WORKDIR%\SysLib configure make
-
Rebuild all C tools.
cd %WORKDIR%\SRC configure make
-
Download the whole SysToolsLib C folder contents into a $WORKDIR directory.
-
Rebuild everything
cd $WORKDIR make
-
Rebuild the SysLib library
cd $WORKDIR/SysLib make
-
Rebuild all C tools.
cd $WORKDIR/SRC make
Note: The other components (BiosLib/LoDos/Lib/PModeLib/MsvcLibX) are for DOS or Windows only.
After installing any of these tools, run configure.bat in the base %WORKDIR%.
This will update the config.HOSTNAME.bat file in each library directory.
Subsequent builds with make.bat will automatically use the new tools and SDKs, and build the programs that depend on them.
-
If you're interested in building Windows 95/98 tools, install Microsoft Visual 2005.
It is still available for MSDN subscribers in 2017.
It can be installed in parallel with more recent versions of Visual Studio. -
If you're interested in building BIOS and MS-DOS tools, install Microsoft Visual C++ 1.52.
It is still available for MSDN subscribers in 2017, as part of the Visual Studio 2005 DVD image, but not installed by default.
Gotcha: The setup program is a WIN16 program, which requires extra steps for installing it in modern versions of Windows:- Install a VM with Windows XP, that can run WIN16 programs. (This has to be an x86 VM, not an amd64 VM with XP/64)
- Give that VM access to the host's file system.
- Run Visual C++ 1.52 setup, and install it in the VM's C:\MSVC. (Necessary so that the setup builds vcvars.bat correctly.)
- Once this is done, move the VM's C:\MSVC to the host's C:\MSVC. (vcvars.bat will thus refer to the host's C drive.)
-
The UUID and GPT management tools depend on the gnu-efi sources.
Install the include files from the gnu-efi library
into "%MY_LIBS_DIR%\gnu-efi\inc", and optionally patch them as explained in the SysLib/README.md file.
(The patching is necessary only for 16-bits programs support.)
(It's not necessary to install the rest of the gnu-efi sources, nor to build the gnu-efi library.) -
The Win95 version of some tools requires the Windows 98 DDK. See explanations in the SysLib/README.md file.
(Only necessary to rebuild support for Windows 95/98 block device I/O, etc.) -
The DOS version of some tools requires the LAN Manager 2.1 Programmer's ToolKit. See explanations in the SysLib/README.md file.
(Only necessary to rebuild support for NetBIOS and MAC address for DOS programs.)
cd %WORKDIR%
configure
make
make release