Commit graph

312 commits

Author SHA1 Message Date
9882720675
Delay mod loading
Some checks failed
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
The initial implementation of DML ended up loading mods quite late,
which did give it the benefit of all `Manager`s being available.
This change therefore moves mod loading until after those are
initialized.

But contrary to old DML, we still create a separate game state to make
sure the game doesn't advance until mods are loaded. This avoids race
conditions like the one where LogMeIn needs to come early in the load
order.
2023-11-16 21:14:50 +01:00
1df5f47c2c
Prevent excessive debug logs 2023-11-16 20:07:51 +01:00
5ac66779c2
Use version number from Nexus import
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
Non-bundled mods come without a `dtmt.cfg`, and therefore without a
version number. But we need a version number at import to compare to
for the Nexus update check.
2023-11-14 16:19:07 +01:00
dcf7faf45d
Use mod name from Nexus if necessary
Non-bundled mods come without `dtmt.cfg` and therefore no way to
provide a user friendly name. Similar to the other fields, use the one
from Nexus in that case.
2023-11-14 15:38:51 +01:00
0bc8779b9d
Fix Nexusmods API key not being loaded from config 2023-11-14 15:07:07 +01:00
89608498ef
Fix missing Mods.original_require 2023-11-14 15:06:19 +01:00
d0e074ccce
Use template engine to build mod_data.lua
The string-building version became too complex to maintain properly.
2023-11-14 15:06:12 +01:00
b1ff69fa08
Move deployment directory for legacy mods
This moves it back to its original place at `$game_dir/mods`.
2023-11-13 09:45:31 +01:00
78e4d644f0
Implement deploying non-bundled mods
Closes #113.
2023-11-13 09:45:08 +01:00
00673be557
Update luajit2-sys 2023-11-09 19:51:25 +01:00
7a325b0361
Apply clippy lints 2023-11-09 19:48:40 +01:00
192f942927
Apply formatting 2023-11-08 15:06:53 +01:00
7f84b2fe9a
Add mod config option for loose files
Just the field in the config file, for now.
2023-11-08 15:04:32 +01:00
b7b76412a3 Merge pull request 'oodle: Fix linking statically' (#121) from issue/static-linking into master
Reviewed-on: #121
2023-11-08 11:12:25 +01:00
afe4e82c47
ci: Copy the correct library files
Some checks failed
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-08 10:50:42 +01:00
fc759c005d
oodle: Fix building for target Windows
Some checks failed
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-08 09:43:50 +01:00
5f43fd17ba
Vendor ansi-parser
The fork updates `nom` to version 7, removing rustc's deprecation
warning.
2023-11-08 09:43:18 +01:00
9aae4c1e29
Fix CI build task 2023-11-07 15:47:38 +01:00
08d417fd5d
Update steamlocate-rs
While this is an unstable dev release, its only significant change is
exactly the one I need: dropping `steam-vdf` and its out-of-date `nom`
dependency.
2023-11-07 15:45:58 +01:00
f197b1944b
ci: Fix incorrect exit code
Some checks failed
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
The runner wouldn't properly exit with a failure code, so it always
looked like success in the UI.
2023-11-07 10:54:13 +01:00
db8194efec
Update crates
Some checks failed
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
2023-11-07 09:25:01 +01:00
48f98a43fe
oodle: Fix linking statically
Some checks failed
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
2023-11-06 13:42:51 +01:00
6a2eccb630
Merge branch 'feat/lua'
* feat/lua:
  sdk: Use common ljd flags
  sdk: Don't wait for cleanup
  sdk: Implement decompiling Lua
2023-10-31 10:50:53 +01:00
7080dcb8de
sdk: Use common ljd flags
Some checks failed
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
2023-10-30 14:07:00 +01:00
57224622d9
sdk: Don't wait for cleanup
Some checks failed
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
2023-10-30 09:28:15 +01:00
93db78d58f
sdk: Implement decompiling Lua
Closes #48.
2023-10-30 09:28:07 +01:00
8fba489bb3
Merge branch 'issue/118'
* issue/118:
  Update dependencies
2023-09-26 10:05:31 +02:00
2f5939d44d
Update dependencies
Some checks failed
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
Fixes #118.
Through changes in nightly feature flags, `proc-macro2` needed to be
updated.
2023-09-26 09:56:31 +02:00
70e22e1dfb
Assign mod loader as global manager 2023-08-30 01:36:46 +02:00
a98b9fae95 Merge pull request 'Fix FFI import' (#116) from fix/ffi into master
Reviewed-on: #116
2023-07-22 14:40:59 +02:00
6ef4c2e094
refactor: Format Lua code 2023-07-22 14:39:51 +02:00
9b8f07d125
fix: Fix FFI import 2023-07-22 14:39:35 +02:00
e42ab9c1ff Merge pull request 'feat(dtmm): Guard certain Lua libraries behind a setting' (#114) from feat/unsafe-lualibs into master
Reviewed-on: #114
2023-04-25 16:52:29 +02:00
707a3ead8b
feat(dtmm): Guard certain Lua libraries behind a setting
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
Libraries like `io`, `os` and `ffi` allow practically unrestricted
access to the system's files and running arbitrary operations.
The base game removes them for this reason, and while we don't want to
disable them permanently, very few mods should ever have a need for
them.

So we hide them behind a setting, worded so that people only enable it
when absolutely needed.

Closes #112.
2023-04-24 16:45:49 +02:00
af6c2e9f82 Merge pull request 'Fix compiling Lua on Windows' (#111) from issue/110 into master
Reviewed-on: #111
2023-04-09 14:43:17 +02:00
93388a6299
fix(sdk): Fix compiling Lua on Windows
The previous fix when the compiled bytecode wasn't accepted by the game
did work fine for Linux. But apparently on Windows, it procudes a stack
overflow when attempting to open a Lua state.

This reverts LuaJIT to a commit from 2019, which is quite old, but does
work. Further investigation is needed to determine if or how never
versions of LuaJIT could be used.

Fixes #110.
2023-04-09 14:37:07 +02:00
690098d7c7
feat(dtmm): Improve debug logging
This re-enables stdout/stderr logging for release binaries for DTMM.
As a GUI application, it usually won't be started from a CLI, and there
should be no negative impact from that.
But since stdout logging is synchronous and much faster than the async
action that writes to the log file, it might get to log more when the
application panics.
2023-04-09 14:33:55 +02:00
15c61fa67f
feat: Run build commands as user
This stops docker from creating build files as root, which in turn
require root permissions to clean.
2023-04-09 14:32:21 +02:00
4406a68d8a Merge pull request 'Skip mods folder in dtkit reset' (#108) from issue/107 into master
Reviewed-on: #108
2023-04-09 09:59:57 +02:00
7f5da1e09c
fix(dtmm): Skip mods folder in dtkit reset
Fixes #107.
2023-04-09 09:59:06 +02:00
a1edef3b6f Merge pull request 'Improve logging' (#106) from feat/log-file into master
Reviewed-on: #106
2023-04-06 14:56:07 +02:00
ebe8966c26
feat(dtmm): Add log level option
Closes #12.
2023-04-06 14:54:46 +02:00
a246e5acb6
feat(dtmm): Log to file 2023-04-06 14:49:43 +02:00
9ab92499a8 Merge pull request 'Fix ANSI color parsing' (#105) from feat/color-log into master
Reviewed-on: #105
2023-04-06 13:04:14 +02:00
7567c41143
fix(dtmm): Fix ANSI color parsing 2023-04-06 13:00:30 +02:00
f1d6912a90 Merge pull request 'Fix creating invalid bytecode' (#104) from issue/99 into master
Reviewed-on: #104
2023-04-06 12:23:55 +02:00
1887cdf2ef
fix(sdk): Fix creating invalid bytecode
An update to LuaJIT made an option enabled by default that changed the
bytecode output.

Fixes #99.
2023-04-06 12:17:16 +02:00
f337053314 Merge pull request 'Fix creating default config' (#100) from issue/98 into master
Reviewed-on: #100
2023-04-05 21:26:02 +02:00
93e521f03a Merge pull request 'feat(ci): Add Dockerfiles to build locally' (#103) from feat/ci into master
Reviewed-on: #103
2023-04-05 20:33:10 +02:00
64c35a62a9
feat(ci): Add Dockerfiles to build locally 2023-04-05 20:22:29 +02:00