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. qmake define sequence of QMAKE_POST_LINK actions

qmake define sequence of QMAKE_POST_LINK actions

Scheduled Pinned Locked Moved Solved General and Desktop
qmakeqmakepostlinkaxserverqt5.5.1
6 Posts 2 Posters 4.6k 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.
  • D Offline
    D Offline
    Damiano
    wrote on 7 Jan 2016, 13:33 last edited by
    #1

    Hi,

    After link I need to sign my exe with a custom tool and I use the QMAKE_POST_LINK variable.

    The problem is that I am using also the QAxServer module and it causes the target exe to be modified after the signing part. As consequence the signature is not valid anymore.

    These lines are in project file:

    QT += axserver
    QMAKE_POST_LINK += "toolToSignExe.exe \"$${DESTDIR}\" \"$${TARGET}.exe\""
    

    I tried to inverse the order of the lines but it changes nothing.

    In Qt4 axserver was a CONFIG and it was possible to choose which step was executed first by moving the lines in project file.

    Any suggestion how i could resolve this in qt5? There is a mean to set the order think happens or a QMAKE_POST_POST_LINK variable?

    Thank you!

    P.s. I dont want to add a build step in Qt Creator because it lands in .pro.user file and it is not versionable

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Jan 2016, 23:27 last edited by
      #2

      Hi and welcome to devnet,

      Something's not clear: you want to first sign your executable and then link against the axserver library ?

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

      D 1 Reply Last reply 11 Jan 2016, 07:44
      0
      • S SGaist
        7 Jan 2016, 23:27

        Hi and welcome to devnet,

        Something's not clear: you want to first sign your executable and then link against the axserver library ?

        D Offline
        D Offline
        Damiano
        wrote on 11 Jan 2016, 07:44 last edited by
        #3

        @SGaist thank you for your answer!

        No I'm tryng to do the opposit, link against axserver and only at the end sign the executable.

        To be more clear if I look at the generated makefile I find this lines:

        	cmd.exe /C ""U:\toolToSignExe.exe" "Output" "easyCodeII.exe"" 
        	 -$(IDC) $(DESTDIR_TARGET) /idl $(OBJECTS_DIR)/easyCodeII.idl -version 1.0
        	 -$(IDL) $(OBJECTS_DIR)/easyCodeII.idl /nologo /tlb $(OBJECTS_DIR)/easyCodeII.tlb
        	 -$(IDC) $(DESTDIR_TARGET) /tlb $(OBJECTS_DIR)/easyCodeII.tlb
        	 -$(IDC) $(DESTDIR_TARGET) /regserver
        

        But I want to have:

        	 -$(IDC) $(DESTDIR_TARGET) /idl $(OBJECTS_DIR)/easyCodeII.idl -version 1.0
        	 -$(IDL) $(OBJECTS_DIR)/easyCodeII.idl /nologo /tlb $(OBJECTS_DIR)/easyCodeII.tlb
        	 -$(IDC) $(DESTDIR_TARGET) /tlb $(OBJECTS_DIR)/easyCodeII.tlb
        	 -$(IDC) $(DESTDIR_TARGET) /regserver
        	cmd.exe /C ""U:\toolToSignExe.exe" "Output" "easyCodeII.exe"" 
        
        1 Reply Last reply
        0
        • D Offline
          D Offline
          Damiano
          wrote on 11 Jan 2016, 11:48 last edited by
          #4

          So I have resolved by removing QT += axserver from project file and adding the line CONFIG += idcidl

          Now my project file looks so:

          QMAKE_POST_LINK += "toolToSignExe.exe \"${DESTDIR}\" \"${TARGET}.exe\""
          CONFIG += idcidl
          
          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 11 Jan 2016, 21:52 last edited by
            #5

            So you didn't need axserver at all ?

            In any case, thanks for sharing the solution :)

            Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

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

            D 1 Reply Last reply 14 Jan 2016, 09:53
            0
            • S SGaist
              11 Jan 2016, 21:52

              So you didn't need axserver at all ?

              In any case, thanks for sharing the solution :)

              Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

              D Offline
              D Offline
              Damiano
              wrote on 14 Jan 2016, 09:53 last edited by
              #6

              @SGaist Yes I still need it, i think that QT += axserver does nothing else than calling idcidl.prf (from Qt installation).
              Using CONFIG += idcidl also call idcidl.prf but I can control when it is done, and the content of the makefile is then ordered like I need it.

              1 Reply Last reply
              0

              6/6

              14 Jan 2016, 09:53

              • Login

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