Custom user folder by command-line parameter: Incomplete implementation
LaputianBird
Member Posts: 107
I have this insane belief that a location named "My Documents" should be meant for *my* *documents*, not for some game assets or whatever else Windows encourages developers to use it for. While I patiently wait for Microsoft to listen to reason and change the approach on a world-wide level across their products, I've been using the excellent alternative option that Beamdog has provided us though command-line parameter to specify a custom user folder.
Both the game and the toolset support the parameter, but there is an oversight in the toolset implementation: if you use F9 to quickly test the module you're working on in the toolset, the game is launched without the custom folder parameter, and defaults to looking for your module and related resources in the My Documents folder.
To fix it, the toolset should store the user folder as a variable and apply it when calling the game executable from inside the toolset itself. Or some other solution to the same effect.
Pretty please? Without this fix using a custom user folder is almost useless
[edit] I'm not sure if this should be labeled as a feature request or a bug fix, and if it should go on the trello tickets discussion board, but here it is. Feel free to move it else where if necessary
Both the game and the toolset support the parameter, but there is an oversight in the toolset implementation: if you use F9 to quickly test the module you're working on in the toolset, the game is launched without the custom folder parameter, and defaults to looking for your module and related resources in the My Documents folder.
To fix it, the toolset should store the user folder as a variable and apply it when calling the game executable from inside the toolset itself. Or some other solution to the same effect.
Pretty please? Without this fix using a custom user folder is almost useless
[edit] I'm not sure if this should be labeled as a feature request or a bug fix, and if it should go on the trello tickets discussion board, but here it is. Feel free to move it else where if necessary
1
Comments
There's good reasons why developers do this. From Windows Vista onwards Microsoft really tightened up security on who is allowed to write to certain directory. If you want to write to a folder like Program Files you need to be an Admin (or go through those annoying UAC popups).
IIRC the "correct" place for developers to put all their program junk is in C:\Users\$user_name\AppData\ but few people actually use it because it's hidden by default and not available from the various Libraries like Documents. On top of that, most people nowadays access their User directories via Libraries and never actually see the root user folder - if you want your files to be messed with you pretty much have to put them in My Documents, My Pictures, My Videos or My Music. A lot of game developers have adopted a gentlemen's agreement to use My Documents\My Games to deal with the problems you're having.
No matter what, you definitely want to be writing into C:\Users\$user_name\. It gives you the ability to have different users with different configurations for free. It's also standard practice in the Linux world to have your /home/ directory (Unix-derived OS version of C:\Users) to be on a different hard drive/partition so you can just nuke your OS install at any time with no consequences (most distros make it stupid easy to do this when you install Linux on your PC). I personally mount my /home/ to a RAID mirrored array of hard drives so I don't have to worry too much about hard drive failure. Unfortunately Windows - being the redheaded stepchild of the OS world - makes it really, really hard to do this. You'll want a symbolic link rather than a shortcut. In Windows a shortcut is a special .lnk file that most programs don't really know how to deal with (programs accessing My Documents\foo won't see the shortcut because its actual file path is My Documents\foo.lnk). A symbolic link appears as a normal folder to any program that doesn't explicitly interogate it.
You can create symbolic links in Windows from Vista onwards but it's hidden in cmd and requires admin privelidges (WHY!?). I personally use Link Shell Extension to do it from the GUI via right click.
Dunno how to do them on Mac OS X (I've never liked OS X - do I Cmd C or CTRL C in this particular program to Copy and Paste?), but it's as simple as right clicking on most Linux GUIs.
At this point, I'm not sure if I was seeing a real bug or if I was just expecting behavior more like what you have requested.
-Dave