×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    What happens to private directory during application updates?

    I've got 2 versions of application. First, I install 1 version, then - the second one, updating the first-installed. I've always thought, that during update all data except private directory removes and then installs again from new sis-file.

    But now I see, that Symbian is more complicated:

    1) When I install first version in memory card, it's private dir is in memory card. Then I install second version in phone and all private data remains, but now private dir is in phone disk, not in memory card. Is it copying?

    2) I'd like to remove some files during uninstallation, but to keep them, when updating. So I do:
    if( NOT( exists( "!:\private\<UID>\MyFile.ini" ) ) )
    "Uninstaller.exe" -"!:\sys\bin\Uninstaller.exe", FR, RR, RW
    endif

    in my pkg-file.
    Uninstaller.exe runs during uninstallation, but it also runs during updating. And I know exactly, that there is file "MyFile.ini" in private dir, cos' my application uses it.

    Does anybody know, what happens to private directory during application updates?

  2. #2
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: What happens to private directory during application updates?

    For question 2, have you tried to update your application on the memory card also, and see if the file is deleted or kept?
    Symbian && Android && iPhoneOS

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: What happens to private directory during application updates?

    Have you seen the documentation?
    » Symbian OS vx.y » Symbian OS Tools And Utilities » Software Installation Toolkit - reference » Package file format » package-body » install-file » Installing language independent files
    Check the section about 'Upgrading rules'

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: What happens to private directory during application updates?

    Is the <uid> the same as the uid of the uninstaller.exe?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Re: What happens to private directory during application updates?

    Quote Originally Posted by paipeng View Post
    For question 2, have you tried to update your application on the memory card also, and see if the file is deleted or kept?
    Yep, kept, but not found by EXISTS.

    Quote Originally Posted by wizard_hu_ View Post
    Have you seen the documentation?
    » Symbian OS vx.y » Symbian OS Tools And Utilities » Software Installation Toolkit - reference » Package file format » package-body » install-file » Installing language independent files
    Check the section about 'Upgrading rules'
    Yes, I've read it.
    "If the upgrade causes an executable to be replaced, the private directory is untouched." But I see, that the file MyFile.ini in private directory is created by the first version and kept after installing the second version. But EXISTS don't see MyFile.ini.
    it says also: "The version number of the upgrading package should be higher than that of the original." But my versions are distributions, so they have the same version number, but it's not a problem, as MyFile.ini kept.


    Quote Originally Posted by Paul.Todd View Post
    Is the <uid> the same as the uid of the uninstaller.exe?
    No. I have MyApp.exe with MyUID and Uninstaller.exe that removes "!:\Data\MyDir". And I use EXISTS in pkg-file of MyApp. Uninstaller knows nothing about "!:\private\MyUID", it's just called from MyApp.pkg/sis

    Thanks for links, I'll have a look.

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

    Re: What happens to private directory during application updates?

    Quote Originally Posted by isak1986 View Post
    Yep, kept, but not found by EXISTS.
    Note that it is absolutely not sure that "exists" is able to use !:\... at all. And also note that even if it works, it most probably applies to the ongoing installation, and checks the "current" drive selected by the user.

  7. #7
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Re: What happens to private directory during application updates?

    Quote Originally Posted by wizard_hu_ View Post
    Note that it is absolutely not sure that "exists" is able to use !:\... at all. And also note that even if it works, it most probably applies to the ongoing installation, and checks the "current" drive selected by the user.
    I've tried also "C:\private\Uid\MyFile.ini" whith installing both versions in phone memory - result is the same.

  8. #8
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: What happens to private directory during application updates?

    Did you remember the format for private folders and files is drive:\private\"hex uid without 0x"\file?
    eg c:\private\deadf00d\myfile.ini
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  9. #9
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Re: What happens to private directory during application updates?

    Quote Originally Posted by Paul.Todd View Post
    Did you remember the format for private folders and files is drive:\private\"hex uid without 0x"\file?
    eg c:\private\deadf00d\myfile.ini
    Yeah. I wish the problem was with sintaxis. But it's not.

Similar Threads

  1. iPhone Blogger Blog Creation Application
    By semaphore10 in forum News and Announcements
    Replies: 4
    Last Post: 2009-10-06, 08:49
  2. Data Caging / Private Directory Location
    By randhawp in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 6
    Last Post: 2007-10-16, 10:45
  3. TextEditor with two errors
    By ahashim in forum Personal Profile
    Replies: 0
    Last Post: 2006-08-29, 23:43

Posting Permissions

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