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. How to show debian package version to user?
Forum Updated to NodeBB v4.3 + New Features

How to show debian package version to user?

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 2.4k 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.
  • U Offline
    U Offline
    uruselfei
    wrote on last edited by
    #1

    hi!

    i need to show current .deb version number on "about" screen.

    for example, I have "myproject_0.0.5_armel.deb" installation file, how can i get "0.0.5" into my variable and then show it to user?
    I know, this information stored in "changelog" file, but how to get that value?

    [[moved to mobile and embedded, Tobias]]

    1 Reply Last reply
    0
    • D Offline
      D Offline
      danimo
      wrote on last edited by
      #2

      This is usually not how you do it... There is a program revision (which should be hard coded at build time), and a package version. The package version should only be incremented if the packaging has changed (i.e. details), the program should not need to know about it.

      If done properly in the process, the customer should not need to know the packaging revision of the package, and/or the package you ship only contains the version number of the software. In your case, the package doesn't even have a packaging, but only a program version.

      If you really need to know the full version string for diagnostic purposes, I would extract this extra information from the output of "dpkg -l myproject" (make sure dpkg is there in the first place).

      1 Reply Last reply
      0
      • U Offline
        U Offline
        uruselfei
        wrote on last edited by
        #3

        well, customers usually "require" that "your app should show package number", they don't think how it is usually should be done.

        they need to see "Program Name, version 1.2.3" in about screen. hardcoding is not an option, unfortunatelly

        1 Reply Last reply
        0
        • D Offline
          D Offline
          danimo
          wrote on last edited by
          #4

          But "Program Name, version 1.2.3" is the program version, not the package version. It's merely part of the package name.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            uruselfei
            wrote on last edited by
            #5

            it IS :)
            go to "Projects" tab, opent Harmattan -> Run, expand "Create package". what we see?

            Package name: XXX
            Package version: 1.2.3

            1 Reply Last reply
            0
            • D Offline
              D Offline
              danimo
              wrote on last edited by
              #6

              You could have mentioned that you were trying to build a Harmattan package. So this is in the wrong forum to begin with (thanks to Tobias for moving it) :-)

              Harmattan packaging is a bit different in that regard, but my argument holds there: Package Version == Program Version. Qt just has no default semantics for indicating version numbers in applications, so Qt Creator has an extra control to set it. I don't know if there is a way to synchronize the application and the package number without confusing Creator.

              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