mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-26 02:14:22 +00:00
Fix for iOS launching. Tweak for win32 font rendering. Added a File::hostApplicationPath flag.
This commit is contained in:
parent
280b966ff6
commit
ccd8566e96
26 changed files with 200 additions and 130 deletions
|
|
@ -45,7 +45,7 @@ JUCEApplication::JUCEApplication()
|
|||
: appReturnValue (0),
|
||||
stillInitialising (true)
|
||||
{
|
||||
jassert (isStandaloneApp && appInstance == 0);
|
||||
jassert (isStandaloneApp() && appInstance == 0);
|
||||
appInstance = this;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ JUCEApplication::~JUCEApplication()
|
|||
appInstance = 0;
|
||||
}
|
||||
|
||||
bool JUCEApplication::isStandaloneApp = false;
|
||||
JUCEApplication::CreateInstanceFunction JUCEApplication::createInstance = 0;
|
||||
JUCEApplication* JUCEApplication::appInstance = 0;
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -200,9 +200,12 @@ int JUCEApplication::shutdownApp()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
int JUCEApplication::main (const String& commandLine, JUCEApplication* const app)
|
||||
int JUCEApplication::main (const String& commandLine)
|
||||
{
|
||||
const ScopedPointer<JUCEApplication> appDeleter (app);
|
||||
ScopedJuceInitialiser_GUI libraryInitialiser;
|
||||
|
||||
jassert (createInstance != 0);
|
||||
const ScopedPointer<JUCEApplication> app (createInstance());
|
||||
|
||||
if (! app->initialiseApp (commandLine))
|
||||
return 0;
|
||||
|
|
@ -225,23 +228,23 @@ int JUCEApplication::main (const String& commandLine, JUCEApplication* const app
|
|||
extern const char* juce_Argv0;
|
||||
#endif
|
||||
|
||||
int JUCEApplication::main (int argc, const char* argv[], JUCEApplication* const newApp)
|
||||
int JUCEApplication::main (int argc, const char* argv[])
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
|
||||
#if ! JUCE_WINDOWS
|
||||
jassert (createInstance != 0);
|
||||
juce_Argv0 = argv[0];
|
||||
#endif
|
||||
|
||||
#if JUCE_IOS
|
||||
const ScopedPointer<JUCEApplication> appDeleter (newApp);
|
||||
return juce_iOSMain (argc, argv);
|
||||
#else
|
||||
String cmd;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
cmd << argv[i] << ' ';
|
||||
|
||||
return JUCEApplication::main (cmd, newApp);
|
||||
return JUCEApplication::main (cmd);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,12 +248,16 @@ public:
|
|||
// These are used by the START_JUCE_APPLICATION() macro and aren't for public use.
|
||||
|
||||
/** @internal */
|
||||
static int main (const String& commandLine, JUCEApplication* newApp);
|
||||
static int main (const String& commandLine);
|
||||
/** @internal */
|
||||
static int main (int argc, const char* argv[], JUCEApplication* newApp);
|
||||
static int main (int argc, const char* argv[]);
|
||||
/** @internal */
|
||||
static void sendUnhandledException (const std::exception* e, const char* sourceFile, int lineNumber);
|
||||
|
||||
/** Returns true if this executable is running as an app (as opposed to being a plugin
|
||||
or other kind of shared library. */
|
||||
static inline bool isStandaloneApp() throw() { return createInstance != 0; }
|
||||
|
||||
/** @internal */
|
||||
ApplicationCommandTarget* getNextCommandTarget();
|
||||
/** @internal */
|
||||
|
|
@ -269,7 +273,9 @@ public:
|
|||
/** @internal */
|
||||
int shutdownApp();
|
||||
/** @internal */
|
||||
static bool isStandaloneApp;
|
||||
typedef JUCEApplication* (*CreateInstanceFunction)();
|
||||
/** @internal */
|
||||
static CreateInstanceFunction createInstance;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue