Monday, 23 June 2014

Running multiple Eve Launchers - my solution

This post is way to technical, not quite fit for player consumption.  It is however fit for developer consumption, and I am publish this in the hopes that someone with a Windows scripting background runs with it.  If you do not have a scripting background, your eyes are liable to glaze over.

Once upon a very very long time ago, on a computer before the ones we are using now; when we wanted to run multiple concurrent eve clients, we made junctions of our Eve folders.  Each time we wanted to change a pilot, we had to enter a user name and password.

Once upon a time, but more recently than that, when we wanted to run multiple concurrent clients we called the Eve exe once per concurrent client.  Each time we wanted to change a pilot, we still had to enter the username and password.

Today, here and now, when you want to change pilots inside an account, we have this 'wonderful' Eve launcher that allows us to remember our accounts user name and password and access the Eve store, but ...  you must re-enter the username/password when you want to change pilots between accounts.

I find this frustrating; especially when resetting my PI.  Planetary Interaction is limited by the number of planets you have.  More alts with PI means more planets.  But using alts means more logging in.

My old method of resetting PI is :
  • Log onto every account, selecting the pilot that has been offline the longest.
  • Do PI.  At any time there is a break move onto the next account's pilot; Especially during the warp from POCO back to POS
  • When finished with a pilot log onto the next longest offline pilot on that account.
  • Whine about having to re-enter username/password when swapping accounts.  Sometimes get up and for some cheese.
When you do this on ... too many accounts it becomes tiresome.  There are some PI pilots I know with way more accounts than I run.  The same issues may apply for heavy research, manufacturing and market accounts.

An Eve folder contains the following files and folders
  • A launcher folder
  • Other folders include bin, bulkdata, lib, res and script
  • A whole series of files, including 
    • *.stuff files, containing textures, sounds and other in game resources
    • *.patch files, apparently can be deleted once applied
    • *.exe files, being the actual executables
    • *.ini files, containing various some configuration information
    • cacert.pem and ca-bundle.crt which I believe to do with encryption
    • debug.log, obvious file is obvious
    • code.ccp, manifest.dat, __access_check__; file names are indicative, but *shrug*

So I googled; and found lots of entries from before the 'new' launcher. 

I tried to copy the launcher folder itself and running the launcher.exe that is in it; no luck, it would not start a new launcher window.

What roughly worked was copying the entire eve folder.  This allowed me to have 2 Eve launchers concurrently, but copying 18GB of data takes a long time as well as a fair amount of disk space.  It also means that your system can't cache the same files; meaning lower overall system performance.  I wanted better.

What I am now using.


4 Launcher windows all open at the same time. 
Apart from cropping and obscuring the account name, these accounts are all active at the same time.

Each additional Eve instance takes 174MB
Again, cropping and obscuring personal information.

I have a script 'makeclone.sh' that takes an Eve folder, and replicates it
  • Copying the launcher folder as is, where is;  This obviously is copying stuff not needed (including old log and browser cache files), but is quick and small enough
  • For all other folders, junctions into the replicated folder back to the originals in the primary Eve folder.  These must be junctions, symbolic links did not work.
  • All files are hard linked into the replicated folder back to the original files in the primary Eve folder
All of this takes about 15 seconds per replicated folder,  at 1% of a full Eve installation.  This could be made smaller by working out what is needed out of the Eve installation; I suspect that a launcher/cache folder structure without files would save space, but so far have not been bothered adding that complexity to my script.  It also is very flexible in coping with future CCP changes. 
  • Update the 'master' normally with  the launcher.
  • re-run the script to blow away the existing replicated folders, and make new versions of them.

On my version of windows, the personal settings are in %localappdata%\CCP\EVE, with a new fresh set of files for every replicated folder.  I am contemplating changing my script to copy my primary installation's settings over to the replicated folders, but have not yet decided.  I like the idea of updating my overview once, and then automatically cloning it, but have not gotten that far yet.


