Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Pre-including plugins in world files distributed with standalone MUSHclient
|
Pre-including plugins in world files distributed with standalone MUSHclient
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Sun 14 Nov 2010 06:16 AM (UTC) |
| Message
| I just want to be clear.
Is using <include name=".\worlds\plugins\blahblahblah.xml" plugin="y" /> the established mechanism for having path relative plugins?
|
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 14 Nov 2010 06:29 AM (UTC) Amended on Sun 14 Nov 2010 08:42 PM (UTC) by Nick Gammon
|
| Message
|
- $PLUGINSDEFAULTDIR - the default plugins directory
- $PROGRAMDIR - the MUSHclient program directory
- $WORLDDIR - the directory the current world is in
- $PLUGINDIR - the directory the current plugin is in
So in your case, probably:
<include name="$PLUGINDIR\blahblahblah.xml" plugin="y" />
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #2 on Sun 14 Nov 2010 07:25 AM (UTC) Amended on Sun 14 Nov 2010 08:36 AM (UTC) by Fiendish
|
| Message
| I ended up using
<include name="$PROGRAMDIR\worlds\plugins\blahblahblah.xml" plugin="y"/>
Because PLUGINDIR didn't work. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sun 14 Nov 2010 07:39 PM (UTC) |
| Message
| It worked for me:
File: includes_test.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="includes_test"
author="Nick Gammon"
id="6d119b1a8390d08e5b76b33e"
language="Lua"
purpose="Testing includes"
date_written="2010-11-15"
requires="4.33"
version="1"
>
</plugin>
<include name="$PLUGINDIR\myincludes.xml" />
<script>
print "in test.xml"
</script>
</muclient>
File: myincludes.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<script>
print "in myincludes.xml"
</script>
</muclient>
Output:
in myincludes.xml
in test.xml
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Twisol
USA (2,257 posts) Bio
|
| Date
| Reply #4 on Sun 14 Nov 2010 08:49 PM (UTC) |
| Message
|
Nick Gammon said: It worked for me:
It worked for me too: it's the entire basis upon which my plugin structure is built. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #5 on Sun 14 Nov 2010 09:06 PM (UTC) Amended on Sun 14 Nov 2010 09:07 PM (UTC) by Fiendish
|
| Message
| | The subject says "in world files", not "in plugins". There seems to be no concept of the current plugin directory for a world file. :) |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Twisol
USA (2,257 posts) Bio
|
| Date
| Reply #6 on Sun 14 Nov 2010 09:08 PM (UTC) |
| Message
|
Fiendish said: The subject says "in world files", not "in plugins". There seems to be no concept of the current plugin directory for a world file. :)
Touche! In that case, there would be no $PLUGINDIR set, because it's not a plugin. What about $PLUGINSDEFAULTDIR? |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Sun 14 Nov 2010 09:20 PM (UTC) |
| Message
|
Fiendish said:
The subject says "in world files", not "in plugins". There seems to be no concept of the current plugin directory for a world file. :)
The terser the question, the less helpful the answer is likely to be.
I normally skim subjects, particularly as the subject lines are normally very vague.
Now that you have clarified, I guess, that you are setting up a pre-made setup of world files and plugins, your original idea is probably as good as any:
<include name=".\worlds\plugins\blahblahblah.xml" plugin="y" />
The idea of the other substitution was for cases where the end-user might have customized away the locations of things. But in your case, you know where you have put the plugins.
I would have thought that $PLUGINSDEFAULTDIR might have been neater, that should evaluate to the same thing. But who knows? Then you need to make sure that the preferences database has set things up correctly. And if they plonk the installed files somewhere you don't expect, well I can't vouch for which system would work better. Probably need to test a few scenarios. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #8 on Sun 14 Nov 2010 09:39 PM (UTC) |
| Message
|
Nick Gammon said: The terser the question, the less helpful the answer is likely to be.
Except that your initial answer helped me. :) |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,389 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top