×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Putting files in alternative locations

    Suppose I want to install (via DEPLOYMENT) a large database. It's too large to fit on "C" on most Symbian devices, so it should go on the same drive as the application (either "mass storage" or microSD chip). But I don't want it in the app private directory since it must be shared. How is this specified? Simply
    Code:
        database.sources = "mydb.db"
        database.path = :\MyAppData\
        DEPLOYMENT += database
    Or some other way?

    Will this be removed automatically if the application is uninstalled?

  2. #2
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: Putting files in alternative locations

    Hi,

    Try

    Code:
    symbian {
        database.pkg_postrules = "\"mydb.db\" - \"!:\\Data\\mydb.db\"
        DEPLOYMENT += database
    }
    This will install the file in user-selected location, ie. same drive as the app binaries. Note however that contents under \Data are visible also in the File Manager so users may (more or less inadvertently) delete or otherwise tamper with the file.

    Also, if you want your application to survive a backup & restore process, you'll need something like this:

    Code:
    symbian {
        backupxml.sources = "backup_registration.xml"
        DEPLOYMENT += backupxml
    }
    As for the contents of backup_registration.xml, check TSS000750. Note that if you use /Data as the location, you don't need to specify a public_backup section as the folder is always backed up as user data.

  3. #3
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Putting files in alternative locations

    Do you know if there's a better spot than Data? (Presumably it would be in its own appropriately-named subdirectory.)

    If placed as you describe, will it be cleaned up on app delete?

Similar Threads

  1. STUCK with imaginary image files
    By lvanton in forum General Development Questions
    Replies: 1
    Last Post: 2009-05-21, 07:09
  2. A better way to read several Xml Files
    By Fye_08 in forum Mobile Java General
    Replies: 4
    Last Post: 2009-04-22, 09:28
  3. error when browsing files
    By Scolpy in forum Symbian
    Replies: 17
    Last Post: 2008-11-10, 23:24
  4. Problem packaging and deploying files
    By raffaelbechara in forum Symbian
    Replies: 4
    Last Post: 2008-10-24, 14:53
  5. How to enable security to the files on Memory Card
    By manojkumar.m in forum Mobile Java General
    Replies: 1
    Last Post: 2008-10-04, 18:29

Posting Permissions

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