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:
[I]if( NOT( exists( "!:\private\<UID>\MyFile.ini" ) ) )
"Uninstaller.exe" -"!:\sys\bin\Uninstaller.exe", FR, RR, RW
endif[/I]
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?
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?
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'
Re: What happens to private directory during application updates?
Is the <uid> the same as the uid of the uninstaller.exe?
Re: What happens to private directory during application updates?
[QUOTE=paipeng;643452]For question 2, have you tried to update your application on the memory card also, and see if the file is deleted or kept?[/QUOTE]
Yep, kept, but not found by EXISTS.
[QUOTE=wizard_hu_;643457]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'[/QUOTE]
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=Paul.Todd;643510]Is the <uid> the same as the uid of the uninstaller.exe?[/QUOTE]
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.
Re: What happens to private directory during application updates?
[QUOTE=isak1986;643525]Yep, kept, but not found by EXISTS.[/QUOTE]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.
Re: What happens to private directory during application updates?
[QUOTE=wizard_hu_;643529]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.[/QUOTE]
I've tried also "C:\private\Uid\MyFile.ini" whith installing both versions in phone memory - result is the same.
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
Re: What happens to private directory during application updates?
[QUOTE=Paul.Todd;643836]Did you remember the format for private folders and files is drive:\private\"hex uid without 0x"\file?
eg c:\private\deadf00d\myfile.ini[/QUOTE]
Yeah. I wish the problem was with sintaxis. But it's not.