Skip to content

Commit

Permalink
Merge pull request #135 from SlyCooperReloadCoded/working
Browse files Browse the repository at this point in the history
Fixed build.sh
  • Loading branch information
TheOnlyZac authored Dec 1, 2024
2 parents f8ca2f1 + e950baf commit f49b584
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,19 @@ To build the project, you will need to extract the original ELF file from your o

### Install python packages

You will need Python 3.8 or higher.
If you don't have Python 3.8 or higher, install it:

```bash
pip install -U -r requirements.txt
sudo apt-get install python3 python3-pip
```

### Setup build environment
Then install the required Python packages:

<!--#### Linux/WSL-->
```bash
pip3 install -U -r requirements.txt
```

### Setup build environment

1. Setup wine:
```bash
Expand Down Expand Up @@ -136,20 +140,20 @@ choco install 7zip
The project builds the executable `SCUS_971.98`.

```bash
python configure.py
python3 configure.py
ninja
```

If you update any config files or add any source files, you will need run a clean reconfigure:

```bash
python configure.py --clean
python3 configure.py --clean
```

To only clean without reconfiguring (i.e. delete build files) use:

```bash
python configure.py --only-clean
python3 configure.py --only-clean
```

## Running
Expand Down
2 changes: 1 addition & 1 deletion config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This directory contains config files for splat, the tool we use to split and disassemble the game binary. The config files are used to tell splat how to split the binary and what to name the output files.

## Files in this directory
- `sly1.yaml` - Main config file for splat. Contains the offsets of each file split in the game binary. Creating new `.c` files involves modifying this file to create a `c` split and then running `python configure.py` to generate the new files.
- `sly1.yaml` - Main config file for splat. Contains the offsets of each file split in the game binary. Creating new `.c` files involves modifying this file to create a `c` split and then running `python3 configure.py` to generate the new files.
- `symbol_addrs.txt` - Contains the addresses of symbols in the game binary. Used by splat to properly reference functions and variables in the game code when splitting the binary.
- `checksum.sha1` - SHA1 checksum of the original game binary. Used to verify the integrity of the binary after compilation.

Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Then start writing your code under the "Source code" tab. It will tell you what

Once the function matches 100%, follow these steps to integrate it into the project:
1. Replace the `INCLUDE_ASM` macro in the `.c` file with the matched function.
* If the function is in a new file, **do not create a new file**. Creating new `.c` files is done by editing the `config/sly1.yaml` file to change the file split from `asm` to `c`, then running `python configure.py` to generate the new file. If you don't know how to do this, feel free to ask for help in the Discord server.
* If the function is in a new file, **do not create a new file**. Creating new `.c` files is done by editing the `config/sly1.yaml` file to change the file split from `asm` to `c`, then running `python3 configure.py` to generate the new file. If you don't know how to do this, feel free to ask for help in the Discord server.
2. Check `config/symbol_addrs.txt` to see if the mangled name of the function is present.
* If it is not, add the **mangled name** of the function with it's address. The mangled name of the function can be found in the debug symbols for the May 2002 prototype. If you don't know how to find it, ask for help in the Discord server; someone will be able to find it for you easily.
* The symbol_addrs.txt file is grouped alphabetically by filename, then sorted by address within the file.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ if [ ! -f disc/SCUS_971.98 ]; then
fi

# Configure and build
python configure.py --clean
python3 configure.py --clean
ninja

0 comments on commit f49b584

Please sign in to comment.