1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Added a File::invokedExecutableFile key that can be used to find the name of the file or link that launched the exe

This commit is contained in:
Julian Storer 2009-11-13 15:56:29 +00:00
parent ca727ec2bb
commit 1b0e85d187
5 changed files with 33 additions and 0 deletions

View file

@ -171,6 +171,8 @@ bool File::isHidden() const throw()
}
//==============================================================================
const char* juce_Argv0 = 0; // referenced from juce_Application.cpp
const File File::getSpecialLocation (const SpecialLocationType type)
{
switch (type)
@ -219,6 +221,11 @@ const File File::getSpecialLocation (const SpecialLocationType type)
return tmp;
}
case invokedExecutableFile:
if (juce_Argv0 != 0)
return File (String::fromUTF8 ((const uint8*) juce_Argv0));
// deliberate fall-through...
case currentExecutableFile:
case currentApplicationFile:
return juce_getExecutableFile();