Just got the report that the same thing on N95(don't know the F/W, because on my N95 the things is working)
this is my code
Code:
CLauncherApp* CLauncherApp::NewL()
{
CLauncherApp* self = CLauncherApp::NewLC();
CleanupStack::Pop(self);
return self;
}
CLauncherApp* CLauncherApp::NewLC()
{
CLauncherApp* self = new (ELeave) CLauncherApp;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CLauncherApp::CLauncherApp() : CActive(CActive::EPriorityStandard)
{
iLauncher = NULL;
}
CLauncherApp::~CLauncherApp()
{
CActiveScheduler::Stop();
delete iLauncher;
delete iActiveScheduler;
}
void CLauncherApp::ConstructL()
{
iActiveScheduler = new (ELeave) CActiveScheduler;
CActiveScheduler::Install(iActiveScheduler);
CActiveScheduler::Add(this);
}
void CLauncherApp::Install( TDesC &aFileName )
{
if(iLauncher)
{
iLauncher->Close();
delete iLauncher;
iLauncher = NULL;
}
iLauncher = new (ELeave )SwiUI::RSWInstSilentLauncher();
iOptions.iUpgrade = SwiUI::EPolicyAllowed;
iOptions.iOCSP = SwiUI::EPolicyNotAllowed;
iOptions.iDrive = 'C';
iOptions.iUntrusted = SwiUI::EPolicyAllowed;
iOptions.iCapabilities = SwiUI::EPolicyAllowed;
iOptions.iKillApp = SwiUI::EPolicyAllowed;
iOptions.iUpgradeData = SwiUI::EPolicyAllowed;
iOptions.iOverwrite = SwiUI::EPolicyAllowed;
iOptions.iDownload = SwiUI::EPolicyNotAllowed;
iOptions.iPackageInfo = SwiUI::EPolicyAllowed;
iOptionsPckg = iOptions;
TInt err = iLauncher->Connect();
iLauncher->SilentInstall(iStatus, aFileName,iOptionsPckg);
SetActive();
iWait.Start();
}
void CLauncherApp::StartInstallationL()
{
User::After(10000000);
StartProgressNoteL();
iGlobalProgressDialog->UpdateProgressDialog(1,5);
iInstallState = EPips;
Install(FName);
}
void CLauncherApp::DoCancel()
{
iWait.AsyncStop();
}
void CLauncherApp::RunL()
{
iWait.AsyncStop();
if( iInstallState == EPips )
{
iInstallState = ESsl;
FName.Zero();
FName.Copy(KSslFile);
UpdateProcessL(2);
Install(FName);
}
else if( iInstallState == ESsl )
{
iInstallState = EGlib;
FName.Zero();
FName.Copy(KGlibFile);
UpdateProcessL(3);
Install(FName);
}
else if( iInstallState == EGlib )
{
iInstallState = EStdCpp;
FName.Zero();
FName.Copy(KStdFile);
UpdateProcessL(4);
Install(FName);
}
else if( iInstallState == EStdCpp )
{
iInstallState = EVas;
FName.Zero();
FName.Copy(KVasFile);
UpdateProcessL(5);
Install(FName);
}
else
{
CAknGlobalNote *confirmationDialog = CAknGlobalNote ::NewL();
confirmationDialog->ShowNoteL(EAknGlobalConfirmationNote ,KInstalled);
}
}
void CLauncherApp::StartProgressNoteL()
{
TBuf16<70> note1;
note1.Copy(_L("Installing"));
TRequestStatus aStatus;
iGlobalProgressDialog = CAknGlobalProgressDialog::NewL();
iGlobalProgressDialog->ShowProgressDialogL( aStatus, note1, R_AVKON_SOFTKEYS_EMPTY, 5 );
}
void CLauncherApp::UpdateProcessL(TInt aProgress)
{
if(iGlobalProgressDialog)
{
iGlobalProgressDialog->UpdateProgressDialog(aProgress, 5);
}
}
GLDEF_C TInt E32Main()
{
CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
CLauncherApp *iLauncherApp = new CLauncherApp();
iLauncherApp->ConstructL();
TRAPD(error,iLauncherApp->StartInstallationL());
__ASSERT_ALWAYS(!error, User::Panic(KApplicationName,error));
delete iLauncherApp;
delete cleanup; // destroy clean-up stack
return 0;
}