Tidy up workdlows and pip, add readme

This commit is contained in:
tntexplosivesltd 2023-11-24 20:42:00 +13:00
parent 99b85f2474
commit ec870e7771
8 changed files with 52 additions and 14 deletions

View File

@ -70,15 +70,14 @@ jobs:
path: legobin
key: legobin
- name: Build isledecomp library
- name: Install python packages
shell: bash
run: |
pip install tools/isledecomp
pip install -r tools/requirements.txt
- name: Summarize Accuracy
shell: bash
run: |
pip install -r tools/reccmp/requirements.txt
python3 tools/reccmp/reccmp.py -S ISLEPROGRESS.SVG --svg-icon tools/reccmp/isle.png -H ISLEPROGRESS.HTML legobin/ISLE.EXE build/ISLE.EXE build/ISLE.PDB . | tee ISLEPROGRESS.TXT
python3 tools/reccmp/reccmp.py -S LEGO1PROGRESS.SVG -T 1929 --svg-icon tools/reccmp/lego1.png -H LEGO1PROGRESS.HTML legobin/LEGO1.DLL build/LEGO1.DLL build/LEGO1.PDB . | tee LEGO1PROGRESS.TXT

View File

@ -27,14 +27,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build isledecomp library
- name: Install python libraries
shell: bash
run: |
pip install black pylint tools/isledecomp
pip install black pylint -r tools/requirements.txt
- name: Run pylint and black
shell: bash
run: |
pip install -r tools/reccmp/requirements.txt
pylint tools --ignore=build,tests
black --check tools

View File

@ -9,12 +9,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build isledecomp library
- name: Install python libraries
run: |
pip install tools/isledecomp
pip install -r tools/requirements.txt
- name: Run checkorder.py
run: |
pip install -r tools/checkorder/requirements.txt
python3 tools/checkorder/checkorder.py --verbose --enforce ISLE
python3 tools/checkorder/checkorder.py --verbose --enforce LEGO1

4
.gitignore vendored
View File

@ -16,6 +16,6 @@ ISLE.EXE
LEGO1.DLL
build/
*.swp
LEGO1PROGRESS.HTML
LEGO1PROGRESS.SVG
LEGO1PROGRESS.*
ISLEPROGRESS.*
*.pyc

39
tools/README.md Normal file
View File

@ -0,0 +1,39 @@
# LEGO Island Decompilation Tools
These are a set of Python tools for helping with the decomp project
## Installing
Use pip to install the required packages:
```
pip install -r tools/requirements.txt
```
## reccmp
This is a script to compare the original EXE or DLL with a recpmpiled EXE or DLL, provided a .PDB file
## verexp
This verifies exports by comparing the exports of an original DLL and the recompiled DLL
## checkorder
This checks the order of C++ source and header files to make sure the functions are in order
## Development
In order to keep the code clean and consistent, we use `pylint` and `black`:
```
pip install black pylint
```
### To run pylint:
```
pylint tools/ --ignore=build,tests,bin,lib
```
### To check code formatting without rewriting files:
```
black --check tools/
```
### To apply code formatting:
```
black tools/
```

View File

@ -67,7 +67,9 @@ def check_file(filename: str, verbose: bool = False) -> bool:
def parse_args(test_args: list | None = None) -> dict:
p = argparse.ArgumentParser()
p = argparse.ArgumentParser(
description="Checks the source files to make sure the function offset comments are in order",
)
p.add_argument("target", help="The file or directory to check.")
p.add_argument(
"--enforce",

View File

@ -1 +0,0 @@
isledecomp

View File

@ -1,4 +1,5 @@
tools/isledecomp
capstone
colorama
isledecomp
pystache
pystache