Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Saving worldfiles should not change relative path
Saving worldfiles should not change relative path
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Mon 26 Apr 2004 10:26 AM (UTC) |
Message
| I would like to keep my world/plugin/state files synchronized between my laptop and my desktop PC, but each copy of MUclient runs on different drive letters. I change all the pathnames to relative and it works fine, until I save a world file, in which case MUclient writes back all paths as absolute and messes everything up... Could it be changed so that it would write the pathnames as it read them? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #1 on Mon 26 Apr 2004 10:31 AM (UTC) |
Message
| Well, as it turns out, relative paths do not work fine...
auto_log_file_name="..\logs\Poromenos log.txt"
gives me an error saying it can't open the file... Can you also change MUclient to recognize paths?
Can I set something like an XML entity or whatever on top, so that I can only change that whenever I copy the files? That would be tedious however, with 50 world files... Maybe MUclient could have an internal variable like &MUclientPath; we could use in the filenames? What of these would be easier to implement? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Shadowfyr
USA (1,787 posts) Bio
|
Date
| Reply #2 on Mon 26 Apr 2004 06:55 PM (UTC) |
Message
| Most programs will use their own execution path as the 'base' for all operations. This works well, as long as all the links to run the program are pointing to that directory. Unfortunately if you ever look at a link file, you will notice the line "Start in:", if this is blank, then the execution path becomes what ever the link was located in. If this path points some place other than "C:\Program Files\MUSHclient", then again, same problem. I think there is some other way to determine it, but unfortunately a lot of programs rely on the OS to tell them where they started and thus what the 'default' path should be. Having MUSHclient figure out where it actually is 'should' be easier than having to edit even one setting, but how to *correctly* manage it I am uncertain of. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Mon 26 Apr 2004 07:55 PM (UTC) |
Message
| Mushclient has some default paths in the registry file.
You could retrieve those, but that seems like an extreme workaround. I dont think itd be too hard to have MC supply us with some sort of default path (or all of them). A function with an arguement for which path you want (plugin, etc).
this would also help with distributed plugins, I know *I* never install into program files. But a lot of people do. So I need to have my plugins changed whenever I give them to someone else and theres file manipulation involved.
Then again, I suppose you could use an entity. Except like Poromenos said, if you have a lot of them, it seems like itd get tedious. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #4 on Mon 26 Apr 2004 08:45 PM (UTC) |
Message
| True, Shadowfyr, but I'm not suggesting that MUclient should use relative paths, I'm just suggesting that it shouldn't change them back to absolute when a user messes with them... Can I import an xml file that defines entities, or is that impossible? Come to think of it, MUclient will probably write the absolute paths again though :/ |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Mon 26 Apr 2004 09:11 PM (UTC) |
Message
| I would think including something with entities should work, and it wouldnt overwrite, as Itd be an include.
Just declare a path entity, and then use that as your surrogate absolute path. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #6 on Mon 26 Apr 2004 10:32 PM (UTC) |
Message
| I think it would overwrite, since MUclient would read it correctly, but when it wrote it back, it wouldn't use the entity, it would just write the path... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #7 on Mon 26 Apr 2004 11:32 PM (UTC) |
Message
| I have changed it to remove the absolute pathname when saving plugin names (in the world file) if it happens to start with the default plugins pathname. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #8 on Tue 27 Apr 2004 09:29 AM (UTC) |
Message
| Does it work properly with relative paths though? I tried it and a few worked, a few didn't... Could you test it please? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #9 on Tue 27 Apr 2004 09:33 AM (UTC) |
Message
| Ah, you released it, good :) I'll test it myself then, thanks :)
|
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #10 on Tue 27 Apr 2004 09:41 AM (UTC) |
Message
| It works, but only for plugins, which leaves everything else with absolute pathnames :/ For example:
<include name="I:\Program Files\MUSHclient\worlds\include.xml" />
auto_log_file_name="I:\Program Files\MUSHclient\logs\Poromenos log.txt"
chat_file_save_directory="I:\Downloads"
script_filename="I:\Program Files\MUSHclient\WORLDS\Poromenos.vbs"
sound="E:\WINDOWS\Media\Page.wav"
Is there any way to make MUclient save the paths the way it found them if there is no problem in loading them? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #11 on Wed 28 Apr 2004 11:43 PM (UTC) |
Message
| The plugins work fine when transferred, but the rest of the files give errors... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #12 on Thu 29 Apr 2004 06:27 AM (UTC) |
Message
| Yes, I only changed plugins. There is no default "include file path", so it was harder to do the "remove the default path" trick.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #13 on Thu 29 Apr 2004 09:10 AM (UTC) |
Message
| It doesn't actually have to remove the default paths for every file, that wouldn't work either... It just has to save the filenames back the way it found them. Hopefully that will work. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #14 on Thu 29 Apr 2004 09:59 AM (UTC) |
Message
| Well, when you add a plugin using the plugin dialog you don't specify a relative path, you use the file browser dialog box which gives me an absolute path. So, I don't have a relative path to begin with.
However I tend to agree that it should save the file name it was actually given, if you happen to put a relative path in manually. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
46,503 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top