Optional dependency

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
hermestrismi
Posts: 626
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Optional dependency

Post by hermestrismi »

Hi
I forget how to make a dependency optional instead of mandatory. Can someone help please
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Optional dependency

Post by Atreides »

They're always optional.
User avatar
hermestrismi
Posts: 626
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Re: Optional dependency

Post by hermestrismi »

Atreides wrote: December 5th, 2023, 9:05 pm They're always optional.
This was what I thought until the error "you don't have the file name" came
So, I need just to add IFHAVE (depencency name) to grap a file from them or add a variable to the Dependency and then
Check if that variable exist
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Optional dependency

Post by Atreides »

Yeah "optional" but not since they can with great ease break if missing. I believe the onus is on the programmer of the addons to build in safeties if they want. In fact I did just that come to think of it. I put a long list of dependencies and the addon that recommends them checks to see if in fact they exist or not.

I don't know though what would happen if one installed EoMa without its resources depency. Maybe it has a check, I've not looked. But without all those graphics it would might work but generate a ton of errors on stderr!
Post Reply