Module depends on other module.
-
Say I want to make a scriptmodule to install, for example, a Doom mod (IWAD), that relies on an existing lr-prboom installation. How would I write the scriptmodule to check for and install or update if necessary, the other package? I see
@fn hasPackage()
but it looks like this only works for native Debian packages and not RP's own packages, right?Would I just manually query the appropriate
retropie.pkg
in the PRboom install dir, or is there a slicker way? -
Use rp_isInstalled to check if another scriptmodule is installed.
-
@mitu ah thanks, I knew I had seen an
rp_something
I was just looking in the wrong place (helpers).And then if it's not installed, I'd do that with
rp_installModule lr-prboom
which is the same asrp_callModule lr-prboom _auto_
right?Would this all go in the
depends_
function of the other module?And if I want to make sure it's the latest version anyway, could I just skip the check for
rp_isInstalled
and just do something like this?function depends_mymod() { rp_callModule lr-prboom _autoupdate_ }
-
@sleve_mcdichael said in Module depends on other module.:
And then if it's not installed, I'd do that with rp_installModule lr-prboom which is the same as rp_callModule lr-prboom auto right?
Yes.
Would this all go in the depends_ function of the other module?
Yes, you can add it there.
And if I want to make sure it's the latest version anyway, could I just skip the check for rp_isInstalled and just do something like this?
...You could, but that would attempt to install/check update for
lr-prboom
each time instead of just checking locally thatlr-prboom
is installed.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.