2023-11-25 13:27:42 -05:00
|
|
|
# LEGO Island Decompilation Tools
|
|
|
|
|
2023-11-26 08:57:19 -05:00
|
|
|
These are a set of Python tools for helping with the decomp project.
|
2023-11-25 13:27:42 -05:00
|
|
|
|
|
|
|
## Installing
|
|
|
|
Use pip to install the required packages:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install -r tools/requirements.txt
|
|
|
|
```
|
|
|
|
|
2023-11-26 08:57:19 -05:00
|
|
|
## Overview
|
2023-11-25 13:27:42 -05:00
|
|
|
|
2023-11-26 08:57:19 -05:00
|
|
|
* `reccmp`: Compares the original EXE or DLL with a recompiled EXE or DLL, provided a PDB file
|
|
|
|
* `verexp`: Verifies exports by comparing the exports of the original DLL and the recompiled DLL
|
|
|
|
* `checkorder`: Checks `OFFSET` declarations, ensuring they appear in ascending order within a unit
|
|
|
|
* `isledecomp`: A library that is used by the above scripts, it has a collection of useful classes and functions
|
2023-11-25 13:27:42 -05:00
|
|
|
|
2023-11-26 08:57:19 -05:00
|
|
|
## Testing
|
2023-11-25 13:27:42 -05:00
|
|
|
`isledecomp` has a small suite of tests. Install pylint and run it, passing in the directory:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install pytest
|
|
|
|
pytest tools/isledecomp/tests/
|
|
|
|
```
|
|
|
|
|
|
|
|
## Development
|
|
|
|
In order to keep the code clean and consistent, we use `pylint` and `black`:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install black pylint
|
|
|
|
```
|
2023-11-26 08:57:19 -05:00
|
|
|
### Run pylint (ignores build and virtualenv):
|
2023-11-25 13:27:42 -05:00
|
|
|
```
|
|
|
|
pylint tools/ --ignore=build,bin,lib
|
|
|
|
```
|
2023-11-26 08:57:19 -05:00
|
|
|
### Check code formatting without rewriting files:
|
2023-11-25 13:27:42 -05:00
|
|
|
```
|
|
|
|
black --check tools/
|
|
|
|
```
|
2023-11-26 08:57:19 -05:00
|
|
|
### Apply code formatting:
|
2023-11-25 13:27:42 -05:00
|
|
|
```
|
|
|
|
black tools/
|
|
|
|
```
|