[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Using relative path for worlds, sounds, etc if file located in Mushclient-dir?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Using relative path for worlds, sounds, etc if file located in Mushclient-dir?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by j0nas   (56 posts)  [Biography] bio
Date Wed 12 Jul 2006 06:09 PM (UTC)
Message
First, I'd like to compliment Nick for having an excellent client to start with, it was great when I first started using it a few years ago, and it just keeps on improving. Whenever I want to do something, Nick has already made it possible a few versions ago, and if he hasn't he probably will soon. Thanks Nick!


Now, on to what I'd like to see. I store all my worlds, sounds, scripts and so on within the MUSHclient-directory, and whenever I upgrade MUSHclient, I just move over the sound-directory and all the worlds and scripts I still actively use to the new MUSHclient-directory. I don't overwrite the old install with a new one, which I guess most do, so I end up with a little problem, I have to update every path in every world after an upgrade, and as this includes finding all triggers with sounds and painstakingly changing each one, this quickly becomes a real pain.

I realize that this probably isnt't a big thing in the big scheme of things, and it's probably more work than it's worth to implement, but I'm going to throw it out anyway and let Nick decide: Wouldn't it be better if MUSHclient stored the paths as relatives, if the path pointed to somewhere beneath MUSHclient's working directory?


Heh, I almost feel a little ashamed for posting this, now that I read it. I'm just being really akward about how I upgrade MUSHclient, ain't I? I'm just going to start installing over the old installs from now on, I think. Still, I'll leave this post here anyway, it's a sound idea, even if not really worth implementing.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Wed 12 Jul 2006 06:12 PM (UTC)
Message
Actually, generally it's a bad practice to stomp on previous installations of applications with the new versions. Many programs recommend that you uninstall or delete the old one if you want to reinstall to the same place.

It would probably be possible to implement this by having a special variable, MC_HOME or something like that, that would resolve to the directory where the MUSHclient executable is. I think this would be pretty easy with a custom XML entity or something, because all these files are stored and parsed from XML, right?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #2 on Wed 12 Jul 2006 07:37 PM (UTC)
Message
Depends on the application Ksilyan. The problem with installing over the old ones is "usually" with registry and other glitches that arise do to the new versions not honoring the older versions settings. Most of them, like Firefox, Azereus, Acrobat Reader, etc. now have auto-updates that do install over the old ones and manage this without screwing anything up. By contrast, I know of several that insist on installing in new folders, and provide "no" means of importing the setting, changes, addons, etc. for the prior version. This can be a major pain in the ass, as J0nas has found out by trying to make Mushclient do the same thing.

The problem here is, Mushclient uses the same keys, so you can't really run two version at the same time anyway. At best, all you are doing by keeping the old one is hedging the bets that there might be some disasterous bugs. That can be solved easilly enough, and much more simply, if either the installer made backups of the existing install (which a lot of the auto-installing ones do as well), or you zipped the directory up in an archive, then installed, so the original is still intact some place. Installing in a differect place only really makes sense imho, if both versions can coexist on the same machine. Otherwise, you are asking for serious grief when things inexplicably fail to work right or seem missing.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Wed 12 Jul 2006 07:43 PM (UTC)
Message
Right, some applications have auto-updaters, but that's precisely because of the fact that it's usually not a good idea to just overwrite the old directory. Windows applications just aren't really set up to act like that. Of course, the registry poses its own set of issues... I'm tempted to say that applications should avoid using the registry as much as possible because of all the headaches it can create when upgrading programs etc.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 12 Jul 2006 09:38 PM (UTC)

Amended on Wed 12 Jul 2006 09:39 PM (UTC) by Nick Gammon

Message
I think it is quite sensible to start afresh personally, although then these problems arise. :)

One approach that might save some hassle is to rename the existing MUSHclient directory (eg. to MUSHclient.3.74) and then always install into a "straight" directory called MUSHclient. That way, the path names don't change, but you have the backups.

Then you can simply copy over things like sounds (and spell dictionaries) that you want to keep.

However also take a look at this post:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=7144

You could use a small plugin which implements OnPluginPlaySound - that could do a bit of mucking around with regular expressions to fix up the path name of the sound file before passing it to the Sound function.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


5,113 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]