cue4parse 0.0.6__tar.gz → 0.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cue4parse-0.0.6 → cue4parse-0.0.7}/PKG-INFO +1 -1
- {cue4parse-0.0.6 → cue4parse-0.0.7}/pyproject.toml +1 -1
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/__init__.py +7 -2
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/cli.py +4 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/setup.bat +3 -1
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/setup_deps.py +5 -3
- {cue4parse-0.0.6 → cue4parse-0.0.7}/.github/workflows/workflow.yml +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/.gitignore +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/LICENSE +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/README.md +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/__main__.py +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/core.py +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/example.py +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/includes.py +0 -0
- {cue4parse-0.0.6 → cue4parse-0.0.7}/src/cue4parse/setup.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cue4parse
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: CUE4Parse Python wrapper and CLI tool to extract packages from Unreal Engine games
|
|
5
5
|
Project-URL: Homepage, https://github.com/joric/CUE4Parse-Python/wiki
|
|
6
6
|
Project-URL: Repository, https://github.com/joric/CUE4Parse-Python
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cue4parse"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.7"
|
|
8
8
|
description = "CUE4Parse Python wrapper and CLI tool to extract packages from Unreal Engine games"
|
|
9
9
|
requires-python = ">=3.9"
|
|
10
10
|
dependencies = ["pythonnet>=3.0"]
|
|
@@ -4,8 +4,13 @@ from pathlib import Path
|
|
|
4
4
|
|
|
5
5
|
_DLL_DIR = Path(os.environ.get('LOCALAPPDATA', os.path.expanduser('~/.local/share'))) / "cue4parse" / "libs"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# Check for --reinstall flag BEFORE importing any libraries
|
|
8
|
+
_reinstall = False
|
|
9
|
+
if len(sys.argv) > 1 and "--reinstall" in sys.argv:
|
|
10
|
+
_reinstall = True
|
|
11
|
+
|
|
12
|
+
if not _DLL_DIR.exists() or _reinstall:
|
|
13
|
+
print("Downloading native libraries.")
|
|
9
14
|
from cue4parse import setup_deps
|
|
10
15
|
setup_deps.main()
|
|
11
16
|
|
|
@@ -473,6 +473,10 @@ parser.add_argument("--export-materials", action=argparse.BooleanOptionalAction,
|
|
|
473
473
|
parser.add_argument("--export-hdr-as-hdr", action=argparse.BooleanOptionalAction, default=True, help="Export HDR textures as .hdr")
|
|
474
474
|
parser.add_argument("--compression", default="None", help="Compression: None, GZIP, ZSTD")
|
|
475
475
|
|
|
476
|
+
# Update options
|
|
477
|
+
parser.add_argument("--reinstall", action="store_true", help="Re-install native libraries (DLLs), downloads FModel on Windows")
|
|
478
|
+
parser.add_argument("--rebuild", action="store_true", help="Build latest native libraries from source, use with --reinstall")
|
|
479
|
+
|
|
476
480
|
def main(argv: list[str] | None = None) -> int:
|
|
477
481
|
argv = argv if argv is not None else sys.argv[1:]
|
|
478
482
|
if not argv:
|
|
@@ -10,7 +10,9 @@ echo === cue4parse dependency setup (Windows) ===
|
|
|
10
10
|
if exist "%TMP_DIR%" rmdir /s /q "%TMP_DIR%"
|
|
11
11
|
mkdir "%TMP_DIR%"
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
for %%a in (%*) do (
|
|
14
|
+
if /i "%%a"=="--rebuild" goto git
|
|
15
|
+
)
|
|
14
16
|
|
|
15
17
|
echo Downloading fmodel
|
|
16
18
|
for /f "usebackq tokens=*" %%i in (`powershell -command "(Invoke-RestMethod -Uri 'https://api.fmodel.app/v1/infos/Qa').downloadUrl"`) do set DOWNLOAD_URL=%%i
|
|
@@ -15,7 +15,9 @@ def _run_script(script: Path, *extra_args: str) -> int:
|
|
|
15
15
|
"""Run a script and return the returncode (0 for success, non-zero for failure)"""
|
|
16
16
|
if not script.exists():
|
|
17
17
|
raise RuntimeError(f"Setup script not found: {script}")
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
args = list(extra_args) + [v for v in ("--reinstall", "--rebuild") if v in sys.argv]
|
|
20
|
+
|
|
19
21
|
if PLATFORM == "win32":
|
|
20
22
|
result = subprocess.run([str(script), *args], shell=True)
|
|
21
23
|
return result.returncode
|
|
@@ -28,8 +30,8 @@ def main() -> None:
|
|
|
28
30
|
print(f"Unsupported platform: {PLATFORM}. Only Windows and Linux are supported.")
|
|
29
31
|
sys.exit(1)
|
|
30
32
|
|
|
31
|
-
if natives_present() and "--
|
|
32
|
-
print(f"Already set up. Use --
|
|
33
|
+
if natives_present() and "--reinstall" not in sys.argv:
|
|
34
|
+
print(f"Already set up. Use --reinstall to reinstall.")
|
|
33
35
|
return
|
|
34
36
|
|
|
35
37
|
scripts = Path(__file__).parent
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|