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. How to change output filename
Forum Updated to NodeBB v4.3 + New Features

How to change output filename

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 727 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.
  • S Offline
    S Offline
    stretchthebits
    wrote on last edited by
    #1

    When I compile my project, I get an executable but I would like to change the filename.
    I don’t want to use my File Manager that comes with my OS to change the filename. If I were to use that method, every time I compile, I would have to rename the executable.

    I looked at the GUI, I could only find the place to change the output folder.
    It looks like when we compile, in a Release folder, it creates a file named Makefile.
    If I change things in this Makefile and I compile the project, it looks like Makefile gets overwritten by some default values.

    In my project folder, I have
    glhlib.pro
    glhlib.pro.user

    Do I have to manually change something in these files?

    Thanks!

    C 1 Reply Last reply
    0
    • S stretchthebits

      When I compile my project, I get an executable but I would like to change the filename.
      I don’t want to use my File Manager that comes with my OS to change the filename. If I were to use that method, every time I compile, I would have to rename the executable.

      I looked at the GUI, I could only find the place to change the output folder.
      It looks like when we compile, in a Release folder, it creates a file named Makefile.
      If I change things in this Makefile and I compile the project, it looks like Makefile gets overwritten by some default values.

      In my project folder, I have
      glhlib.pro
      glhlib.pro.user

      Do I have to manually change something in these files?

      Thanks!

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by ChrisW67
      #2

      @stretchthebits said in How to change output filename:

      Do I have to manually change something in these files?

      Yes. TARGET in glhlib.pro

      S 1 Reply Last reply
      4
      • C ChrisW67

        @stretchthebits said in How to change output filename:

        Do I have to manually change something in these files?

        Yes. TARGET in glhlib.pro

        S Offline
        S Offline
        stretchthebits
        wrote on last edited by
        #3

        @ChrisW67 I added the line
        TARGET = glhlib2.2.so
        somewhere at the top of the glhlib.pro file

        I did a clean build and it creates the file
        libglhlib2.2.so.so.1.0.0

        How can I tell it to not add a .so and not add its own version number.

        Christian EhrlicherC 1 Reply Last reply
        0
        • S stretchthebits

          @ChrisW67 I added the line
          TARGET = glhlib2.2.so
          somewhere at the top of the glhlib.pro file

          I did a clean build and it creates the file
          libglhlib2.2.so.so.1.0.0

          How can I tell it to not add a .so and not add its own version number.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @stretchthebits You can take a look into the documentation: https://doc.qt.io/qt-6/qmake-variable-reference.html#version

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          S 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            @stretchthebits You can take a look into the documentation: https://doc.qt.io/qt-6/qmake-variable-reference.html#version

            S Offline
            S Offline
            stretchthebits
            wrote on last edited by
            #5

            @Christian-Ehrlicher If I put
            win32:VERSION = 1.2.3.4 # major.minor.patch.build
            else:VERSION = 1.2.3 # major.minor.patch

            like the document says, then it adds 1.2.3 to the filename and I get
            libglhlib2.2.so.1.2.3

            If I put
            win32:VERSION = # major.minor.patch.build
            else:VERSION = # major.minor.patch

            it still adds a version number to the filename
            libglhlib2.2.so.1.0.0

            JonBJ 1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              And that's the correct linux naming schema- don't see what's wrong here. You don't specify a version so its 1.0.0 by default.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              S 1 Reply Last reply
              0
              • S stretchthebits

                @Christian-Ehrlicher If I put
                win32:VERSION = 1.2.3.4 # major.minor.patch.build
                else:VERSION = 1.2.3 # major.minor.patch

                like the document says, then it adds 1.2.3 to the filename and I get
                libglhlib2.2.so.1.2.3

                If I put
                win32:VERSION = # major.minor.patch.build
                else:VERSION = # major.minor.patch

                it still adds a version number to the filename
                libglhlib2.2.so.1.0.0

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @stretchthebits
                I don't know if you can somehow force the VERSION to be empty on the end of the library target.

                It's following the Linux convention for naming libraries. It's more usual to have libglhlib2.2.so as a symbolic link to a specific library with version, perhaps you could adopt that.

                1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  And that's the correct linux naming schema- don't see what's wrong here. You don't specify a version so its 1.0.0 by default.

                  S Offline
                  S Offline
                  stretchthebits
                  wrote on last edited by
                  #8

                  @Christian-Ehrlicher I see. I am a Linux noob so I don't know some of these Linux design standards.
                  So, I'll let it be libglhlib.so.2.2

                  1 Reply Last reply
                  0
                  • S stretchthebits has marked this topic as solved on

                  • Login

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