Author Topic: Running PS from a USB drive. Taking your settings/log/etc with you  (Read 795 times)

NorthnCross

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
For those of you using Planeshift from a usb device(or some method of external storage), sure it runs but is far from portable. Let's do something about this shall we?
There are a couple methods for doing this. We COULD change environment variables(on a session only basis) in order to redirect where data is saved. But that is too much work and is just silly considering what I'm about to show you.
Let's do this the right way. Using a method native to the client itself. Command switches ahoy!!! And please read the whole thing before jumping into it as you may miss something important.
I found this looking through psclient.cfg
Code: [Select]
; Custom configuration directory path
;  You can also start planeshift applications with the command line option
;  "-cfgset=PlaneShift.UserConfigPath=/home/<user>/.PlaneShift2", for example
;PlaneShift.UserConfigPath = /home/<user>/.PlaneShift2
So we can either use the command switch -cfgset=PlaneShift.UserConfigPath=<something_portable>1 2 4
Or we could just change a line in the file itself. From this:
Code: [Select]
;PlaneShift.UserConfigPath = /home/<user>/.PlaneShift2To this:
Code: [Select]
PlaneShift.UserConfigPath = \PSdataOr:
Code: [Select]
PlaneShift.UserConfigPath = /PSdata (Slash or backslash is fine, just don't mix them.)
That slash(/) or backslash(\) puts the data in a directory(PSdata) at the root of the drive.3 But the path must EXIST first, mkdir or something, just make sure your folder/directory exists!!!!
What's that? You want to put the data in the same directory(aka 'appfolder') as The Planeshift client? Of course you can do that. Just put a dot before /PSdata. It'll look like this.
Code: [Select]
PlaneShift.UserConfigPath = ./PSdata
And that will put it in <PSDIR>/PSdata
Am I missing anything? Thoughts? Ideas? Translations?
BTW for you windows users, if you mod the cfg file instead of using the switch slashes or back slashes will work.  And as I stated this can use root path or relative path.

Footnotes
1. "<Something_Portable>" won't work, you must put a real path there. Something that exists. Even just a root backslash will do.
2. If you are doing this in windows it is best to use the backslash instead of the slash. Because windows command line recognizes slashes are flags/switches.
3. Root of the drive Planeshift is running from. And PSdata doesn't have to be PSdata, that too is an example.
4. Special note for you modders, that command switch can be used for other things too you know. Like if you wanted to test new skins. Or something along those lines. Just peek inside psclient.cfg and you'll see what I mean.

playbetter

  • Traveller
  • *
  • Posts: 28
    • View Profile
Re: Running PS from a USB drive. Taking your settings/log/etc with you
« Reply #1 on: December 05, 2008, 12:08:17 am »
Thank you.

NorthnCross

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
Re: Running PS from a USB drive. Taking your settings/log/etc with you
« Reply #2 on: December 08, 2008, 12:33:47 am »
Good to know you like it. While I cannot say I busted my hump on this(testing was rigorous though) I found there were a few people on IRC that wanted this so I post what I had since there wasn't an already existing forum thread. But that doesn't mean I wouldn't like to see this added to the faq somehow.

Mythryndel

  • Testers
  • Hydlaa Notable
  • *
  • Posts: 605
    • View Profile
Re: Running PS from a USB drive. Taking your settings/log/etc with you
« Reply #3 on: December 08, 2008, 09:27:37 pm »
I do run this from a USB drive on my laptop... I hadn't thought about how to keep my data if I upgraded my OS or moved the drive to a different machine though... I will have to set this up soon. Thanks for the suggestion!