MakeXPStub
is a utility designed to make your PE (Portable Executable) files compatible with Windows XP. This is particularly useful for executables compiled with Rust, which may not natively support Windows XP. The tool operates by modifying the Import Address Table (IAT) of the target executable to forward incompatible API calls to xpstub.dll
. This DLL contains implementations that make these APIs compatible with Windows XP. The underlying implementation for these thunks is sourced from YY-Thunks.
- Modify PE Files: Automatically update the IAT to make your executables XP-compatible.
- DLL Forwarding: Forwards incompatible API calls to
xpstub.dll
. - Built for Rust: Tailored for executables compiled with Rust but can be used for any PE file.
- Minimal Footprint: Generates minimal patches that can be easily distributed.
- Rust Toolchain
- Windows SDK
- NMake (For building
xpstub.dll
)
To compile the project, you need to execute two commands:
-
Build the native components with the batch script:
.\Build.ps1 build
-
Then build the Rust components:
cargo build --release
After the compilation steps, you can use the makexpstub.exe
command-line utility to convert your executables. Here's the basic syntax:
makexpstub.exe --input a.exe --output a-xp.exe
This will read a.exe
, modify its IAT, and produce a-xp.exe
which will be compatible with Windows XP.
We welcome contributions and bug reporting. Feel free to open an issue or submit a pull request.
A big thank you to the YY-Thunks project for providing the essential API implementations that made this project possible.
This project is licensed under MIT License.
For more details, please refer to the LICENSE file in the repository.