386 User::LeaveIfError(iJobsLock.CreateLocal()); |
386 User::LeaveIfError(iJobsLock.CreateLocal()); |
387 #ifdef FSHELL_MEMORY_ACCESS_SUPPORT |
387 #ifdef FSHELL_MEMORY_ACCESS_SUPPORT |
388 // We call LoadDriver here so that memoryaccess gets a chance to start the thread creator tracker as early as possible |
388 // We call LoadDriver here so that memoryaccess gets a chance to start the thread creator tracker as early as possible |
389 // Possibly this isn't the best place to put it... |
389 // Possibly this isn't the best place to put it... |
390 RMemoryAccess::LoadDriver(); |
390 RMemoryAccess::LoadDriver(); |
|
391 #endif |
|
392 |
|
393 #ifdef FSHELL_CAP_ALL // If we don't have all caps we can't hack around with sys\bin directory |
|
394 // See if we were built/installed with FSHELL_REPLACE_ECONS and if so, do just that. |
|
395 // A bit inefficient we do it every time, but can't see a better way |
|
396 // The benefit of doing it like this is that it doesn't require us to remove other occurences of econs.dll (like econseik.dll) from the rombuild |
|
397 RLibrary iocons; |
|
398 TInt err = iocons.Load(_L("iocons.dll")); |
|
399 if (err == KErrNone) |
|
400 { |
|
401 // We don't include iocons.dll unless FSHELL_REPLACE_ECONS was specified at buildrom time |
|
402 CleanupClosePushL(iocons); |
|
403 RFs fs; |
|
404 CleanupClosePushL(fs); |
|
405 User::LeaveIfError(fs.Connect()); |
|
406 _LIT(KPath, "%c:\\sys\\bin\\econs.dll"); |
|
407 TBuf<32> econsPath; |
|
408 TChar systemDrive = 'c'; |
|
409 fs.DriveToChar(fs.GetSystemDrive(), systemDrive); |
|
410 econsPath.Format(KPath, TUint(systemDrive)); |
|
411 TEntry ioconsEntry; |
|
412 err = fs.Entry(iocons.FileName(), ioconsEntry); |
|
413 if (err == KErrNone) |
|
414 { |
|
415 TEntry econsEntry; |
|
416 if (fs.Entry(econsPath, econsEntry) == KErrNone && econsEntry.iSize == ioconsEntry.iSize) |
|
417 { |
|
418 // Then we've already copied iocons.dll to econs.dll, don't do it again |
|
419 } |
|
420 else |
|
421 { |
|
422 CFileMan* fm = CFileMan::NewL(fs); |
|
423 fm->Copy(iocons.FileName(), econsPath, CFileMan::ERecurse | CFileMan::EOverWrite); |
|
424 // Ignore the error - if it fails it shouldn't prevent fshell starting up |
|
425 delete fm; |
|
426 } |
|
427 } |
|
428 CleanupStack::PopAndDestroy(2, &iocons); // fs, iocons |
|
429 } |
391 #endif |
430 #endif |
392 } |
431 } |
393 |
432 |
394 void CShell::PrintPrompt() |
433 void CShell::PrintPrompt() |
395 { |
434 { |