Commit graph

243 commits

Author SHA1 Message Date
7384d3359c
Only use texture files for texture-meta command
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
2025-03-06 13:32:47 +01:00
572778f210
dtmt: Fix file injection
I ended up wrapping the raw data in a `BundleFile` twice.
I also made '--compile' the default, as it should be much less often
that raw data needs to be inserted. Even files that are essentially raw
binary blobs, like `.wwise_event`, still have some custom fields that
need to be accounted for.
2025-02-19 11:14:09 +01:00
4bf97e9f19
Add cmdline to tracing output
Can come in handy when other people report problems and show the error
message or full log, but not the command line.

Setting that span to `level = "error"` ensures that it won't be disabled
by level filters.
2025-02-19 11:14:07 +01:00
6f6df14bfc
Refactor code for file injection 2025-02-19 11:14:05 +01:00
bcbc005df7
Implement more texture formats
The second compression method found in the game's code seems to be Zlib,
but it doesn't seem to be used in the game files. What does get used is
a compression type of `0`, which appears to be uncompressed data.

For DDS formats, all the ones that are currently used by in the game
files can be emitted as is. Though for some of them, other tools might
not be able to display them.
2025-02-19 11:14:04 +01:00
126d3c743d
dtmt: Add option to compile file when injecting 2025-02-19 11:12:06 +01:00
ea7886b08f
feat(sdk): Implement partial texture decompilation 2025-02-19 11:12:05 +01:00
a2bbab1398
Update dependencies
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
2024-08-21 14:33:39 +02:00
df2992a476
Improve mod template comments
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
2024-08-20 16:28:56 +02:00
e336240094
Consilidate template libraries
Remove last uses of `string_template` in favor of `minijinja`.

Closes #124.
2024-08-20 16:28:08 +02:00
d931e6b9ca
dtmt: Add command to search for files
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Not really of much use at the moment, but inspired by the HD2 community.
2024-07-28 22:04:14 +02:00
7fa08c2efd
dtmt: Implement listing bundle database contents 2024-07-28 22:03:43 +02:00
c997489e18
Add some doc comments 2024-07-19 09:48:23 +02:00
edad0d4493
Improve file listing output
Adds pretty printing for file size and always shows the bundle hash name
2024-07-19 09:48:20 +02:00
95fc6c160b
dtmt: Implement name overrides
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
For most of the game files, we don't know the actual name, only the hash
of that name. To still allow building bundles that contain files with
that name (e.g. to override a game file with a custom one), there needs
to be a way to tell DTMT to name a file such that its hash is the same
as the one in the game.
The initial idea was to just expect the file name on disk to be the
hash, but that wouldn't allow for arbitrary folder structures anymore.

So instead, there is now a new, optional setting in `dtmt.cfg`, where
the modder can map a file path to an override name.
2024-07-18 09:50:48 +02:00
a4e78f1c6b
Log deployment data
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Closes #168
2024-07-12 14:35:43 +02:00
1020efe53d
Add version field to mod loader logging
Ref: #168
2024-07-12 14:34:55 +02:00
ba31d51098
Align Crashify property with Fatshark
They recently submitted a PR to DML with their preferred property names,
so we should match that.

Ref: #168
2024-07-12 13:41:29 +02:00
0539b6b456
Strip block whitespace in templates
Ref: #168
2024-07-12 13:41:19 +02:00
84606814fd
Add application icon
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
2024-07-10 23:27:43 +02:00
e6f1e7c117
Fix load order verification
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
With `.enumerate()` after `.filter()`, the resulting indices didn't
properly map back to the overall mod list anymore. But the checks
afterwards relied on that.
Moving the `.enumerate()` before the `.filter()` makes sure that the
indices are correct.
2024-07-10 21:54:51 +02:00
91651a8467
Apply linter fixes in mod_main.lua
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
2024-07-10 20:02:27 +02:00
05df72635a
dtmm: Pull ModLoader in
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Closes #155.
2024-07-10 19:49:00 +02:00
0f14834e2d
Remove string_template
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Use minijinja for all templates
2024-07-10 18:41:38 +02:00
ef4c2a1d94
Update interprocess 2024-07-09 16:16:46 +02:00
189c3199a0
Update bitflags 2024-07-09 16:16:42 +02:00
b8ac80562a
Update zip 2024-07-09 16:16:37 +02:00
4bc5777a4b
Update notify 2024-05-15 20:04:47 +02:00
ae30499a49
Remove unused dependency 2024-05-15 19:19:54 +02:00
bac75e1c9a
Update confy 2024-05-15 18:58:08 +02:00
dfd51513da
Update strip-ansi-escapes
Removes duplicate dependency of arrayvec.
2024-05-15 16:32:45 +02:00
535a30a7ca
Add simpler shell parser
This obsoletes `shlex`. The quoting turned out unnecessary, and the
splitting supported a lot more than we need. It also forced
unncessary allocations: The splitting doesn't add any characters and
keeps UTF-8 intact, so returning slices from the input is perfectly
possible.
Though this particular implementation will only come to use in the
future, as `CmdLine` still requires that the slices are cloned.

Still, the custom implementation performs about 3x faster.
2024-05-15 16:32:44 +02:00
86ed5c327f
Update crates
All checks were successful
build/msvc Build for the target platform: msvc
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
`steamlocate` changed its API again.
`shlex` deprecated `quote`, but that will be addressed later.
2024-05-15 13:41:44 +02:00
cfee6d9121
Fix clippy lints 2024-05-15 13:41:42 +02:00
103775e032
dtmm: Replace icon for mod update notification
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Closes #158.
2023-12-05 14:28:12 +01:00
1bc0fe28fb Merge pull request 'dtmm: Extend NexusInfo' (#163) from feat/nexus-info into master
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #163
2023-12-05 13:15:33 +01:00
169f4deea9 Merge pull request 'dtmm: Enforce skipping packages for non-bundled mods' (#162) from issue/non-bundled-packages into master
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #162
2023-12-05 10:45:17 +01:00
a0791cba41
dtmm: Extend NexusInfo
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
This provides forward compatibility, in case I ever want to use those
fields. If I only added them at the time when they are needed, I would
need to come up with a process to load the `nexus.sjson` with missing
fields.

Closes #130.
2023-12-05 10:40:29 +01:00
5f5d46ffa7 Merge pull request 'Add link to open mod on Nexus' (#160) from feat/nexus-link into master
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #160
2023-12-05 10:13:06 +01:00
0fb10d9d69
dtmm: Enforce skipping packages for non-bundled mods
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Fixes #161.
2023-12-05 10:11:51 +01:00
57771617ff
dtmm: Add link to open mod on Nexus
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Closes #157.
2023-12-04 16:48:18 +01:00
5278041ddb
Use Nexus mod name when available
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Fixes #154.
2023-12-04 13:40:00 +01:00
4c6ad1aaed
Reduce debug verbosity
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Prevent binary buffers inflating the log output.
2023-11-30 18:11:53 +01:00
031c03480d
dtmm: Add .desktop file
A basic Desktop Entry file for the Linux, which includes the
configuration for the `nxm://` scheme handling.
2023-11-30 17:50:48 +01:00
6f848bb837
dtmm: Implement NXM URI handler
Closes #31.
2023-11-30 17:50:07 +01:00
5bcc4b8c70
Merge branch 'master' into feat/nexus-file-version
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
* master:
  dtmm: Fix writing Nexus image to disk
  dtmm: Fix importing from `.mod` file
  ci: Combine Dockerfiles into multi-stage build
  ci: Rework MSVC image building
  ci: Fix base pipeline
  ci: Improve caching setup for image building
  ci: Create build artifacts for commits on master
  ci: Fix undefined variable
  Add changelog entry
  dtmm: Fetch mod image from Nexus
2023-11-29 15:42:00 +01:00
2ad3fd0fc1
dtmm: Fix importing from .mod file 2023-11-29 15:31:05 +01:00
61e78e9718
dtmm: Fix writing Nexus image to disk
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
2023-11-29 15:21:34 +01:00
b3305e87b8
dtmm: Fix importing from .mod file 2023-11-29 15:21:07 +01:00
246564d00f
Fetch file version from Nexus
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
When importing an archive file downloaded from Nexus, the file name does
include a version field. But, presumably for compatibility reasons,
Nexus replaces special characters with `-`, so that this field doesn't
match common schemes like `1.0.0`.
So instead we use the also included update timestamp to find the
corresponding file info from Nexus and use the version data from that.

Closes #131.
2023-11-24 13:54:19 +01:00