Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Resource File not in executing File
QtWS25 Last Chance

Resource File not in executing File

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.5k Views
  • 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.
  • F Offline
    F Offline
    Fuel
    wrote on last edited by
    #1

    Im asking me if there are Options to compile the Resources in other Files then the Executable? I have Images and Soundfiles and i dont want that my executing File is larger then 100 MB. Im thinking of 2 explicit Files containing the Assets.

    Is that in some way possible?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Yes it is. Take a look at External Binary Resources in Qt's documentation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • F Offline
        F Offline
        Fuel
        wrote on last edited by
        #3

        Sorry but i dont understand rcc. What i read is that i can create, as Example, a Texture.qrc Resource File. Now i need to use the rcc command over the shell to create from this File an extern File?

        Like that

        rcc -binary textures.qrc -o textures.rcc

        Do i need to execute rcc over the Shell or is it possible to add this to my pro File?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Yes on the shell.

          You can create a custom target to automate that.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • F Offline
            F Offline
            Fuel
            wrote on last edited by
            #5

            I just added this to a pro File. Is that correct? It seems like it doesnt work.

            QMAKE_EXTRA_TARGETS += textures
            textures.target = textures.rcc
            textures.commands = rcc -binary textures.qrc -o $$textures.target

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What do you mean by "it doesn't work" ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Fuel
                wrote on last edited by
                #7

                Problem solved. This works for me

                textures.target = textures.rcc
                textures.depends = $$PWD/textures.qrc
                textures.commands = rcc -binary $$PWD/textures.qrc -o $$textures.target
                QMAKE_EXTRA_TARGETS += textures
                PRE_TARGETDEPS += textures.rcc

                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