gmvault icon indicating copy to clipboard operation
gmvault copied to clipboard

Allow Gmvault's HOME to be moved

Open pantherdd opened this issue 8 years ago • 4 comments

On Windows, all of Gmvault's stuff gets stored under C:\Users\MyUser, because HOME is unconditionally overwritten in gmvault.bat. It should probably first check whether HOME is already set, like gmvault-shell.bat does. (Btw., does gmvault-shell.bat really need to set it too?)

It would also be nice if I could configure Gmvault's home directory independently of the global HOME environment variable. For example by introducing a GMVAULT_HOME variable, which would take precendence over HOME if it's set by the user. The installer could even allow it to be configured during setup. The reason why this would be useful is that I like to store important data on my data drive, D:, and not on the system drive, C:, that gets wiped on an OS reinstall.

pantherdd avatar Feb 11 '17 02:02 pantherdd

@PantherDD I'm not sure if you know that you can easily move GMVault's Home to any directory or drive you like. For example, I have installed GMVault in D:\gmvault. I then made the following changes so all GMVault's items are also stored in D:\gmvault (you can pick any drive or folder you like).

In gmvault.bat, replace %HOMEDRIVE%%HOMEPATH% with D:/gmvault in the following line: SET HOME=%HOMEDRIVE%%HOMEPATH%

In gmvault-shell.bat, REM the following two lines: @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE%

There may be a better way, but thus far the above has worked for me.

I hope it helps.

aberja avatar Mar 01 '17 03:03 aberja

@aberja That's what I did too, but it's a fragile hack. I will have to keep making these changes after every version upgrade, also checking that those are still the right places to apply the hack at. It'd be so much cleaner if there was a supported way to do this, one that would work across versions. :smile:

pantherdd avatar Mar 01 '17 06:03 pantherdd

@PantherDD @aberja I will add it in a near future and let you know

gaubert avatar Mar 02 '17 20:03 gaubert

@gaubert Thank you for the help! 👍

pantherdd avatar Mar 02 '17 22:03 pantherdd