Author Topic: Better folder structure  (Read 5130 times)

As we all know, Windows Vista and Windows 7 enforce a new set of rules for where programs should write data. Users who want to install addons need to get administrative privileges to copy the zip file to the Program Files folder. Anything Blockland writes in its own directory ends up in the virtual store and most users have no idea that this even exists.

I suggest moving all settings-based data to the AppData folder under the current user and have the addons folder somewhere user accessible. A folder under My Documents or even a new folder in the user's main folder would be appropriate.

If there are good reasons for using the current system, I'd like to hear them. If not, I'd like to see it changed. I'm a programmer so feel free to get technical if you need to, but I expect that it's more for the sake of being simple than anything.

Off topic: Also, the forum is a little odd. I can't tab from the message are [this box I'm typing in] to the Post button without hitting every other object in the window first.

Although I agree that the forums are a little odd on Windows 7, the add-on moving interface was actually surprisingly easy. In my case, upon beginning a download you are asked to choose a location to save to. Just choose the add-ons folder under Blockland (which should be under C://Programs(x86) if it was placed correctly) and no moving of files is even required. So far, I have had no issues with any of these mods, so it definitely works. Is it the same with Vista? If you don't know, I could do a little digging on my mom's computer...

I thought you could turn that permission thing off.

i thought that they were all in the BL folder so it's easier to access them from other addons

I would like to mention that this thread was aimed toward the programmers, not the users of Blockland, but I appreciate the responses.

Although I agree that the forums are a little odd on Windows 7, the add-on moving interface was actually surprisingly easy. In my case, upon beginning a download you are asked to choose a location to save to. Just choose the add-ons folder under Blockland (which should be under C://Programs(x86) if it was placed correctly) and no moving of files is even required. So far, I have had no issues with any of these mods, so it definitely works. Is it the same with Vista? If you don't know, I could do a little digging on my mom's computer...
I don't think you quite understand. The location of the download isn't important. It's the fact that Program Files requires administrative access to change (unless a program is running inside the program folder, that causes items to be written to the virtual store, message me if you wish to understand more).

I thought you could turn that permission thing off.
Yes you can disable it, but no. UAC is a good thing. Disabling it invites malware. Well written programs only require UAC to install, never to operate unless they are administrative tools.

i thought that they were all in the BL folder so it's easier to access them from other addons
I was saying that the entire addon folder should be relocated. Instead of "Blockland\Add-Ons" it would be "Documents\Add-Ons" or whatever.

Solution: Don't install Blockland to Program Files on Vista/7. When installed to your main drive (which is what is meant to be done with Vista and 7), none of these problems occur.

Solution: Don't install Blockland to Program Files on Vista/7. When installed to your main drive (which is what is meant to be done with Vista and 7), none of these problems occur.
That's not a solution at all. Programs go in Program Files. Data goes in AppData. That's how programs should be built.

Also, I'm not sure what you mean by main drive. If you are referring to the root "C:\Blockland" that's an even worse convention and will still cause the same problems.

Well, not too long ago, Badspot recommended the same fix, though I do not know his opinion now.

Quote from: Badspot on Sept. 30th, found at http://forum.blockland.us/index.php?topic=85067.msg1524683#msg1524683
In vista, with UAC enabled, when a program in the program files directory tries to write a file, the file write is redirected to the "virtual store" which is buried somewhere in your user directory.  When the patch runs and tries to overwrite the files in programfiles/blockland, vista redirects it to write to the virtual store, so it basically doesn't update.  

Similarly, all of your save files are actually stored in the virtual store, instead of in your Blockland folder where the game thinks it put them.  Compounding the problem is the fact that the various virtual store folders are sorted in part by a hash of the executable.  So if you manually install Blocklandv13 over into your C:\Program Files\Blockland folder, the executable will change and thus the corresponding virtual store folder will change.  Blockland looks in the saves folder for your saves and gets redirected to a new virtual store folder with nothing in it.  

The whole thing is a stupid half-baked "security" idea that was poorly executed by microsoft.  

Solution:

    * Install Blockland v13 to C:\Blockland
    * Dig around in your virtual store and find your saves, copy them to your C:\Blockland\saves folder appropriately
    * Remove Blockland from c:\Program files

That's not a real solution. The problem isn't UAC, it's the fact that Blockland is writing to the Program Files folder in the first place. It shouldn't be writing there.

The torque game engine is designed to run out of one folder, so moving user data to another folder is also a design issue.

I guess it could be done, but it's a lot more work then just putting the installation in C:\

I know it's a design issue. That's why I brought it up.

That's not a real solution. The problem isn't UAC, it's the fact that Blockland is writing to the Program Files folder in the first place. It shouldn't be writing there.
Why shouldn't it be writing there, isn't that just a bit handicapped? Are you seriously telling me you're complaining about where the game is writing its files for the time you play? What are you trying to do with your computer that this is a problem. The folder layout of Blockland is so simple, what you are asking isn't simple at all. You want random folders all over your computer which are very loving annoying specially if the Add-ons/mods etc are going on your C:/ drive which is usually small and have no HDD space to begin with. Its not how Torque is supposed to work.

I know it's a design issue. That's why I brought it up.

I can pretty much guarantee that Badspot will not make any changes to the engine that allow it to mess with files outside of the game folder.  Installing somewhere else or disabling UAC are the solutions.

I run Blockland from an external drive and it works just fine.  It's more or less a "portable" app; it doesn't install any drivers or DLLs and it doesn't add keys to the registry.

I prefer that Badspot spend his Blockland time on bug fixes and new features instead of catering to "programmers" bitching about menial stuff.

P.S.  The "virtual store" mechanism employed by Vista and 7 is bullstuff.

isn't there an edit button in S&R?

EDIT: yeah, there is, right in the corner