Repository navigation
Open
Description
Hi, I noticed the "Start porting to Linux" commits in September and wanted to check in before doing anything that might clash with your plans.
I play D2R on Linux (Battle.net under umu-launcher + GE-Proton) and would like to help get d2modgen working natively there, ideally as PRs to this repo. I've done some groundwork already:
- CascLib works on Linux. The pinned submodule builds unchanged on Linux and opens a real D2R install inside a Wine/Proton prefix (product
osi, build 93847), reading the excel tables offline with the same callsCascStorage.cppused before the stubs. The main code changes are un-gatinginclude(CascLib)/include(StormLib)in CMake and passing UTF-8char*paths instead of.wstring()on non-Windows. - StormLib needs a small CMake fix on Linux: drop
lzma/C/LzFindMt.candThreads.c, and define_7ZIP_ST BZ_STRICT_ANSI(this matches StormLib's own CMake). - Paths on Linux come from a Wine prefix. The D2R install,
Saved Games, andBattle.net.configall live inside the prefix (for example~/Games/battlenet/drive_c/..., Windows usersteamuserunder Proton). They can be found by reading the prefix'ssystem.reg/user.reginstead of the Windows registry. - The Extra tab maps over too: editing
Battle.net.configworks the same under Wine, and launchingD2R.exe -mod <name> -txtdirectly through a runner such asumu-runappears to work without a Battle.net hand-off. Linux would get a.desktopfile instead of a.lnk.
Questions before I go further:
- Are you actively working on Linux support, and is there anything in progress I should build on rather than duplicate?
- Would you accept PRs for this? If so, do you prefer one PR or a series (for example: build and CASC reading -> prefix-based path detection -> Extra-tab actions -> packaging)?
- Where should platform-specific code live?
UIController.cppfree functions, a new module in CoreLib (somodgen_consolebenefits too), ormernel(for examplecreateShortCut/AppLocations)? - Any preference on Linux distribution (AppImage built in CI next to the Windows zip, or build-from-source only)?
Happy to adjust to whatever direction you have in mind. Thanks for the tool!
Metadata
Metadata
Assignees
Labels
No labels
Activity
mapron commentedon Oct 4, 2026
I will gladly accept PR for proper fix for Linux. I just added Github CI actions to check Win/Linux builds, and support was preliminary as I don't have linux host right now (not a big deal but don't bother at the moment).
You can place free functions on UIController, yes, why not.
One suggestion: make build for core (casc/storm) a separate PR from UI thingies (like shortcuts).
Yes, you can open MR for mernel for shortcut code. This method is utilized by FreeHeroes project, it will do no harm have extra implementation.
No preference on distros. I mean, upstream library should be distro-agnostic. I would like to keep github actions with ubuntu-24.04 (or latest provided). That's it.
mapron commentedon Oct 4, 2026
"I play D2R on Linux" yet I had discussion with friend "surely there is dozen people who play D2R on linux and no chance they are interested in modgen" lmao...
mapron commentedon Oct 18, 2026
@bertuss so will you look on that or should I fix linux build myself? I will need to set VM to see what issues with storm/casc are...
leduythuccs commentedon Nov 10, 2026
I'm looking into this issue. Getting the core to work (build succeeds) is relatively easy. The hard part is adapting the
Extratab to Linux, because it would need:.desktopfile, it would need to know how you run the game -> this is the hardest part for me.leduythuccs commentedon Nov 10, 2026
The way I implemented the Extra tab is as follows:
Extraactions..lnkfile on the Wine prefix's desktop. The reason for not creating a.desktopfile is that we don't have information about how the user is running the game.For me the
lnkfile is good enough, we could launch it through our running just fineI would love to discuss more before open a new PR for this!
mapron commentedon Nov 10, 2026
Yeah just make wine prefix permanent kkey in schema.yaml but widget in QML should be under linux condition.
about wine shortcut - sounds good, you are more user that me to decide! Well I used Linux for ages but never played games with wine .
leduythuccs commentedon Nov 11, 2026
#48 fixed most of extra tab, except the
.lnk.I've just realized that create the
lnkrequired windows API, so now we have 3 options:.lnk, we need to implement the windows API (or some workarounds, haven't look deep into this).desktop, this will require user to input the runner command. Tho I'm not entirely sure this work for all runner.What do you think?