From ae0383c7db389695fd73b8c73fd04c516a0ffdf3 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 8 Jul 2014 14:05:55 +0100 Subject: [PATCH] Added a win32-specific flag File::windowsSystemDirectory --- modules/juce_core/files/juce_File.h | 5 +++++ modules/juce_core/native/juce_win32_Files.cpp | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index 28c2e706e1..57d970fff0 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -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. diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index 80ad084ee3..a77aa5aaca 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -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: