qmake define sequence of QMAKE_POST_LINK actions
-
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
-
Hi and welcome to devnet,
Something's not clear: you want to first sign your executable and then link against the axserver library ?
-
@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""
-
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 :)
-
@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.