×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    19

    Question deployment checking

    Hello,

    I have a little question about checking if some files exists in the private folder of the application, in order to not install them again.
    I have in the .pro the below code:
    Code:
        foldertodeploy.source = appFolder/images
        foldertodeploy.target = appFolder
        DEPLOYMENTFOLDERS = foldertodeploy
    and about 50 images inside the folder /appFolder/images/. So what I need is not to deploy this folder every time I install the application on the device; just deploy it once based on the existence of a file inside that folder.
    So Is there a way to check if a specific file exists in c:/Private/xxxxxx/appFolder/images/ in order to not deploy the folder again ?

    Note that without deploying this folder, the installation will be faster; it will take a long time only at the first installation of the application on the device.

    Best Regards,
    elippo

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

    Re: deployment checking

    Theory: The syntax is described here http://www.developer.nokia.com/Commu...l_Installation - I do not know the steps for Qt, but as far as I understand you have some access to the .pkg via the .pro
    You can read about upgrading/updating concepts here: http://devlib.symbian.slions.net/s3/...96F1DF5CF.html - SA is the default, "normal" installer.
    Note that this is a very fragile part of the installer, generally you should avoid it.

    Practice: it is not possible to do what you want in the way you want. When you do not deploy files because they are already there, the result is going to be removal of those existing files. As the default, standalone installer type replaces the previous installation. When it decides to not re-deploy some files, replacement means deletion. The same applies to embedded packages - even some official plug-ins had such issues in the past resulting in an application working only every second installation, as it was periodically removing the embedded components when they were installed already.

    Of course here I assumed you are asking about Symbian devices, based on the c:/Private/... appearing in your post.

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    19

    Re: deployment checking

    Quote Originally Posted by wizard_hu_ View Post
    Theory: The syntax is described here http://www.developer.nokia.com/Commu...l_Installation - I do not know the steps for Qt, but as far as I understand you have some access to the .pkg via the .pro
    You can read about upgrading/updating concepts here: http://devlib.symbian.slions.net/s3/...96F1DF5CF.html - SA is the default, "normal" installer.
    Note that this is a very fragile part of the installer, generally you should avoid it.

    Practice: it is not possible to do what you want in the way you want. When you do not deploy files because they are already there, the result is going to be removal of those existing files. As the default, standalone installer type replaces the previous installation. When it decides to not re-deploy some files, replacement means deletion. The same applies to embedded packages - even some official plug-ins had such issues in the past resulting in an application working only every second installation, as it was periodically removing the embedded components when they were installed already.

    Of course here I assumed you are asking about Symbian devices, based on the c:/Private/... appearing in your post.
    Yes my application will be only for Symbian devices and as you said, practically I cannot achieve what I'm asking for.
    So now how should I solve my problem ? maybe someone can help.
    I have about 200 files in my resource file(.qrc), and I still have about 50 pictures that I need to put inside the .qrc file. The problem is that when I add those files to the existing 200 inside the resource, the following error occurs
    ':-1: error: Recipe linkandpostlink failed with exit code 1.'
    , I think this is due to the number of files that is exceeding the limitation of the resource file.
    Because of that I switched to the deployment issue inside '.pro' in order to put my 50 pictures.
    So is there any other solution ? because the installation is taking a lot of time in order to copy these pictures to the private folder.

    Best Regard,
    elippo

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,563

    Re: deployment checking

    For Symbian, you could add to the installation package an app that runs at installation time to check if the files are already there, and if they are, do nothing, otherwise copy/install the files.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: deployment checking

    Yes, if the real issue is about the number of the files, packing them into a single one can be a workaround. I think the conditional extractor code can be part of the main application as the images are present in your private folder, so users can not access them without the help of the app. I wrote extractor because putting files into your private folder is not straightforward with an installer (though it can be some patch/upgrade, but still may ask this and that from the user), while you can extract the files from a .zip, perhaps .(t)gz can be done in complete silence. See some related ideas here: http://www.developer.nokia.com/Commu...ip-Zip-Archive
    Last edited by wizard_hu_; 2013-07-17 at 11:56.

  6. #6
    Registered User
    Join Date
    Apr 2013
    Posts
    19

    Re: deployment checking

    Quote Originally Posted by wizard_hu_ View Post
    Yes, if the real issue is about the number of the files, packing them into a single one can be a workaround. I think the conditional extractor code can be part of the main application as the images are present in your private folder, so users can not access them without the help of the app. I wrote extractor because putting files into your private folder is not straightforward with an installer (though it can be some patch/upgrade, but still may ask this and that from the user), while you can extract the files from a .zip, perhaps .(t)gz can be done in complete silence. See some related ideas here: http://www.developer.nokia.com/Commu...ip-Zip-Archive
    I got your point. I've compressed the files in a ".zip" file and I've added to the resource file in order to start the work, and another time the same error occurs ':-1: error: Recipe linkandpostlink failed with exit code 1.'
    That error is so weird, why we have limitation on the resource file ?
    I've surfed the web for some solution, I found that .mbm file can contain several images. So do you think if a .mbm file is created containing those images, i will be able to add it to the resource file ?

  7. #7
    Registered User
    Join Date
    Apr 2013
    Posts
    19

    Re: deployment checking

    Quote Originally Posted by petrib View Post
    For Symbian, you could add to the installation package an app that runs at installation time to check if the files are already there, and if they are, do nothing, otherwise copy/install the files.
    petrib, thanks for your answer.
    Your idea is innovative and currently valid, but for me it's a bit complicated, because I don't know how to run the hidden application when the installation phase of the main application is finished.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: deployment checking

    I absolutely do not use Qt, but I think ":-1: error: Recipe linkandpostlink failed with exit code 1." is not the important message. Check for others in the build log.
    For example in this recent post, http://developer.nokia.com/Community...th-exit-code-1, the actual error messages appear after this line (like "multiple definition of `main'" for example).

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,563

    Re: deployment checking

    Quote Originally Posted by elippo View Post
    petrib, thanks for your answer.
    Your idea is innovative and currently valid, but for me it's a bit complicated, because I don't know how to run the hidden application when the installation phase of the main application is finished.
    Look up Symbian package file (.pkg) info in the Symbian developer library (in particular the FR, FILERUN and RI, RUNINSTALL "directives"). You can also search for existing/archived discussions on the topic.

    https://developer.nokia.com/info/sw....s_Library.html

Similar Threads

  1. Checking out Colibri
    By first7movie in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-12-20, 18:02
  2. Checking APN
    By ken_kusagi in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2010-03-22, 23:00
  3. Checking for SVG API's ???
    By Tiger79 in forum Mobile Java General
    Replies: 1
    Last Post: 2007-10-26, 22:37
  4. RAM Checking
    By WinHw in forum Symbian
    Replies: 1
    Last Post: 2004-05-18, 04:47
  5. Checking pop-email every x min?
    By ensingg in forum Symbian
    Replies: 0
    Last Post: 2004-02-06, 14:38

Posting Permissions

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