bool ProjucerApplication::initialiseLogger (const char* filePrefix) { if (logger == nullptr) { #if JUCE_LINUX String folder = "~/.config/Projucer/Logs"; #else String folder = "com.juce.projucer"; #endif logger = FileLogger::createDateStampedLogger (folder, filePrefix, ".txt", getApplicationName() + " " + getApplicationVersion() + " --- Build date: " __DATE__); Logger::setCurrentLogger (logger); } return logger != nullptr; }
void initialise( const String& commandLine ) { try { // Initialize logger String appName(getApplicationName()); _logger = FileLogger::createDefaultAppLogger(appName, appName + "Log.txt", appName + " " + getApplicationVersion()); Logger::setCurrentLogger(_logger); Log::write("Initializing..."); // Setup app context AppContext::getInstance()->initialise(); // Load default skin //File skinpath = File::getCurrentWorkingDirectory().getChildFile("Skins/Default/"); //SkinManager::getInstance()->initialise( skinpath ); // *** TODO: This is temp test code that needs to be changed! // Login dialog should not be shown here. User needs to add music services and // we will try to login to all of them at this point without any prompt. checkLogin(); // Initialize main window _mainWindow = new MainWindow(); //_mainWindow->centreWithSize(350, 170); //_mainWindow->setVisible(true); // Testing the animator //_animator = new ComponentAnimator(); //_animator->animateComponent(_mainWindow, Rectangle(_mainWindow->getX(), _mainWindow->getY(), 500, 600), 1000, 3, 0); Log::write("Entering main loop"); } catch(Exception& ex) { if(_logger != NULL) Log::write(ex.getFullMessage()); quit(); } }