-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "MINETEST_MOD_PATH" environment variable #11515
Conversation
d10ea2a
to
b729a5b
Compare
The patch is rebased on 'master' now. |
b729a5b
to
4251309
Compare
It's rebased on latest master (untested). |
Well I guess if we already have |
4251309
to
c55dcd7
Compare
I'll test the new version and try to write some tests. Edit: I added a unit test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The env variable should be documented somewhere.
3e25bab
to
20d273a
Compare
@Desour: The similar environment variable MINETEST_SUBGAME_PATH is documented in doc/minetest.6. Would that be a good location to document MINETEST_MOD_PATH as well, or were you thinking of some other location? |
This adds an environment variable MINETEST_MOD_PATH. When it exists, Minetest will look there for mods in addition to ~/.minetest/mods/. Mods can still be installed to ~/.minetest/mods/ with the built-in installer. With thanks to Leo Prikler, sfan5 and DS for reviewing.
The client still needs to be tested manually.
bd956a1
to
05e31f4
Compare
Changed Desour->DS |
I did a little testing on GNU Guix, which has a patched version of Minetest to support
Check list
Even though I installed mesecons via guix, I can still install mesecons from the Now I try to resolve this conflict by deleting the mod from ContentDB via the built-in |
Sounds fine, I guess. |
The latest version should address everything I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed some minor changes, hope you don't mind.
Looks good now
@sfan5: The changes seem fine to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sure, why not?
I noticed one issue lately, when combining what is in Guix known as ‘profiles’ (Guix uses an early version of this If I install minetest and a mod, say
and this directory contains
where the former directory contains the |
It looks like the environment variable doesn't work for loading mods that are split into a modpack, such as WorldEdit. If I have the Awards mod and WorldEdit mod installed into |
WorldEdit seems to work fine in guix (using In guix, Now testing with multiple mods ... |
worldedit + mesecons seems to work for me |
Oh never mind, it works for me now, I don't know why it didn't work before... sorry 😅 |
This patch adds an environment variable "MINETEST_MOD_PATH". It functions like "MINETEST_SUBGAME_PATH", but for individual mods. This is necessary for installing minetest mods with Guix (see https://issues.guix.gnu.org/49828), otherwise Minetest won't find the mods.
I tested that installing mods from ContentDB with the built-in installer still works, even if "MINETEST_MOD_PATH" is set.
To do
This PR is Ready for Review.
How to test
Set "MINETEST_MOD_PATH" to "/location/of/some/mod:/location/of/some/other/mod", start Minetest, create a world, select the two mods, start the game, verify the two mods are actually loaded. Test that mods can still be installed with the built-in installer, and they are installed in ~/.minetest/mods, not /location/of/some/mod or /location/of/some/other/mod.