Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Packaging extra folder and files in Qt for symbian?
Forum Updated to NodeBB v4.3 + New Features

Packaging extra folder and files in Qt for symbian?

Scheduled Pinned Locked Moved Mobile and Embedded
32 Posts 9 Posters 19.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexander
    wrote on last edited by
    #3

    add next lines in .pro file

    @samplefiles.sources = file1
    samplefiles.path = dir1
    DEPLOYMENT += samplefiles@

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kamalakshantv
      wrote on last edited by
      #4

      Make use of DEPLOYMENT in your .pro file. Something like

      @PrjRes.sources = images\icon.png
      PrjRes.path = c:\data\images\icon.png
      DEPLOYMENT += PrjRes@

      Edit: Didn't refresh the page so missed the above posts.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kamalakshantv
        wrote on last edited by
        #5

        Also note that there is a "Bug":http://bugreports.qt.nokia.com/browse/QTBUG-11519 in Qt 4.6.3 which is fixed in Qt 4.7. So above will have some issues in Qt 4.6.3. So in Qt 4.6.3 DEPLOYMENT keyword is not handles properly.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          smotiwala
          wrote on last edited by
          #6

          Thanks for ur reply. I think "PrjRes.sources" is the path where the files to be packaged?

          Please let me know how do I add folder?

          I have following folder and file hierarchy to be packaged

          @
          [Package] // -- folder
          [data1] // -- folder
          file1.txt // file
          conf1.txt // file
          icon1.png // file
          icon2.png // file
          [data2] // -- folder
          file2.txt // file
          conf2.txt // file
          logo.png // file
          image.png // file
          @--

          If DEPLOYMENT has bug then what is the alternative to. I have read about "INSTALLS" but unfortunately "INSTALLS" didn't work.

          thanks in advance.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alexander
            wrote on last edited by
            #7

            QtK :)

            1 Reply Last reply
            0
            • R Offline
              R Offline
              roopeshchander
              wrote on last edited by
              #8

              To elaborate:
              @
              samplefiles.sources = path/in/build/machine/to/file.ext
              samplefiles.path = dir/in/the/device/to/place/file/
              DEPLOYMENT += samplefiles
              @

              It's a little easier in Qt Creator 2.1, where Qt Creator adds a DEPLOYMENTFOLDERS variable in the pro file when it creates the project ("QTCREATORBUG-3203":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3203 has some details), like:
              @
              DEPLOYMENTFOLDERS = # file1 dir1
              @

              which you can edit to
              @
              file1.source = relative/path/in/build/machine/to/file.ext
              dir1.source = relative/path/in/build/machine/to/dir/
              DEPLOYMENTFOLDERS = file1 dir1
              @

              1 Reply Last reply
              0
              • S Offline
                S Offline
                smotiwala
                wrote on last edited by
                #9

                Thanks. But I have QTCreator 2.0

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kamalakshantv
                  wrote on last edited by
                  #10

                  [quote author="smotiwala" date="1292588523"]

                  If DEPLOYMENT has bug then what is the alternative to.

                  thanks in advance.[/quote]

                  Please do verify if the bug is valid in your case. Say if you are targeting for Qt 4.7 then the bug is probably solved in that version.

                  If you still face problems. One way out is to try modify the .pkg file and build the sis. This is not recommended, so didn't mention it - but you can try this if other options don't work.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    roopeshchander
                    wrote on last edited by
                    #11

                    @smotiwala The DEPLOYMENT part of my answer (just elaborating what @alexander and @qtk said) does not need Qt Creator 2.1. Maybe you could try that and let us know if that helped or not.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      smotiwala
                      wrote on last edited by
                      #12

                      Thanks all for your help. I'll try it.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        smotiwala
                        wrote on last edited by
                        #13

                        Hi,

                        I was trying the above options but didn't installs the file or folder. can you please give me working example for Qt (symbian). how do i define relative path etc.?

                        Thanks

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          smotiwala
                          wrote on last edited by
                          #14

                          The code i use

                          @file1.path = Image // folder where i want to copy splash_image.jpg
                          file1.source = splash_image.jpg // image file to be copied which is placed in root folder where .pro file resides
                          DEPLOYMENTFOLDERS += file1@

                          please help me what is the problem.

                          Thanks

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alexander
                            wrote on last edited by
                            #15

                            if try to use DEPLOYMENT instead DEPLOYMENTFOLDERS?
                            edit : I forgot, you tried it:)

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              kamalakshantv
                              wrote on last edited by
                              #16

                              [quote author="smotiwala" date="1293092742"]The code i use

                              @file1.path = Image // folder where i want to copy splash_image.jpg
                              file1.source = splash_image.jpg // image file to be copied which is placed in root folder where .pro file resides
                              DEPLOYMENTFOLDERS += file1@

                              please help me what is the problem.

                              Thanks[/quote]

                              If your source is a file it should be DEPLOYMENT. If its folder it should be DEPLOYMENTFOLDERS.

                              So use it like this

                              @file1.source = Image // Folder name
                              DEPLOYMENTFOLDERS += file1
                              @

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                smotiwala
                                wrote on last edited by
                                #17

                                I tried following but no luck

                                @folder1.source = NewImage // Folder name to be created on destination
                                DEPLOYMENTFOLDERS += folder1

                                imagenew.source = Splash.PNG // image file to be copied which is placed in root folder where .pro file resides
                                DEPLOYMENT += imagenew@

                                No "NewImage" folder will created nor "Splash.PNG" copied.

                                Size of the .sis file remains same

                                1 Reply Last reply
                                0
                                • V Offline
                                  V Offline
                                  vcsala
                                  wrote on last edited by
                                  #18

                                  Maybe you can try the makesis approach (described "here":http://wiki.forum.nokia.com/index.php/Using_Qt_Creator_With_Symbian#Packaging_Application_as_SIS_File_and_Deploying_to_Symbian_Device) by adding your additional files to the pkg file

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    smotiwala
                                    wrote on last edited by
                                    #19

                                    Should I manually update .pkg file to add the files and folders?

                                    1 Reply Last reply
                                    0
                                    • V Offline
                                      V Offline
                                      vcsala
                                      wrote on last edited by
                                      #20

                                      If you use makesis manually in this case I think yes

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        Matze5590
                                        wrote on last edited by
                                        #21

                                        Hey there,

                                        i also have problems with files in symbian.
                                        I'm using QtCreator 2.1.
                                        When i use this:
                                        @file1.source = db.sqlite
                                        DEPLOYMENTFOLDERS = file1@
                                        it works with simulator, but not on device (Nokia N8)
                                        error: unable to open database, file Error opening database

                                        so i tried this:
                                        @file1.source = db.sqlite
                                        DEPLOYMENT = file1@
                                        and its not working too ("general related OS-error" while compiling)

                                        please help me! thanks

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          alexander
                                          wrote on last edited by
                                          #22

                                          Matze5590, Did you try to use next lines?
                                          @file1.source = db.sqlite
                                          file1.path = path to db.sqlite
                                          DEPLOYMENT = file1@

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved