×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    57

    Exclamation RHttpDownloadMgr download sisx works, but cannot install

    Hi, Buddies

    I use RHttpDownloadMgr to download a new version of my applcation at fcuksports.com, then I need to install on the phone(I use N97mini for test), then it will hanged the at the install progress bar.

    Do any body knows the issue?

    The step as:

    1, When application start, it check the server, there is new version of fcuksports.
    2, Down the application with RHttpDownloadMgr, and save it to local driver.
    3, after the download successfully, then automation to install the new version.
    4. System shows it need to close the application.
    5, then close the application to install the newer one.
    6, the phone is hanged with the install progress one.


    Does this is because the installer is invoked by the old one, so the new one cannot install? Or do anybody know how to fix it?

    Thank you!

    Kind Regards
    Bill

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: RHttpDownloadMgr download sisx works, but cannot install

    Similar issues are discussed already, just the search engine is a bit dizzy since the new installment of the Forum. Since the installer is related to the process which launches it, generally you can not update an executable via launching the installer from itself. A possible workaround is to temporarily deploy a different application for doing the update. Then you can start it, exit from your own app, and the update process should work.

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    57

    Re: RHttpDownloadMgr download sisx works, but cannot install

    Thank you!

    I got example code for this

    and I meet another problem that I use a another application(let's call it update.exe) to run installer, but its show some application need close for install, then I click yes, but now the first application and the update.exe are close both, and still hanged at the installer. The code as:


    _LIT(KMyExeFile,"updateexe.exe");


    TThreadId app_threadid;
    CApaCommandLine* cmdLine;
    cmdLine=CApaCommandLine::NewLC();
    cmdLine->SetExecutableNameL(KMyExeFile);
    cmdLine->SetCommandL( EApaCommandRun );
    RApaLsSession ls;
    User::LeaveIfError(ls.Connect());
    TInt err=ls.StartApp(*cmdLine);
    ls.Close();
    CleanupStack::PopAndDestroy(); // cmdLine


    This is OK in invoke updateexe.exe to start install.


    And the following code is updateexe.exe:

    LOCAL_C void MainL()
    {


    SwiUI::RSWInstLauncher iLauncher;
    SwiUI::TInstallOptions iOptions;
    SwiUI::TInstallOptionsPckg iOptionsPckg;
    _LIT(filename, "c:\\data\\fcuksports_s60v5.sisx");
    TInt err = iLauncher.Connect();

    CAOSync* waiter = CAOSync::NewL();

    CleanupStack::PushL( waiter );

    TBufC<50> FName(filename);

    iLauncher.Install(waiter->iStatus,FName,iOptionsPckg);

    waiter->Execute();

    CleanupStack::PopAndDestroy( waiter );

    }

    LOCAL_C void DoStartL()
    {
    // Create active scheduler (to run active objects)
    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    CleanupStack::PushL(scheduler);
    CActiveScheduler::Install(scheduler);

    MainL();

    // Delete active scheduler
    CleanupStack::PopAndDestroy(scheduler);
    }

    // Global Functions

    GLDEF_C TInt E32Main()
    {
    // Create cleanup stack
    __UHEAP_MARK;
    CTrapCleanup* cleanup = CTrapCleanup::New();


    // Run application code inside TRAP harness, wait keypress when terminated
    TRAPD(mainError, DoStartL());

    delete cleanup;
    __UHEAP_MARKEND;
    return KErrNone;
    }




    this is the CAOSync code:
    CAOSync* CAOSync::NewL()
    {
    CAOSync* self = new(ELeave) CAOSync();
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::Pop();
    return self;
    }

    CAOSync::~CAOSync()
    {
    Cancel();
    delete iWait;
    }

    CAOSync::CAOSync() : CActive(CActive::EPriorityStandard)
    {
    }

    void CAOSync::ConstructL()
    {
    iWait = new(ELeave) CActiveSchedulerWait();
    CActiveScheduler::Add(this);
    }


    void CAOSync::Execute()
    {
    SetActive();
    iWait->Start();
    }


    void CAOSync:oCancel()
    {
    iWait->AsyncStop();
    }

    void CAOSync::RunL()
    {
    iWait->AsyncStop();
    }


    Does this has problem? or issue?


    Thank you!

  4. #4
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    57

    Re: RHttpDownloadMgr download sisx works, but cannot install

    hey, do anybody know the issue?

  5. #5
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: RHttpDownloadMgr download sisx works, but cannot install

    You need to close your application first and then do the update with update.exe.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: RHttpDownloadMgr download sisx works, but cannot install

    update.exe has to be installed separately
    - it can not be part of the main application package
    - it can not be embedded in in the main application package
    - there should be a completely standalone update.sisx, deployed as any other file (the .exe, the .rsc-s) - as a first try I would put it on a public location, however the installer can access your private folder too
    - when you want the update to happen, the main application can install update.sisx, execute update.exe, and as a completely independent installation, update.exe will not get shut down when it installs the updated main application.
    Of course it is faster to check if update.exe can be launched, and do the extra installation only if it is necessary (so the first time).

Similar Threads

  1. 32 KB limited download with RHttpDownloadMgr
    By jawadakhtar in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2010-04-30, 19:25
  2. RHttpDownloadMgr: download exe file
    By nguyend in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2009-08-25, 08:11
  3. install sisx in my app
    By maoxizhu in forum Symbian
    Replies: 6
    Last Post: 2009-04-20, 09:36
  4. Cannot install the sisx file.
    By ahkhan in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2008-11-18, 06:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×