My command prompt environment and scripting language, is a bash shell from cygwin ( https://www.cygwin.com/ ).  The script itself is available as a pastebin or google drive document.

As always, too many words, not enough pretty pictures. I also suspect that for the majority of readers, this takes the prize for 'Driest Foo post ever'.   On top of that, I have based my scripts on my skillset; which is a Unix/Linux based scripting language in a Windows environment; so it is not yet even useful to the majority of you, at least not yet.  It is also likely useless for Mac users.

What I do know is that there are others with more Windows based scripting knowledge than I have, that could easily translate this into a Dos batch file, or failing that a Powershell script, so it is available to the wider Eve community. 

Assuming you have actually read this far, if you have something like this script that anyone can use, either based on this work or independently created, please leave a comment.  Similarly, if you are lacking in scripting skills and want something like this without the cygwin dependancy, also leave a comment.

11 comments:

  1. Why are you using the launcher and not the client directly? The client executable starts the client with the last used username already pre-populated and the drop-down of accounts is already there. The client is also much faster to launch and when you click "log off" instead of "shutdown", it pops right back up with a new client.

    ReplyDelete
  2. The part I struggle with is trying to have each account have it's own %localappdata%\CCP\EVE folder. That folder contains all the defaults and screen layout and overview settings etc.

    My problem is that I can run 3 launchers from my 3 eve folders. Each launcher will launch it's copy of the cient using the correct settings folder. But when I look at a given launcher I can't tell what settings it will use. So I guess. I try logging this launcher into accountA. Hopefully it is the launcher that was launched from directoryA. Inevitably it isn't.

    If EACH LAUNCHER would just remember which account it last used, all my problems would go away. At the moment the launchers have a global shared "last account" which is shared across all 3 launchers.

    ReplyDelete
  3. Don't use the launcher. Just fire up the client exefile.exe directly. No need for multiple folders that way plus it takes less time to load each client and requires less memory so you can run more clients at the same time too.

    ReplyDelete
    Replies
    1. That's what I do. The client remembers the last account used on a for each client. ClientA remembers that it used accountA, clientB remembers it used accountB etc.

      I just worry because the way they implemented the store it makes me wonder if they aren't slowly moving over to a situation where the launcher will be required.

      And lastly, my ideal world... allow me to link my accounts together, designating one as the "master". Start the launcher, login to my master account. See all 9 characters, grouped together so I know which characters are in accounts together. Single click to launch any of my 9 characters. Remove the %localappdata%\CCP\EVE folder entirely. Fetch the settings for the specific character from the server on client startup.

      Delete
    2. I cant figure out how to edit my comment.

      You need multiple client folders (even just multiple symlinks to the same folder) if you want to have different settings for different characters. Settings = everything from overview, market quick links, notes, defaults for drop downs, window positions etc etc

      Delete
    3. The settings thing is actually a matter what's in account settings vs what's in character settings. There's only 1 account settings file but up to 3 character settings files (one for each character on the account).

      Gotta say I wish a lot of the account settings were character settings instead.

      Delete
  4. @moxnix; " I wish a lot of the account settings were character settings instead.". Use my method (but with a better implementation), but once per pilot, not once per account. My settings are stored in %localappdata%\CCP\EVE\, and not on the server itself.

    It will take some discipline to ensure the right pilot uses the right folder, but that may be somewhat easier by using the evefile.exe method.

    @Gavin. For me, each individual launcher does remember what account I last logged into, and I have not had a problem so far.

    ReplyDelete
  5. The reason *I* like the launcher over evefile.exe is that I now have the option of entering my password once per 'session' and not need to re-enter passwords regardless of how often I swap between pilots.

    The start time of the launcher itself isnt too bad;

    ReplyDelete
  6. I have a hazy memory that the 'enter password at each login' procedure is deliberate by CCP. I don't recall if they spelled out the reasoning behind it.

    ReplyDelete
  7. Nothing a little bit of googling can't handle: http://pastebin.com/tHTedgzJ
    Be sure to run the command prompt as admin or mklink won't work. Usage:
    myBat.bat EVE2
    myBat.bat EVE3
    myBat.bat EVE4

    BTW: I don't know anything about batch :p

    ReplyDelete
  8. This post is now obsolete. See https://forums.eveonline.com/default.aspx?g=posts&t=449738&_ga=1.174225634.1175545162.1444213707

    ReplyDelete

Posts older than 14 days are subject to moderation before being published. I do so sporadically. If you have a question regarding older posts, also evemail dotoo foo.

Blogger comments supports basic html. You can make a link 'clicky' by <a href="http://yoursite/yourpage">yoursite/yourpage</a>

While I currently accept anonymous users, please include a pseudonym. I get confused answering anonymous.

If the word verification is preventing you from adding a comment, please evemail DoToo Foo for alternative methods