per-user files stored in incorrect place on win7

Bug #695235 reported by Bill Good
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
Sébastien BLAISOT
1.10
Won't Fix
Low
Sean M. Pappalardo
1.9
Won't Fix
Low
Sean M. Pappalardo

Bug Description

build/depends.py hard-codes our settings path to "Local Settings/Application Data/Mixxx/" for Windows, and presumably %USERPROFILE% gets appended to it somewhere. This is correct for Windows versions pre-7, but this path has moved to %LOCALAPPDATA% (aka %USERPROFILE%\AppData\Local) for Windows 7 (see http://msdn.microsoft.com/en-us/library/dd378457(VS.85).aspx and search FOLDERID_LocalAppData).

I guess the solution is to use %LOCALAPPDATA% if it's populated and use what we use now otherwise.

This is a bug because mixxx ends up creating a %USERPROFILE%/local settings/... folder for win7 users that's likely unhidden (and therefore clutters up the user's home directory) and isn't obviously necessary to back-up when everything else stores its stuff in the proper paths.

Oh -- in case it wasn't obvious, the solution to this is a bit easier said than done, a proper solution will copy everything from the old (wrong) directory and then (possibly) wipe it. We don't really want to move where (most importantly) the library is without some sort of remedy.

Tags: windows
Bill Good (bkgood)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 1.9.0
Bill Good (bkgood)
description: updated
Revision history for this message
Bill Good (bkgood) wrote :

This actually seems to be being translated to the proper directory in my Windows 7 installation, may be a nonissue.

Revision history for this message
Patrick (madmonkey) wrote :

This works because Windows Vista and 7 have a symlink from %userprofile%\Local Settings to %userprofile%\AppData\Local. This is always present, but shouldn't be relied upon. The best fix is to query SHGetFolderLocation() with the FOLDERID mentioned earlier. This needs to be done at runtime, not build time, because users can change it to a setting other than the default.

10/23/2009 11:31 PM <JUNCTION> Local Settings [C:\Users\Patrick\AppData\
Local]

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Looking at trunk, we used to #define SETTINGS_PATH in the code, but I forget where. I would imagine mixxx.cpp would be a good place, before too many child objects get set up. I would treat what's in the SConscript as a default, and only re-define it in the code if a valid value is found. Please feel free to add this.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: 1.9.0 → 1.9.1
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Asking the system at run time is the best approach since this would also fix i18n issues (the folders are named differently on different language versions of Windows.)

Changed in mixxx:
milestone: 1.9.1 → none
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Any update on this?

Changed in mixxx:
assignee: nobody → Sean M. Pappalardo (pegasus-renegadetech)
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

No, but now that I have access to Win7 machines, I can take a look at fixing this in the 1.9 branch.

RJ Skerry-Ryan (rryan)
tags: added: windows
Revision history for this message
Daniel Schürmann (daschuer) wrote :
Changed in mixxx:
milestone: none → 1.12.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Maybe 1.12.0 is the time for a breaking change? This has been blocked forever on making a smooth migration path for users in the installer but I don't think anybody cares enough to write that.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

BTW, QDesktopServices::storageLocation(QDesktopServices::DataLocation) should give us the right path to use on all platforms. (No need for SHGetFolderLocation)

Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :

+1 for breaking change.

a note in the changelog/annoucement to instruct users how to move their profile dir if they loose all mixxx preferences should do the trick.

Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :

Hummm, using QDesktopServices::storageLocation(QDesktopServices::DataLocation) seems complicated because this path is defined in depends.py (a python script), not in cpp.

We can be "not so breaking" doint the same thing that was done for macOSX settings path change in mixxx 1.7.

actually, I don't see how to change from a hardcoded path to a dynamic path depending on windows version used (and how is matched python and cpp), but if you can give me a hint, I can try to take this one.

last question : do we still need to support windows XP ? It is completely unsupported by MS for more than a year now, so why do we need to still care ? probably it's time to have windows vista as a minimum requirement for mixxx.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

> Hummm, using QDesktopServices::storageLocation(QDesktopServices::DataLocation) seems complicated because this path is defined in depends.py (a python script), not in cpp.

Yea, part of this change would be to no longer provide SETTINGS_PATH as a compiler define. i.e. change this line:
https://github.com/mixxxdj/mixxx/blob/master/src/util/cmdlineargs.h#L74
to call QDesktopServices.

> last question : do we still need to support windows XP ? It is completely unsupported by MS for more than a year now, so why do we need to still care ? probably it's time to have windows vista as a minimum requirement for mixxx.

Sorta -- we have a ton of XP users is the thing. 1.12.0 will likely be our last XP support release.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

10% of Windows website visits in the last year were XP.

Windows 7 57.25%
Windows 8.1 21.98%
Windows XP 10.40%
Windows 8 7.38%
Windows Vista 2.6%

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Er nevermind that line is fine.

Changed in mixxx:
assignee: Sean M. Pappalardo (pegasus-renegadetech) → Sébastien BLAISOT (sblaisot)
status: Confirmed → In Progress
Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers