Request: add globalApplicationsDirectoryX86 to enum File::SpecialLocationType


#1

Hi,

today I needed to obtain the 32-bit program files folder on a 64-bit system (which is typically “C:\Program Files (x86)”), but couldn’t find a enum value for that in File::SpecialLocationType.

We have globalApplicationsDirectory, but that gives the 64-bit program files folder (which is typically “C:\Program Files”).

Could someone please add this line in juce_win32_Files.cpp around line 570:

case globalApplicationsDirectoryX86: csidlType = CSIDL_PROGRAM_FILESX86; break;

and add this enum to the list in juce_File.h around line 876 (preferably inside an #if JUCE_WINDOWS #endif block I assume):

globalApplicationsDirectoryX86

Note:
On 32-bit systems this will just give the same path as the globalApplicationsDirectory enum value would give, so it’ll be correct for both 64-bit and 32-bit systems (see the table for FOLDERID_ProgramFiles at https://msdn.microsoft.com/en-us/library/bb762584(VS.85).aspx ).

Thanks!


#2

I’m gonna bump this… I would like this too.

Rail


#3

This will appear on the develop branch shortly.