ifstools 1.14__tar.gz → 2.0__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.
- ifstools-2.0/.github/workflows/maturin.yml +246 -0
- ifstools-2.0/.gitignore +13 -0
- ifstools-2.0/Cargo.lock +225 -0
- ifstools-2.0/Cargo.toml +19 -0
- ifstools-2.0/LICENSE +21 -0
- ifstools-2.0/PKG-INFO +93 -0
- {ifstools-1.14 → ifstools-2.0}/README.md +11 -0
- ifstools-2.0/ifstools_bin.py +3 -0
- ifstools-2.0/pyproject.toml +30 -0
- ifstools-2.0/rust/dxt.rs +113 -0
- ifstools-2.0/rust/lib.rs +68 -0
- ifstools-2.0/rust/lz77.rs +297 -0
- ifstools-2.0/rust/png_enc.rs +90 -0
- ifstools-2.0/src/ifstools/__init__.py +2 -0
- ifstools-1.14/ifstools/handlers/lz77.py → ifstools-2.0/src/ifstools/handlers/_lz77_py.py +1 -1
- ifstools-1.14/ifstools/handlers/AfpFolder.py → ifstools-2.0/src/ifstools/handlers/afp_folder.py +2 -1
- ifstools-1.14/ifstools/handlers/GenericFile.py → ifstools-2.0/src/ifstools/handlers/generic_file.py +70 -76
- ifstools-1.14/ifstools/handlers/GenericFolder.py → ifstools-2.0/src/ifstools/handlers/generic_folder.py +48 -11
- ifstools-1.14/ifstools/handlers/ImageDecoders.py → ifstools-2.0/src/ifstools/handlers/image_decoders.py +20 -26
- ifstools-1.14/ifstools/handlers/ImageFile.py → ifstools-2.0/src/ifstools/handlers/image_file.py +123 -154
- ifstools-2.0/src/ifstools/handlers/lz77.py +7 -0
- ifstools-1.14/ifstools/handlers/MD5Folder.py → ifstools-2.0/src/ifstools/handlers/md5_folder.py +55 -51
- ifstools-1.14/ifstools/handlers/TexFolder.py → ifstools-2.0/src/ifstools/handlers/tex_folder.py +13 -9
- {ifstools-1.14 → ifstools-2.0/src}/ifstools/ifs.py +100 -85
- {ifstools-1.14 → ifstools-2.0/src}/ifstools/ifstools.py +17 -13
- ifstools-1.14/PKG-INFO +0 -11
- ifstools-1.14/ifstools/__init__.py +0 -3
- ifstools-1.14/ifstools/handlers/__init__.py +0 -9
- ifstools-1.14/ifstools.egg-info/PKG-INFO +0 -11
- ifstools-1.14/ifstools.egg-info/SOURCES.txt +0 -23
- ifstools-1.14/ifstools.egg-info/dependency_links.txt +0 -1
- ifstools-1.14/ifstools.egg-info/entry_points.txt +0 -3
- ifstools-1.14/ifstools.egg-info/requires.txt +0 -4
- ifstools-1.14/ifstools.egg-info/top_level.txt +0 -1
- ifstools-1.14/setup.cfg +0 -7
- ifstools-1.14/setup.py +0 -29
- /ifstools-1.14/ifstools/handlers/Node.py → /ifstools-2.0/src/ifstools/handlers/node.py +0 -0
- {ifstools-1.14 → ifstools-2.0/src}/ifstools/utils.py +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.13.1
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github -o .github/workflows/maturin.yml
|
|
5
|
+
#
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-22.04
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-22.04
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-22.04
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-22.04
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-22.04
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-22.04
|
|
38
|
+
target: ppc64le
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v6
|
|
41
|
+
- uses: actions/setup-python@v6
|
|
42
|
+
with:
|
|
43
|
+
python-version: '3.10'
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.platform.target }}
|
|
48
|
+
args: --release --out dist
|
|
49
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
50
|
+
manylinux: auto
|
|
51
|
+
- name: Build free-threaded wheels
|
|
52
|
+
uses: PyO3/maturin-action@v1
|
|
53
|
+
with:
|
|
54
|
+
target: ${{ matrix.platform.target }}
|
|
55
|
+
args: --release --out dist -i python3.14t
|
|
56
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
57
|
+
manylinux: auto
|
|
58
|
+
- name: Upload wheels
|
|
59
|
+
uses: actions/upload-artifact@v6
|
|
60
|
+
with:
|
|
61
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
62
|
+
path: dist
|
|
63
|
+
|
|
64
|
+
musllinux:
|
|
65
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
66
|
+
strategy:
|
|
67
|
+
matrix:
|
|
68
|
+
platform:
|
|
69
|
+
- runner: ubuntu-22.04
|
|
70
|
+
target: x86_64
|
|
71
|
+
- runner: ubuntu-22.04
|
|
72
|
+
target: x86
|
|
73
|
+
- runner: ubuntu-22.04
|
|
74
|
+
target: aarch64
|
|
75
|
+
- runner: ubuntu-22.04
|
|
76
|
+
target: armv7
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v6
|
|
79
|
+
- uses: actions/setup-python@v6
|
|
80
|
+
with:
|
|
81
|
+
python-version: '3.10'
|
|
82
|
+
- name: Build wheels
|
|
83
|
+
uses: PyO3/maturin-action@v1
|
|
84
|
+
with:
|
|
85
|
+
target: ${{ matrix.platform.target }}
|
|
86
|
+
args: --release --out dist
|
|
87
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
88
|
+
manylinux: musllinux_1_2
|
|
89
|
+
- name: Build free-threaded wheels
|
|
90
|
+
uses: PyO3/maturin-action@v1
|
|
91
|
+
with:
|
|
92
|
+
target: ${{ matrix.platform.target }}
|
|
93
|
+
args: --release --out dist -i python3.14t
|
|
94
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
95
|
+
manylinux: musllinux_1_2
|
|
96
|
+
- name: Upload wheels
|
|
97
|
+
uses: actions/upload-artifact@v6
|
|
98
|
+
with:
|
|
99
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
100
|
+
path: dist
|
|
101
|
+
|
|
102
|
+
windows:
|
|
103
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
104
|
+
strategy:
|
|
105
|
+
matrix:
|
|
106
|
+
platform:
|
|
107
|
+
- runner: windows-latest
|
|
108
|
+
target: x64
|
|
109
|
+
python_arch: x64
|
|
110
|
+
- runner: windows-latest
|
|
111
|
+
target: x86
|
|
112
|
+
python_arch: x86
|
|
113
|
+
# - runner: windows-11-arm
|
|
114
|
+
# target: aarch64
|
|
115
|
+
# python_arch: arm64
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/checkout@v6
|
|
118
|
+
- uses: actions/setup-python@v6
|
|
119
|
+
with:
|
|
120
|
+
python-version: '3.13'
|
|
121
|
+
architecture: ${{ matrix.platform.python_arch }}
|
|
122
|
+
- name: Build wheels
|
|
123
|
+
uses: PyO3/maturin-action@v1
|
|
124
|
+
with:
|
|
125
|
+
target: ${{ matrix.platform.target }}
|
|
126
|
+
args: --release --out dist
|
|
127
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
128
|
+
- uses: actions/setup-python@v6
|
|
129
|
+
with:
|
|
130
|
+
python-version: 3.14t
|
|
131
|
+
architecture: ${{ matrix.platform.python_arch }}
|
|
132
|
+
- name: Build free-threaded wheels
|
|
133
|
+
uses: PyO3/maturin-action@v1
|
|
134
|
+
with:
|
|
135
|
+
target: ${{ matrix.platform.target }}
|
|
136
|
+
args: --release --out dist -i python3.14t
|
|
137
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
138
|
+
- name: Upload wheels
|
|
139
|
+
uses: actions/upload-artifact@v6
|
|
140
|
+
with:
|
|
141
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
142
|
+
path: dist
|
|
143
|
+
|
|
144
|
+
macos:
|
|
145
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
146
|
+
strategy:
|
|
147
|
+
matrix:
|
|
148
|
+
platform:
|
|
149
|
+
- runner: macos-15-intel
|
|
150
|
+
target: x86_64
|
|
151
|
+
- runner: macos-latest
|
|
152
|
+
target: aarch64
|
|
153
|
+
steps:
|
|
154
|
+
- uses: actions/checkout@v6
|
|
155
|
+
- uses: actions/setup-python@v6
|
|
156
|
+
with:
|
|
157
|
+
python-version: '3.10'
|
|
158
|
+
- name: Build wheels
|
|
159
|
+
uses: PyO3/maturin-action@v1
|
|
160
|
+
with:
|
|
161
|
+
target: ${{ matrix.platform.target }}
|
|
162
|
+
args: --release --out dist
|
|
163
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
164
|
+
- uses: actions/setup-python@v6
|
|
165
|
+
with:
|
|
166
|
+
python-version: 3.14t
|
|
167
|
+
- name: Build free-threaded wheels
|
|
168
|
+
uses: PyO3/maturin-action@v1
|
|
169
|
+
with:
|
|
170
|
+
target: ${{ matrix.platform.target }}
|
|
171
|
+
args: --release --out dist -i python3.14t
|
|
172
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
173
|
+
- name: Upload wheels
|
|
174
|
+
uses: actions/upload-artifact@v6
|
|
175
|
+
with:
|
|
176
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
177
|
+
path: dist
|
|
178
|
+
|
|
179
|
+
sdist:
|
|
180
|
+
runs-on: ubuntu-latest
|
|
181
|
+
steps:
|
|
182
|
+
- uses: actions/checkout@v6
|
|
183
|
+
- name: Build sdist
|
|
184
|
+
uses: PyO3/maturin-action@v1
|
|
185
|
+
with:
|
|
186
|
+
command: sdist
|
|
187
|
+
args: --out dist
|
|
188
|
+
- name: Upload sdist
|
|
189
|
+
uses: actions/upload-artifact@v6
|
|
190
|
+
with:
|
|
191
|
+
name: wheels-sdist
|
|
192
|
+
path: dist
|
|
193
|
+
|
|
194
|
+
windows-exe:
|
|
195
|
+
name: Standalone .exe (Windows x86_64)
|
|
196
|
+
runs-on: windows-latest
|
|
197
|
+
steps:
|
|
198
|
+
- uses: actions/checkout@v6
|
|
199
|
+
- uses: actions/setup-python@v6
|
|
200
|
+
with:
|
|
201
|
+
python-version: '3.14'
|
|
202
|
+
architecture: x64
|
|
203
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
204
|
+
- uses: astral-sh/setup-uv@v7
|
|
205
|
+
- name: Install ifstools (builds the native extension via maturin)
|
|
206
|
+
run: |
|
|
207
|
+
uv venv --clear
|
|
208
|
+
uv pip install . pyinstaller==6.19.0
|
|
209
|
+
- name: Build standalone exe
|
|
210
|
+
run: uv run pyinstaller --onefile --name ifstools ifstools_bin.py
|
|
211
|
+
- uses: actions/upload-artifact@v6
|
|
212
|
+
with:
|
|
213
|
+
name: ifstools-windows-x86_64-exe
|
|
214
|
+
path: dist/ifstools.exe
|
|
215
|
+
|
|
216
|
+
release:
|
|
217
|
+
name: Release
|
|
218
|
+
runs-on: ubuntu-latest
|
|
219
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
220
|
+
needs: [linux, musllinux, windows, macos, sdist, windows-exe]
|
|
221
|
+
permissions:
|
|
222
|
+
# Use to sign the release artifacts
|
|
223
|
+
id-token: write
|
|
224
|
+
# Used to upload release artifacts
|
|
225
|
+
contents: write
|
|
226
|
+
# Used to generate artifact attestation
|
|
227
|
+
attestations: write
|
|
228
|
+
steps:
|
|
229
|
+
- uses: actions/download-artifact@v7
|
|
230
|
+
- name: Generate artifact attestation
|
|
231
|
+
uses: actions/attest-build-provenance@v3
|
|
232
|
+
with:
|
|
233
|
+
subject-path: |
|
|
234
|
+
wheels-*/*
|
|
235
|
+
ifstools-windows-x86_64-exe/*
|
|
236
|
+
- name: Install uv
|
|
237
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
238
|
+
uses: astral-sh/setup-uv@v7
|
|
239
|
+
- name: Publish to PyPI
|
|
240
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
241
|
+
run: uv publish 'wheels-*/*'
|
|
242
|
+
- name: Upload exe to GitHub Release
|
|
243
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
244
|
+
uses: softprops/action-gh-release@v2
|
|
245
|
+
with:
|
|
246
|
+
files: ifstools-windows-x86_64-exe/ifstools.exe
|
ifstools-2.0/.gitignore
ADDED
ifstools-2.0/Cargo.lock
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "adler2"
|
|
7
|
+
version = "2.0.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.11.1"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "cfg-if"
|
|
19
|
+
version = "1.0.4"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "crc32fast"
|
|
25
|
+
version = "1.5.0"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"cfg-if",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "fdeflate"
|
|
34
|
+
version = "0.3.7"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
|
|
37
|
+
dependencies = [
|
|
38
|
+
"simd-adler32",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "flate2"
|
|
43
|
+
version = "1.1.9"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
|
46
|
+
dependencies = [
|
|
47
|
+
"crc32fast",
|
|
48
|
+
"miniz_oxide",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[[package]]
|
|
52
|
+
name = "heck"
|
|
53
|
+
version = "0.5.0"
|
|
54
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
55
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "ifstools-native"
|
|
59
|
+
version = "0.1.0"
|
|
60
|
+
dependencies = [
|
|
61
|
+
"png",
|
|
62
|
+
"pyo3",
|
|
63
|
+
"texpresso",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[[package]]
|
|
67
|
+
name = "libc"
|
|
68
|
+
version = "0.2.186"
|
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
71
|
+
|
|
72
|
+
[[package]]
|
|
73
|
+
name = "libm"
|
|
74
|
+
version = "0.2.16"
|
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
+
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "miniz_oxide"
|
|
80
|
+
version = "0.8.9"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
|
83
|
+
dependencies = [
|
|
84
|
+
"adler2",
|
|
85
|
+
"simd-adler32",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
[[package]]
|
|
89
|
+
name = "once_cell"
|
|
90
|
+
version = "1.21.4"
|
|
91
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
93
|
+
|
|
94
|
+
[[package]]
|
|
95
|
+
name = "png"
|
|
96
|
+
version = "0.18.1"
|
|
97
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
+
checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
|
|
99
|
+
dependencies = [
|
|
100
|
+
"bitflags",
|
|
101
|
+
"crc32fast",
|
|
102
|
+
"fdeflate",
|
|
103
|
+
"flate2",
|
|
104
|
+
"miniz_oxide",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "portable-atomic"
|
|
109
|
+
version = "1.13.1"
|
|
110
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
112
|
+
|
|
113
|
+
[[package]]
|
|
114
|
+
name = "proc-macro2"
|
|
115
|
+
version = "1.0.106"
|
|
116
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
118
|
+
dependencies = [
|
|
119
|
+
"unicode-ident",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "pyo3"
|
|
124
|
+
version = "0.28.3"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
|
|
127
|
+
dependencies = [
|
|
128
|
+
"libc",
|
|
129
|
+
"once_cell",
|
|
130
|
+
"portable-atomic",
|
|
131
|
+
"pyo3-build-config",
|
|
132
|
+
"pyo3-ffi",
|
|
133
|
+
"pyo3-macros",
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
[[package]]
|
|
137
|
+
name = "pyo3-build-config"
|
|
138
|
+
version = "0.28.3"
|
|
139
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
+
checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
|
|
141
|
+
dependencies = [
|
|
142
|
+
"target-lexicon",
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
[[package]]
|
|
146
|
+
name = "pyo3-ffi"
|
|
147
|
+
version = "0.28.3"
|
|
148
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
149
|
+
checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
|
|
150
|
+
dependencies = [
|
|
151
|
+
"libc",
|
|
152
|
+
"pyo3-build-config",
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
[[package]]
|
|
156
|
+
name = "pyo3-macros"
|
|
157
|
+
version = "0.28.3"
|
|
158
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
159
|
+
checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
|
|
160
|
+
dependencies = [
|
|
161
|
+
"proc-macro2",
|
|
162
|
+
"pyo3-macros-backend",
|
|
163
|
+
"quote",
|
|
164
|
+
"syn",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[[package]]
|
|
168
|
+
name = "pyo3-macros-backend"
|
|
169
|
+
version = "0.28.3"
|
|
170
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
171
|
+
checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
|
|
172
|
+
dependencies = [
|
|
173
|
+
"heck",
|
|
174
|
+
"proc-macro2",
|
|
175
|
+
"pyo3-build-config",
|
|
176
|
+
"quote",
|
|
177
|
+
"syn",
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
[[package]]
|
|
181
|
+
name = "quote"
|
|
182
|
+
version = "1.0.45"
|
|
183
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
184
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
185
|
+
dependencies = [
|
|
186
|
+
"proc-macro2",
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
[[package]]
|
|
190
|
+
name = "simd-adler32"
|
|
191
|
+
version = "0.3.9"
|
|
192
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
+
checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
|
|
194
|
+
|
|
195
|
+
[[package]]
|
|
196
|
+
name = "syn"
|
|
197
|
+
version = "2.0.117"
|
|
198
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
200
|
+
dependencies = [
|
|
201
|
+
"proc-macro2",
|
|
202
|
+
"quote",
|
|
203
|
+
"unicode-ident",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
[[package]]
|
|
207
|
+
name = "target-lexicon"
|
|
208
|
+
version = "0.13.5"
|
|
209
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
211
|
+
|
|
212
|
+
[[package]]
|
|
213
|
+
name = "texpresso"
|
|
214
|
+
version = "2.0.2"
|
|
215
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
216
|
+
checksum = "8550677e2259d675a7841cb1403db35f330cc9e58674c8c5caa12dd12c51dc71"
|
|
217
|
+
dependencies = [
|
|
218
|
+
"libm",
|
|
219
|
+
]
|
|
220
|
+
|
|
221
|
+
[[package]]
|
|
222
|
+
name = "unicode-ident"
|
|
223
|
+
version = "1.0.24"
|
|
224
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
ifstools-2.0/Cargo.toml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "ifstools-native"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
|
|
7
|
+
[lib]
|
|
8
|
+
name = "_native"
|
|
9
|
+
crate-type = ["cdylib", "rlib"]
|
|
10
|
+
path = "rust/lib.rs"
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
png = "0.18.1"
|
|
14
|
+
pyo3 = { version = "0.28", features = ["extension-module", "abi3-py310"] }
|
|
15
|
+
texpresso = "2.0.2"
|
|
16
|
+
|
|
17
|
+
[profile.release]
|
|
18
|
+
lto = "fat"
|
|
19
|
+
codegen-units = 1
|
ifstools-2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 mon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ifstools-2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ifstools
|
|
3
|
+
Version: 2.0
|
|
4
|
+
Requires-Dist: kbinxml>=1.5
|
|
5
|
+
Requires-Dist: lxml
|
|
6
|
+
Requires-Dist: pillow
|
|
7
|
+
Requires-Dist: tqdm
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Summary: Extractor/repacker for Konmai IFS files
|
|
10
|
+
Author-email: mon <me@mon.im>
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Homepage, https://github.com/mon/ifstools/
|
|
14
|
+
|
|
15
|
+
# ifstools
|
|
16
|
+
Extractor for Konmai IFS files.
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
- Converts all textures to png without requiring a second program
|
|
20
|
+
- Repacks without ingame display issues
|
|
21
|
+
- Multithreaded recompression
|
|
22
|
+
- Only changed textures are recompressed, the rest are cached
|
|
23
|
+
- Works on eacloud music ifs files
|
|
24
|
+
- Correctly names files under `afp`, `bsi` and `geo` folders
|
|
25
|
+
- Converts internal binary xmls to plaintext, to facilitate further experimentation.
|
|
26
|
+
- Dumps the ifs manifest so you can explore the format
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
Just want an exe? [Download the latest](https://github.com/mon/ifstools/releases).
|
|
30
|
+
|
|
31
|
+
Have Python installed? Do this:
|
|
32
|
+
`pip install ifstools`
|
|
33
|
+
Then run `ifstools` from anywhere in a command prompt.
|
|
34
|
+
|
|
35
|
+
Have [uv](https://docs.astral.sh/uv/) installed? You can just `uvx ifstools`.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
```
|
|
39
|
+
usage: ifstools [-h] [-e] [-y] [-o OUT_DIR] [--tex-only] [-c]
|
|
40
|
+
[--bounds] [--uv] [--no-cache] [-m] [-s] [-r]
|
|
41
|
+
file_to_unpack.ifs|folder_to_repack_ifs
|
|
42
|
+
[file_to_unpack.ifs|folder_to_repack_ifs ...]
|
|
43
|
+
|
|
44
|
+
Unpack/pack IFS files and textures
|
|
45
|
+
|
|
46
|
+
positional arguments:
|
|
47
|
+
file_to_unpack.ifs|folder_to_repack_ifs
|
|
48
|
+
files/folders to process. Files will be unpacked,
|
|
49
|
+
folders will be repacked
|
|
50
|
+
|
|
51
|
+
optional arguments:
|
|
52
|
+
-h, --help show this help message and exit
|
|
53
|
+
-e, --extract-folders
|
|
54
|
+
do not repack folders, instead unpack any IFS files
|
|
55
|
+
inside them
|
|
56
|
+
-y don't prompt for file/folder overwrite
|
|
57
|
+
-o OUT_DIR output directory
|
|
58
|
+
--tex-only only extract textures
|
|
59
|
+
-c, --canvas dump the image canvas as defined by the
|
|
60
|
+
texturelist.xml in _canvas.png
|
|
61
|
+
--bounds draw image bounds on the exported canvas in red
|
|
62
|
+
--uv crop images to uvrect (usually 1px smaller than
|
|
63
|
+
imgrect). Forces --tex-only
|
|
64
|
+
--no-cache ignore texture cache, recompress all
|
|
65
|
+
--rename-dupes if two files have the same name but differing case
|
|
66
|
+
(A.png vs a.png) rename the second as "a (1).png" to
|
|
67
|
+
allow both to be extracted on Windows
|
|
68
|
+
-m, --extract-manifest
|
|
69
|
+
extract the IFS manifest for inspection
|
|
70
|
+
--super-disable only extract files unique to this IFS, do not follow
|
|
71
|
+
"super" parent references at all
|
|
72
|
+
--super-skip-bad if a "super" IFS reference has a checksum mismatch, do
|
|
73
|
+
not extract it
|
|
74
|
+
--super-abort-if-bad if a "super" IFS reference has a checksum mismatch,
|
|
75
|
+
cancel and display an error
|
|
76
|
+
-s, --silent don't display files as they are processed
|
|
77
|
+
-r, --norecurse if file contains another IFS, don't extract its
|
|
78
|
+
contents
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Build an exe
|
|
82
|
+
`pip install pyinstaller`
|
|
83
|
+
`pyinstaller ifstools_bin.py --onefile -n ifstools`
|
|
84
|
+
Recommend doing this in a fresh venv so the module finder doesn't include more than required.
|
|
85
|
+
|
|
86
|
+
Notes:
|
|
87
|
+
- dxt5 texture repacking is not fully supported - they will silently be converted to argb8888rev
|
|
88
|
+
|
|
89
|
+
Todo:
|
|
90
|
+
- Recursive repacking for ifs inside ifs
|
|
91
|
+
|
|
92
|
+
I hope the rest is self explanatory. Confused? Create a new issue and tell me what docs to add.
|
|
93
|
+
|
|
@@ -18,6 +18,8 @@ Have Python installed? Do this:
|
|
|
18
18
|
`pip install ifstools`
|
|
19
19
|
Then run `ifstools` from anywhere in a command prompt.
|
|
20
20
|
|
|
21
|
+
Have [uv](https://docs.astral.sh/uv/) installed? You can just `uvx ifstools`.
|
|
22
|
+
|
|
21
23
|
## Usage
|
|
22
24
|
```
|
|
23
25
|
usage: ifstools [-h] [-e] [-y] [-o OUT_DIR] [--tex-only] [-c]
|
|
@@ -46,8 +48,17 @@ optional arguments:
|
|
|
46
48
|
--uv crop images to uvrect (usually 1px smaller than
|
|
47
49
|
imgrect). Forces --tex-only
|
|
48
50
|
--no-cache ignore texture cache, recompress all
|
|
51
|
+
--rename-dupes if two files have the same name but differing case
|
|
52
|
+
(A.png vs a.png) rename the second as "a (1).png" to
|
|
53
|
+
allow both to be extracted on Windows
|
|
49
54
|
-m, --extract-manifest
|
|
50
55
|
extract the IFS manifest for inspection
|
|
56
|
+
--super-disable only extract files unique to this IFS, do not follow
|
|
57
|
+
"super" parent references at all
|
|
58
|
+
--super-skip-bad if a "super" IFS reference has a checksum mismatch, do
|
|
59
|
+
not extract it
|
|
60
|
+
--super-abort-if-bad if a "super" IFS reference has a checksum mismatch,
|
|
61
|
+
cancel and display an error
|
|
51
62
|
-s, --silent don't display files as they are processed
|
|
52
63
|
-r, --norecurse if file contains another IFS, don't extract its
|
|
53
64
|
contents
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.7,<2"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ifstools"
|
|
7
|
+
version = "2.0"
|
|
8
|
+
description = "Extractor/repacker for Konmai IFS files"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "mon", email = "me@mon.im"},
|
|
12
|
+
]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"kbinxml>=1.5",
|
|
15
|
+
"lxml",
|
|
16
|
+
"pillow",
|
|
17
|
+
"tqdm",
|
|
18
|
+
]
|
|
19
|
+
requires-python = ">=3.10"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://github.com/mon/ifstools/"
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
ifstools = "ifstools:main"
|
|
26
|
+
|
|
27
|
+
[tool.maturin]
|
|
28
|
+
python-source = "src"
|
|
29
|
+
module-name = "ifstools.handlers._native"
|
|
30
|
+
features = ["pyo3/extension-module"]
|