Browse Source

Added a win32-specific flag File::windowsSystemDirectory

tags/2021-05-28
jules 11 years ago
parent
commit
ae0383c7db
2 changed files with 13 additions and 0 deletions
  1. +5
    -0
      modules/juce_core/files/juce_File.h
  2. +8
    -0
      modules/juce_core/native/juce_win32_Files.cpp

+ 5
- 0
modules/juce_core/files/juce_File.h View File

@@ -844,6 +844,11 @@ public:
/** In a plugin, this will return the path of the host executable. */
hostApplicationPath,
#if JUCE_WINDOWS
/** On a Windows machine, returns the location of the Windows/System32 folder. */
windowsSystemDirectory,
#endif
/** The directory in which applications normally get installed.
So on windows, this would be something like "c:\program files", on the
Mac "/Applications", or "/usr" on linux.


+ 8
- 0
modules/juce_core/native/juce_win32_Files.cpp View File

@@ -554,6 +554,14 @@ File JUCE_CALLTYPE File::getSpecialLocation (const SpecialLocationType type)
return File (String (dest));
}
case windowsSystemDirectory:
{
WCHAR dest [2048];
dest[0] = 0;
GetSystemDirectoryW (dest, (UINT) numElementsInArray (dest));
return File (String (dest));
}
case invokedExecutableFile:
case currentExecutableFile:
case currentApplicationFile:


Loading…
Cancel
Save