#1438 closed defect (fixed)
[PATCH] Sort out Windows log path pre-Vista
Reported by: | historic_bruno | Owned by: | ben |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 11 |
Component: | Non-game systems | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
With Alpha 10, the Windows data paths for the game have changed, see #1145. Logs are placed in "local application data" but Windows Vista changed the layout of application data to be more explicitly divided between roaming and local. There's a new environment variable since Vista, %localappdata%
, typically used to refer to the new path for convenience. But it doesn't exist on XP and there's no equivalent, so a path constructed with %localappdata%
will fail. Here's a comparison to show what we're dealing with:
- XP/2000:
C:\Documents and Settings\Ben\Local Settings\Application Data\
- Vista+:
C:\Users\Ben\AppData\Local\
It's tempting to simply use e.g. "%userprofile%\Local Settings\Application Data\
" as a hack, but apparently the path is localized so that would fail for many of our users (in German it's "\Lokale Einstellungen\Anwendungsdaten\
").
So there's two problems. We need a consistent way of telling Windows users how to find and access the game's logs. And we need to automate this so we don't have to mention messy details like %localappdata%
in the first place. If feasible, we should put the logic into the existing OpenLogsFolder.bat. If not feasible, we should delete the batch file and make a single Trac page with clear instructions. Likewise README.txt is currently incorrect and outdated.
We need one place we can refer people for finding logs and crash dumps in Windows.
(Of course really idealistically we would have an automated error reporter tool #192/#193 and nobody would care where they were stored, but this is a short term fix)
Attachments (1)
Change History (7)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|
comment:2 by , 12 years ago
Summary: | Sort out logs path on pre-Vista → Sort out Windows log path pre-Vista |
---|
comment:3 by , 12 years ago
by , 12 years ago
Attachment: | windows-openlogsfolder.patch added |
---|
comment:4 by , 12 years ago
Keywords: | review patch added |
---|---|
Summary: | Sort out Windows log path pre-Vista → [PATCH] Sort out Windows log path pre-Vista |
Attaching patch which:
- Moves log folder batch file to source/tools for organization
- Adds VBScript to open log folder on XP/2000
- Updates
README.txt
to link ReportingErrors for maintainability (and it's more helpful to have screenshots, etc.) - Updates Windows installer script to copy these new files and adds an "Open logs folder" shortcut to the start menu
The VBScript doesn't technically have to be a separate file, but in my opinion, it's best not to be obfuscated in the batch file (using a labels hack). It's less suspicious and easier to understand if it's a separate file clearly marked as a tool.
comment:6 by , 8 years ago
Keywords: | review removed |
---|
Philip found a good simple solution, this VBScript will open the logs folder if it exists:
Confirmed to work on a clean XP install. This should only be a last resort in case
%localappdata%
doesn't work as it won't on XP.I created a Trac page to describe all the data paths by OS, GameDataPaths. We can direct people to that page as needed.