mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor updates for mingw compatibility.
This commit is contained in:
parent
0b8174c410
commit
976be45c2a
7 changed files with 17 additions and 29 deletions
|
|
@ -355,13 +355,11 @@ public:
|
|||
bool applyRecursively = false) const;
|
||||
|
||||
/** Returns true if this file is a hidden or system file.
|
||||
|
||||
The criteria for deciding whether a file is hidden are platform-dependent.
|
||||
*/
|
||||
bool isHidden() const;
|
||||
|
||||
/** If this file is a link, this returns the file that it points to.
|
||||
|
||||
If this file isn't actually link, it'll just return itself.
|
||||
*/
|
||||
File getLinkedTarget() const;
|
||||
|
|
@ -695,13 +693,11 @@ public:
|
|||
static void findFileSystemRoots (Array<File>& results);
|
||||
|
||||
/** Finds the name of the drive on which this file lives.
|
||||
|
||||
@returns the volume label of the drive, or an empty string if this isn't possible
|
||||
*/
|
||||
String getVolumeLabel() const;
|
||||
|
||||
/** Returns the serial number of the volume on which this file lives.
|
||||
|
||||
@returns the serial number, or zero if there's a problem doing this
|
||||
*/
|
||||
int getVolumeSerialNumber() const;
|
||||
|
|
@ -790,7 +786,6 @@ public:
|
|||
commonApplicationDataDirectory,
|
||||
|
||||
/** The folder that should be used for temporary files.
|
||||
|
||||
Always delete them when you're finished, to keep the user's computer tidy!
|
||||
*/
|
||||
tempDirectory,
|
||||
|
|
@ -829,18 +824,15 @@ public:
|
|||
hostApplicationPath,
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
globalApplicationsDirectory,
|
||||
|
||||
/** The most likely place where a user might store their music files.
|
||||
*/
|
||||
/** The most likely place where a user might store their music files. */
|
||||
userMusicDirectory,
|
||||
|
||||
/** The most likely place where a user might store their movie files.
|
||||
*/
|
||||
/** The most likely place where a user might store their movie files. */
|
||||
userMoviesDirectory,
|
||||
};
|
||||
|
||||
|
|
@ -853,9 +845,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Returns a temporary file in the system's temp directory.
|
||||
|
||||
This will try to return the name of a non-existent temp file.
|
||||
|
||||
To get the temp folder, you can use getSpecialLocation (File::tempDirectory).
|
||||
*/
|
||||
static File createTempFile (const String& fileNameEnding);
|
||||
|
|
@ -863,7 +853,6 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Returns the current working directory.
|
||||
|
||||
@see setAsCurrentWorkingDirectory
|
||||
*/
|
||||
static File getCurrentWorkingDirectory();
|
||||
|
|
@ -879,13 +868,11 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** The system-specific file separator character.
|
||||
|
||||
On Windows, this will be '\', on Mac/Linux, it'll be '/'
|
||||
*/
|
||||
static const juce_wchar separator;
|
||||
|
||||
/** The system-specific file separator character, as a string.
|
||||
|
||||
On Windows, this will be '\', on Mac/Linux, it'll be '/'
|
||||
*/
|
||||
static const String separatorString;
|
||||
|
|
@ -912,12 +899,10 @@ public:
|
|||
*/
|
||||
static String createLegalPathName (const String& pathNameToFix);
|
||||
|
||||
/** Indicates whether filenames are case-sensitive on the current operating system.
|
||||
*/
|
||||
/** Indicates whether filenames are case-sensitive on the current operating system. */
|
||||
static bool areFileNamesCaseSensitive();
|
||||
|
||||
/** Returns true if the string seems to be a fully-specified absolute path.
|
||||
*/
|
||||
/** Returns true if the string seems to be a fully-specified absolute path. */
|
||||
static bool isAbsolutePath (const String& path);
|
||||
|
||||
/** Creates a file that simply contains this string, without doing the sanity-checking
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ inline int numElementsInArray (Type (&array)[N])
|
|||
template <typename Type>
|
||||
inline Type juce_hypot (Type a, Type b) noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
return static_cast <Type> (_hypot (a, b));
|
||||
#else
|
||||
return static_cast <Type> (hypot (a, b));
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#ifndef __JUCE_MEMORY_JUCEHEADER__
|
||||
#define __JUCE_MEMORY_JUCEHEADER__
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_MINGW
|
||||
/** This allocator is not defined in mingw gcc. */
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
/** Fills a block of memory with zeros. */
|
||||
inline void zeromem (void* memory, size_t numBytes) noexcept { memset (memory, 0, numBytes); }
|
||||
|
|
|
|||
|
|
@ -83,7 +83,11 @@
|
|||
|
||||
#define STRICT 1
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#if JUCE_MINGW
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#else
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
#define _UNICODE 1
|
||||
#define UNICODE 1
|
||||
#ifndef _WIN32_IE
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@
|
|||
|
||||
#ifdef __MINGW32__
|
||||
#define JUCE_MINGW 1
|
||||
#ifdef __MINGW64__
|
||||
#define JUCE_64BIT 1
|
||||
#else
|
||||
#define JUCE_32BIT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** If defined, this indicates that the processor is little-endian. */
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
#endif
|
||||
|
||||
#if JUCE_MINGW
|
||||
#include <Imm.h>
|
||||
#include <imm.h>
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void* getUser32Function (const char* functionName) // (NB: this function also us
|
|||
HMODULE user32Mod = GetModuleHandleA ("user32.dll");
|
||||
jassert (user32Mod != 0);
|
||||
|
||||
return static_cast <void*> (GetProcAddress (user32Mod, functionName));
|
||||
return (void*) GetProcAddress (user32Mod, functionName);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue