Files
グローランプ 89bd77e306 IO: Resolve IO DLL paths from environment variables (#119)
## Summary

Adds a unified mechanism for locating third-party IO DLLs through environment
variables, on top of the existing per-game `[xxxio] path=` INI setting.

## Changes

For each IO DLL, the path is resolved in this order:

1. The section-specific INI value, e.g. `[mai2io] path=`.
2. The section-specific environment variable, e.g. `SEGATOOLS_MAI2IO_PATH`.
3. `SEGATOOLS_IO_ROOT` joined with the default IO DLL filename, e.g.
   `%SEGATOOLS_IO_ROOT%\mai2io.dll`.
4. Empty path, which keeps the built-in IO implementation (unchanged default).

INI and environment-variable paths are run through Windows environment-variable
expansion, so values such as `%SEGATOOLS_IO_ROOT%\mai2io.dll` are valid in the
INI directly.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/119
Co-authored-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
Co-committed-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
2026-07-08 20:23:08 +00:00

36 lines
720 B
Meson

util_lib = static_library(
'util',
include_directories : inc,
implicit_include_directories : false,
dependencies : [
capnhook.get_variable('hook_dep'),
imagehlp_lib,
],
sources : [
'async.c',
'async.h',
'crc.c',
'crc.h',
'dll-bind.c',
'dll-bind.h',
'dprintf.c',
'dprintf.h',
'dump.c',
'dump.h',
'fg-detect.c',
'fg-detect.h',
'get_function_ordinal.c',
'get_function_ordinal.h',
'io-path.c',
'io-path.h',
'lib.c',
'lib.h',
'slurp.c',
'slurp.h',
'str.c',
'str.h',
'env.c',
'env.h',
],
)