From: <mg...@us...> - 2007-11-14 00:50:04
|
Revision: 264 http://planeshift.svn.sourceforge.net/planeshift/?rev=264&view=rev Author: mgist Date: 2007-11-13 16:50:06 -0800 (Tue, 13 Nov 2007) Log Message: ----------- - Updater output is now logged in updater.log Modified Paths: -------------- trunk/docs/history.txt trunk/src/pslaunch/pslaunch.cpp trunk/src/pslaunch/updaterengine.cpp trunk/src/pslaunch/updaterengine.h Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2007-11-14 00:10:39 UTC (rev 263) +++ trunk/docs/history.txt 2007-11-14 00:50:06 UTC (rev 264) @@ -6,6 +6,7 @@ - A few class renames and improvement to UpdaterEngine ctor. - Added a fallback download of the full file if patching fails. - Fixed some bugs in the updater and started to add the updating output window. +- Updater output is now logged in updater.log *** 2007-11-11 by Roland Schulz - Stab at FS#141 ... mental stats affect the cost of training, but this cost Modified: trunk/src/pslaunch/pslaunch.cpp =================================================================== --- trunk/src/pslaunch/pslaunch.cpp 2007-11-14 00:10:39 UTC (rev 263) +++ trunk/src/pslaunch/pslaunch.cpp 2007-11-14 00:50:06 UTC (rev 264) @@ -239,10 +239,10 @@ { mutex->Unlock(); } - } else { + csSleep(3000); paws->FindWidget("launcher")->Show(); updateProgress->Hide(); *performUpdate = false; Modified: trunk/src/pslaunch/updaterengine.cpp =================================================================== --- trunk/src/pslaunch/updaterengine.cpp 2007-11-14 00:10:39 UTC (rev 263) +++ trunk/src/pslaunch/updaterengine.cpp 2007-11-14 00:50:06 UTC (rev 264) @@ -57,10 +57,14 @@ consoleOut = _consoleOut; performUpdate = _performUpdate; mutex = _mutex; + + fileUtil->RemoveFile("updater.log"); + log = fopen("updater.log", "a"); } UpdaterEngine::~UpdaterEngine() { + fclose(log); delete fileUtil; delete config; fileUtil = NULL; @@ -80,7 +84,8 @@ outputString.FormatV (string, args); va_end (args); consoleOut->Push(outputString); - printf("%s\n", outputString.GetData()); + printf("%s", outputString.GetData()); + fprintf(log, "%s", outputString.GetData()); if ( mutex ) { @@ -202,7 +207,7 @@ // Mark update as complete and clean up. config->GetConfigFile()->SetBool("Update.Clean", true); config->GetConfigFile()->Save(); - printOutput("Update successful!\n"); + printOutput("Update finished!\n"); } else printOutput("No updates needed!\n"); Modified: trunk/src/pslaunch/updaterengine.h =================================================================== --- trunk/src/pslaunch/updaterengine.h 2007-11-14 00:10:39 UTC (rev 263) +++ trunk/src/pslaunch/updaterengine.h 2007-11-14 00:50:06 UTC (rev 264) @@ -71,6 +71,9 @@ /* If true, then it's okay to perform the update. */ bool *performUpdate; + + /* Output console prints to file. */ + FILE* log; CS::Threading::Mutex *mutex; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |