macOS (Steam): ModTek.Preloader.dll not found since run.sh stopped prefixing DOORSTOP_TARGET_ASSEMBLY (v4.5.2)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 79/100
Hướng nghiên cứu
Đọc nhánh Darwin của run.sh, đặc biệt là cách xử lý additional_path cho DOORSTOP_TARGET_ASSEMBLY và DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE. Tái hiện việc khởi chạy Steam theo thiết lập macOS đã được tài liệu hóa và kiểm tra đường dẫn assembly mà Doorstop phân giải. Hoàn tất khi preloader mở từ Contents/Resources/Mods/ModTek/lib/ và trò chơi hiển thị /W MODTEK; issue cũng đề xuất một thay đổi một dòng cần đánh giá với GOG.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Title: macOS (Steam): ModTek.Preloader.dll not found since run.sh stopped prefixing DOORSTOP_TARGET_ASSEMBLY (v4.5.2)
Summary
On macOS with the Steam build of BATTLETECH, ModTek v4.5.2 does not load. Doorstop injects fine, but DOORSTOP_TARGET_ASSEMBLY resolves against the install root instead of Contents/Resources, so ModTek.Preloader.dll is never opened. Commit 195e9e7 ("fix DOORSTOP_TARGET_ASSEMBLY in run.sh", PR #254) removed the $additional_path prefix that this launch path needs. Restoring that one line fixes it for me.
Environment
- macOS 27.2.1 (build 26B131), Apple Silicon, game runs under Rosetta (x86_64 binary)
- BATTLETECH from Steam, installed at
<install> - ModTek v4.5.2 (tag v4.5.2 and
latestpoint at the same commit, 1ba99b0) run.shSHA-256:80b280769fa20405a214f59bfbe275cfce9a1d4744660e9b8f72f02900268494- ModTek files copied into
BattleTech.app/Contents/Resources,chmod +x run.sh, Steam launch option generated with the documentedechocommand, code signature removed fromContents/MacOS/BattleTech
Steps to reproduce
- Install ModTek per INSTALL.md (macOS, Steam) with the files in
Contents/Resources. - Launch from Steam.
- The main menu shows no
/W MODTEKsuffix.
What I see
run.sh logs pwd as the install root (<install>, not Resources). Using the verbose Doorstop library from the zip (doorstop/verbose/libdoorstop.dylib), launched from Terminal with SteamAppId=637090:
[Doorstop] DOORSTOP_TARGET_ASSEMBLY: <install>/Mods/ModTek/lib/ModTek.Preloader.dll
[Doorstop] DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE: BattleTech.app/Contents/Resources/Mods/ModTek/lib/
[Doorstop] Mono search path: <install>/BattleTech.app/Contents/Resources/Mods/ModTek/lib:...
[Doorstop] Opening assembly: <install>/Mods/ModTek/lib/ModTek.Preloader.dll
[Doorstop] Failed to open assembly: <install>/Mods/ModTek/lib/ModTek.Preloader.dll
The search path override is correct because run.sh prefixes it with BattleTech.app/Contents/Resources/. The target assembly is not prefixed, so it points to a folder that doesn't exist (Mods lives under Resources).
Cause
Commit 195e9e7 removed this line from the Darwin branch:
DOORSTOP_TARGET_ASSEMBLY="$additional_path/$DOORSTOP_TARGET_ASSEMBLY"
Its description says the prefix stopped Doorstop from finding the assembly on a GOG launch (Apple M5 Pro, Tahoe 26.5.2). I suspect the working directory differs between the GOG and Steam launch paths, though I haven't verified how GOG starts the game. With the line removed, DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE still gets the prefix but the target assembly does not, so the two are resolved against the same working directory inconsistently.
Proposed fix
Minimal, tested: restore the removed line right after the additional_path= line in the Darwin branch. With it, the log shows the preloader opening from .../Contents/Resources/Mods/ModTek/lib/ and ModTek loads. [Confirm: Steam launch shows /W MODTEK.]
More robust, untested: make both paths independent of the working directory by resolving them from $BASEDIR:
DOORSTOP_TARGET_ASSEMBLY="$BASEDIR/$DOORSTOP_TARGET_ASSEMBLY"
That might work for both launchers, but I haven't tried it, and I haven't tried it with the search-path override.
Related documentation problems (macOS)
- INSTALL.md says to run
codesign --remove-signature BattletechinResources. The executable is inContents/MacOS, so the command fails with "No such file or directory" inResources. - The step is needed with the current stock binary: it has hardened runtime (
flags=0x10000(runtime), Developer ID, Paradox).lsofshowedlibdoorstop.dylibnot mapped with the signature in place, and mapped after removal. - Steam's "Verify integrity of game files" restores the signature, so the step has to be repeated after verifying or updating.
- Ngôn ngữ chính
- C#
- Star
- 139
- Fork
- 40
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của BattletechModders/ModTek
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
BattletechModders/ModTek#251 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
BattletechModders/ModTek#250 ·
-
bug help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
BattletechModders/ModTek#248 · 1 bình luận ·
-
bug help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
BattletechModders/ModTek#247 · 18 bình luận ·
-
Steam DeckĐang mởdocumentation help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
BattletechModders/ModTek#246 · 1 bình luận ·
Tất cả issue của BattletechModders/ModTek
Issue tương tự
-
area-VM-meta-mono untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/sqltoolsservice#2851 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage/untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
unoplatform/uno#26844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
elsa-workflows/elsa-foundation#6322 ·
Maintainer thường phản hồi trong vòng 1 ngày