mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Spelling correction and iOS file path tweaks.
This commit is contained in:
parent
44ece5a54a
commit
85c32498dc
6 changed files with 76 additions and 24 deletions
|
|
@ -17695,7 +17695,7 @@ Array<UnitTest*>& UnitTest::getAllTests()
|
|||
return tests;
|
||||
}
|
||||
|
||||
void UnitTest::initalise() {}
|
||||
void UnitTest::initialise() {}
|
||||
void UnitTest::shutdown() {}
|
||||
|
||||
void UnitTest::performTest (UnitTestRunner* const runner_)
|
||||
|
|
@ -17703,7 +17703,7 @@ void UnitTest::performTest (UnitTestRunner* const runner_)
|
|||
jassert (runner_ != 0);
|
||||
runner = runner_;
|
||||
|
||||
initalise();
|
||||
initialise();
|
||||
runTest();
|
||||
shutdown();
|
||||
}
|
||||
|
|
@ -265297,6 +265297,14 @@ bool File::isHidden() const
|
|||
return juce_isHiddenFile (getFullPathName());
|
||||
}
|
||||
|
||||
#if JUCE_IOS
|
||||
static const String getIOSSystemLocation (NSSearchPathDirectory type)
|
||||
{
|
||||
return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES)
|
||||
objectAtIndex:0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* juce_Argv0 = 0; // referenced from juce_Application.cpp
|
||||
|
||||
const File File::getSpecialLocation (const SpecialLocationType type)
|
||||
|
|
@ -265308,21 +265316,35 @@ const File File::getSpecialLocation (const SpecialLocationType type)
|
|||
switch (type)
|
||||
{
|
||||
case userHomeDirectory: resultPath = nsStringToJuce (NSHomeDirectory()); break;
|
||||
|
||||
#if JUCE_IOS
|
||||
case userDocumentsDirectory: resultPath = getIOSSystemLocation (NSDocumentDirectory); break;
|
||||
case userDesktopDirectory: resultPath = getIOSSystemLocation (NSDesktopDirectory); break;
|
||||
|
||||
case tempDirectory:
|
||||
{
|
||||
File tmp (getIOSSystemLocation (NSCachesDirectory));
|
||||
tmp = tmp.getChildFile (juce_getExecutableFile().getFileNameWithoutExtension());
|
||||
tmp.createDirectory();
|
||||
return tmp.getFullPathName();
|
||||
}
|
||||
|
||||
#else
|
||||
case userDocumentsDirectory: resultPath = "~/Documents"; break;
|
||||
case userDesktopDirectory: resultPath = "~/Desktop"; break;
|
||||
case userApplicationDataDirectory: resultPath = "~/Library"; break;
|
||||
case commonApplicationDataDirectory: resultPath = "/Library"; break;
|
||||
case globalApplicationsDirectory: resultPath = "/Applications"; break;
|
||||
case userMusicDirectory: resultPath = "~/Music"; break;
|
||||
case userMoviesDirectory: resultPath = "~/Movies"; break;
|
||||
|
||||
case tempDirectory:
|
||||
{
|
||||
File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension());
|
||||
|
||||
tmp.createDirectory();
|
||||
return tmp.getFullPathName();
|
||||
}
|
||||
#endif
|
||||
case userMusicDirectory: resultPath = "~/Music"; break;
|
||||
case userMoviesDirectory: resultPath = "~/Movies"; break;
|
||||
case userApplicationDataDirectory: resultPath = "~/Library"; break;
|
||||
case commonApplicationDataDirectory: resultPath = "/Library"; break;
|
||||
case globalApplicationsDirectory: resultPath = "/Applications"; break;
|
||||
|
||||
case invokedExecutableFile:
|
||||
if (juce_Argv0 != 0)
|
||||
|
|
@ -265337,9 +265359,13 @@ const File File::getSpecialLocation (const SpecialLocationType type)
|
|||
const File exe (juce_getExecutableFile());
|
||||
const File parent (exe.getParentDirectory());
|
||||
|
||||
#if JUCE_IOS
|
||||
return parent;
|
||||
#else
|
||||
return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS")
|
||||
? parent.getParentDirectory().getParentDirectory()
|
||||
: exe;
|
||||
#endif
|
||||
}
|
||||
|
||||
case hostApplicationPath:
|
||||
|
|
@ -269643,10 +269669,10 @@ public:
|
|||
|
||||
IPhoneAudioIODevice (const String& deviceName)
|
||||
: AudioIODevice (deviceName, "Audio"),
|
||||
audioUnit (0),
|
||||
isRunning (false),
|
||||
callback (0),
|
||||
actualBufferSize (0),
|
||||
isRunning (false),
|
||||
audioUnit (0),
|
||||
callback (0),
|
||||
floatData (1, 2)
|
||||
{
|
||||
numInputChannels = 2;
|
||||
|
|
|
|||
|
|
@ -62419,7 +62419,7 @@ public:
|
|||
/** You can optionally implement this method to set up your test.
|
||||
This method will be called before runTest().
|
||||
*/
|
||||
virtual void initalise();
|
||||
virtual void initialise();
|
||||
|
||||
/** You can optionally implement this method to clear up after your test has been run.
|
||||
This method will be called after runTest() has returned.
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ public:
|
|||
//==============================================================================
|
||||
IPhoneAudioIODevice (const String& deviceName)
|
||||
: AudioIODevice (deviceName, "Audio"),
|
||||
audioUnit (0),
|
||||
isRunning (false),
|
||||
callback (0),
|
||||
actualBufferSize (0),
|
||||
isRunning (false),
|
||||
audioUnit (0),
|
||||
callback (0),
|
||||
floatData (1, 2)
|
||||
{
|
||||
numInputChannels = 2;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,14 @@ bool File::isHidden() const
|
|||
return juce_isHiddenFile (getFullPathName());
|
||||
}
|
||||
|
||||
#if JUCE_IOS
|
||||
static const String getIOSSystemLocation (NSSearchPathDirectory type)
|
||||
{
|
||||
return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES)
|
||||
objectAtIndex:0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
const char* juce_Argv0 = 0; // referenced from juce_Application.cpp
|
||||
|
||||
|
|
@ -148,21 +156,35 @@ const File File::getSpecialLocation (const SpecialLocationType type)
|
|||
switch (type)
|
||||
{
|
||||
case userHomeDirectory: resultPath = nsStringToJuce (NSHomeDirectory()); break;
|
||||
|
||||
#if JUCE_IOS
|
||||
case userDocumentsDirectory: resultPath = getIOSSystemLocation (NSDocumentDirectory); break;
|
||||
case userDesktopDirectory: resultPath = getIOSSystemLocation (NSDesktopDirectory); break;
|
||||
|
||||
case tempDirectory:
|
||||
{
|
||||
File tmp (getIOSSystemLocation (NSCachesDirectory));
|
||||
tmp = tmp.getChildFile (juce_getExecutableFile().getFileNameWithoutExtension());
|
||||
tmp.createDirectory();
|
||||
return tmp.getFullPathName();
|
||||
}
|
||||
|
||||
#else
|
||||
case userDocumentsDirectory: resultPath = "~/Documents"; break;
|
||||
case userDesktopDirectory: resultPath = "~/Desktop"; break;
|
||||
case userApplicationDataDirectory: resultPath = "~/Library"; break;
|
||||
case commonApplicationDataDirectory: resultPath = "/Library"; break;
|
||||
case globalApplicationsDirectory: resultPath = "/Applications"; break;
|
||||
case userMusicDirectory: resultPath = "~/Music"; break;
|
||||
case userMoviesDirectory: resultPath = "~/Movies"; break;
|
||||
|
||||
case tempDirectory:
|
||||
{
|
||||
File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension());
|
||||
|
||||
tmp.createDirectory();
|
||||
return tmp.getFullPathName();
|
||||
}
|
||||
#endif
|
||||
case userMusicDirectory: resultPath = "~/Music"; break;
|
||||
case userMoviesDirectory: resultPath = "~/Movies"; break;
|
||||
case userApplicationDataDirectory: resultPath = "~/Library"; break;
|
||||
case commonApplicationDataDirectory: resultPath = "/Library"; break;
|
||||
case globalApplicationsDirectory: resultPath = "/Applications"; break;
|
||||
|
||||
case invokedExecutableFile:
|
||||
if (juce_Argv0 != 0)
|
||||
|
|
@ -177,9 +199,13 @@ const File File::getSpecialLocation (const SpecialLocationType type)
|
|||
const File exe (juce_getExecutableFile());
|
||||
const File parent (exe.getParentDirectory());
|
||||
|
||||
#if JUCE_IOS
|
||||
return parent;
|
||||
#else
|
||||
return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS")
|
||||
? parent.getParentDirectory().getParentDirectory()
|
||||
: exe;
|
||||
#endif
|
||||
}
|
||||
|
||||
case hostApplicationPath:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Array<UnitTest*>& UnitTest::getAllTests()
|
|||
return tests;
|
||||
}
|
||||
|
||||
void UnitTest::initalise() {}
|
||||
void UnitTest::initialise() {}
|
||||
void UnitTest::shutdown() {}
|
||||
|
||||
void UnitTest::performTest (UnitTestRunner* const runner_)
|
||||
|
|
@ -57,7 +57,7 @@ void UnitTest::performTest (UnitTestRunner* const runner_)
|
|||
jassert (runner_ != 0);
|
||||
runner = runner_;
|
||||
|
||||
initalise();
|
||||
initialise();
|
||||
runTest();
|
||||
shutdown();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
/** You can optionally implement this method to set up your test.
|
||||
This method will be called before runTest().
|
||||
*/
|
||||
virtual void initalise();
|
||||
virtual void initialise();
|
||||
|
||||
/** You can optionally implement this method to clear up after your test has been run.
|
||||
This method will be called after runTest() has returned.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue