Jump to content
Eternal Lands Official Forums
Gilrain

configurable user data dir

Recommended Posts

Hi,

 

i'd like to suggest to make the user-directory also configurable with a setting in the INI-file, like its currently implemented for the program-directory.

So this would be similar to the data_dir option, e.g.:

 

This option allows you to specify a directory other than the current directory to load data from.

This needs to be set to where you want your user data stored.

For Windows users, the default is "My Documents\Eternal Lands\".

#user_dir = "C:\other\Eternal Lands\"

 

This would (afaik) require to add a passage to elpathwrapper.c, where you could check for the existence of this variable, then prefer it over the other options.

 

The benefit is that this directory can be chosen freely, which might also help with making it easier to circumvent OS-specific problems when determining this path.

 

regards

Share this post


Link to post
Share on other sites

Symlinking is only on Linux, I believe.

 

Why not say something like el.86.bin -home whatever_the_folder_is_that_I_will_use ?

This way, you can have your client run multiple times or for shared computers, have the global install location and separate home directories for everyone regardless of what OS you use or even have a separate home directory for each alt you have.

Share this post


Link to post
Share on other sites

as mentioned in the other thread (http://www.eternal-lands.com/forum/index.php?showtopic=52143), it would be possible to make it a command line option instead.

 

EDIT: yes, nathan already mentioned command line option as solution.

 

additionally, symlinks are working in Windows (as junctions), but most Windows user dont know the concept and would be mislead. Also the concept isnt as common and as nicely implemented as in linux imho...

Edited by Gilrain

Share this post


Link to post
Share on other sites

It can be done using this setup (i already am running it like this from my USB drive)...

It's a "portable" setup for windows.

 

!!! DO NOT USE THIS SETUP IF YOU DON'T KNOW WHAT YOU ARE DOING !!!

!!! BACKUP EL AND EL DATA !!!

 

Prerequisites:

Win NT+ (windows nt, windows 2000, windows xp ....)

NTFS filesystem where your "My Documents" folder is stored

EL client executable must be called: el.exe so if you use the rc_final.exe or any other, rename it to el.exe

 

Limitations:

If you want to run more EL clients at once, start only the first one using this method and start the other one(s) like before.

If you run more then one client, stop the first one as last (otherwise you'll get the link removed and the directory created)

 

HOWTO:

1.) copy existing EL installation to your custom directory (eg. on USB drive)

we will call it "destination directory"

2.) download junction.zip (it is used to create soft (symbolic) links on windows

from sysinternals site: [junction.zip]

3.) unzip the archive and copy junction.exe to the "destination directory"

4.) create directory user_data inside "destination directory"

5.) copy all files and directories from "My Documents\Eternal Lands" to "destination directory"\user_data directory

6.) move or delete the "Eternal Lands" directory from "My Documents"

7.) download [el-main.exe], [el-test.exe], [el-pk.exe]

 

Now just run the appropriate file... el-main.exe for main server, el-test.exe for test server or el-pk.exe for pk server.

 

PS: these executables were created using autoit from this script:

#NoTrayIcon

If FileExists(@UserProfileDir & "\My Documents\Eternal Lands") Then
MsgBox(4096, "Directory already exists!", "Directory: '" & @UserProfileDir & "\My Documents\Eternal Lands' already exists, please remove/rename it first.")
EndIf

Run("junction.exe """ & @UserProfileDir & "\My Documents\Eternal Lands"" """ & @WorkingDir & "\user_data""", @WorkingDir)

RunWait("el.exe main", @WorkingDir)

Run("junction.exe -d """ & @UserProfileDir & "\My Documents\Eternal Lands""")

 

PS2: IF you see the "Eternal Lands" link in "My Documents" folder after closing EL client, do NOT delete it. Use junction.exe to remove it:

junction.exe -d "%USERPROFILE%\My Documents\Eternal Lands"

(it should not happen)

 

PS3: I know that the script can be enhanced, i'm just lazy to do it because it works for me :)

 

How it works:

 

It is a simple solution, where a symbolic link is created to your custom directory.

In "My Documents" folder is created a link to "current directory"\user_data where you copied your data from "Eternal Lands" dir ...

When EL client is closed, the link is removed.

junction.exe is needed to manage the links.

Share this post


Link to post
Share on other sites

@Groomsh eek! That sounds a bit difficult. I didn't hear Mac mentioned yet either. I think the idea of the command line option would work better. I know a number of people have alts that they play....and some of those at the same time as their main. Operating specific solutions are a bad idea in my opinion. That is why I suggested the parameter idea.

Share this post


Link to post
Share on other sites
@Groomsh eek! That sounds a bit difficult. I didn't hear Mac mentioned yet either. I think the idea of the command line option would work better. I know a number of people have alts that they play....and some of those at the same time as their main. Operating specific solutions are a bad idea in my opinion. That is why I suggested the parameter idea.

Yes i fully agree, it is just a workaround and as we all know, workarounds are ebul :)

Share this post


Link to post
Share on other sites
...I know a number of people have alts that they play....and some of those at the same time as their main....

You can use the existing servers.lst file to allow different config directories for alts etc.

Share this post


Link to post
Share on other sites
...I know a number of people have alts that they play....and some of those at the same time as their main....

You can use the existing servers.lst file to allow different config directories for alts etc.

very interesting, didnt know that possibility, thx :)

 

for the whole redirection, would a command line option be a smart and possible solution ?

Edited by Gilrain

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×