From a07fbf2ac4adc853280345e17d27f27581056eba Mon Sep 17 00:00:00 2001 From: zanncdwbl Date: Thu, 6 Nov 2025 16:48:41 +0000 Subject: [PATCH 1/2] Fix issue when exporting .xnb files FileNotFoundError: [Errno 2] No such file or directory: 'Fx\\textures\\3d\\AlectoRage.xnb' --- DEV.md | 2 +- deppth2/deppth2.py | 2 +- deppth2/entries.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEV.md b/DEV.md index 8d1d7e5..b75a901 100644 --- a/DEV.md +++ b/DEV.md @@ -1,4 +1,4 @@ python -m build --wheel python setup.py bdist_wheel -pip install .\dist\deppth2-0.1.6.0-py3-none-any.whl +pip install .\dist\deppth2-0.1.6.1-py3-none-any.whl diff --git a/deppth2/deppth2.py b/deppth2/deppth2.py index dbed175..e13c9da 100644 --- a/deppth2/deppth2.py +++ b/deppth2/deppth2.py @@ -1,6 +1,6 @@ """Top-level API exposure of package actions""" -__version__ = "0.1.6.0" +__version__ = "0.1.6.1" import os import sys diff --git a/deppth2/entries.py b/deppth2/entries.py index 028e4fa..3137364 100644 --- a/deppth2/entries.py +++ b/deppth2/entries.py @@ -212,6 +212,8 @@ def extract(self, target, **kwargs): def _export(self, path): if os.path.splitext(path)[1] != '.xnb': return super()._export(path) + + os.makedirs(os.path.dirname(path), exist_ok=True) with open(path, 'wb') as f: f.write(self.data) From cf645e0494e6e1ffa5772cf63a10c115f1008402 Mon Sep 17 00:00:00 2001 From: zanncdwbl Date: Thu, 6 Nov 2025 18:03:43 +0000 Subject: [PATCH 2/2] add pillow and lz4 as required dependencies Multiple times people have pip installed deppth2 for hades and did not have Pillow or LZ4 installed - and did not know why deppth was not working. Although it says to install them in cmd line and in readme, it would be easier to bundle the 3 as one for new users. --- README.md | 7 +++---- setup.py | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 463b80c..daa3e9c 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,10 @@ To install Deppth2, `pip install deppth2` or download the latest [wheel](https:/ ### Dependencies -Deppth2 technically has no required dependencies outside of Python's core modules, but you may find its functionality very limited without also installing the following optional dependencies. If an optional dependency is missing, Deppth2 will abort an operation dependent on that module informing you of the missing module. +Deppth2 technically has two required dependencies, `pillow` and `lz4`, as they are the primary tools that deppth2 uses. If an optional dependency is missing, Deppth2 will abort an operation dependent on that module informing you of the missing module. -Packages primarily contain sprite sheets. Deppth2 uses Pillow to work with the image data within. If you plan to export/import sprite sheets to/from image files, you'll need to install that: `pip install pillow`. - -Hades uses LZ4 compression on its packages. If you plan to work with these packages, you'll want to install the LZ4 module: `pip install lz4`. +> As packages primarily contain sprite sheets, deppth2 uses Pillow to work with the image data within.
+> Hades/Hades 2 uses LZ4 compression on its packages, and as such, lz4 is automatically installed to allow for deppth2 to work with Hades/Hades 2. Transistor and Pyre both use LZF compression on their packages. If you plan to work with these packages, you'll want to install the LZF module: `pip install lzf`. You may need to install C++ build tools to get this dependency to install correctly. diff --git a/setup.py b/setup.py index e6aec28..817e387 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ }, version = version, include_package_data=True, + install_requires=['pillow', 'lz4'], package_data={ "deppth2": ["texconv/texconv.exe"] },