Skip to content

Commit

Permalink
Stop creating empty asm dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
ethteck committed Jul 28, 2024
1 parent 8582e13 commit 27cefdc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# splat Release Notes

### 0.24.7
* splat no longer creates unnecessary directories for asm

### 0.24.6

* Handle PS-X EXE header that includes .text/.data vram address
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:

```txt
splat64[mips]>=0.24.6,<1.0.0
splat64[mips]>=0.24.7,<1.0.0
```

### Optional dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "splat64"
# Should be synced with src/splat/__init__.py
version = "0.24.6"
version = "0.24.7"
description = "A binary splitting tool to assist with decompilation and modding projects"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion src/splat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__package_name__ = __name__

# Should be synced with pyproject.toml
__version__ = "0.24.6"
__version__ = "0.24.7"
__author__ = "ethteck"

from . import util as util
Expand Down
6 changes: 4 additions & 2 deletions src/splat/segtypes/common/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ def split(self, rom_bytes: bytes):
if self.rom_start != self.rom_end:
asm_out_dir = options.opts.nonmatchings_path / self.dir
matching_asm_out_dir = options.opts.matchings_path / self.dir
asm_out_dir.mkdir(parents=True, exist_ok=True)
matching_asm_out_dir.mkdir(parents=True, exist_ok=True)

self.print_file_boundaries()

Expand Down Expand Up @@ -466,6 +464,8 @@ def create_asm_dependencies_file(

if func_name in self.global_asm_funcs or is_new_c_file:
outpath = asm_out_dir / self.name / (func_name + ".s")
outpath.parent.mkdir(parents=True, exist_ok=True)

depend_list.append(outpath)
f.write(f" \\\n {outpath}")
else:
Expand All @@ -474,6 +474,8 @@ def create_asm_dependencies_file(

if rodata_name in self.global_asm_rodata_syms or is_new_c_file:
outpath = asm_out_dir / self.name / (rodata_name + ".s")
outpath.parent.mkdir(parents=True, exist_ok=True)

depend_list.append(outpath)
f.write(f" \\\n {outpath}")

Expand Down

0 comments on commit 27cefdc

Please sign in to comment.