qmake install error detection on Windows
-
Hi Guys, I'm facing an annoying deployment problem when using
qmake
Take this example .pro file:
target.path = C:/temp baseLibs.path = C:/temp baseLibs.files = "SomeConfigFile.xml" INSTALLS += baseLibs target
and that the target is
MyApp.exe
Now let's imagine I call
nmake install
while I haveC:/temp/MyApp.exe
open. The result is that the target copy will fail but, since the xml file gets copied successfully make terminates with a success (errorlevel is 0).
Is there any way I can detect that error?
I already tried inverting the arguments toINSTALLS
but it doesn't solve my problem -
Hi,
Since this is going to be a Windows specific issue, did you check the content of the Makefile regarding the install step ?
-
Yes, not much there:
INSTALL_FILE = copy /y install_target: first FORCE @if not exist $(INSTALL_ROOT)C:\temp mkdir $(INSTALL_ROOT)C:\temp & if not exist $(INSTALL_ROOT)C:\temp exit 1 -$(INSTALL_FILE) $(DESTDIR_TARGET) $(INSTALL_ROOT)C:\temp\$(TARGET) install_baseLibs: first FORCE @if not exist $(INSTALL_ROOT)C:\temp mkdir $(INSTALL_ROOT)C:\temp & if not exist $(INSTALL_ROOT)C:\temp exit 1 -$(INSTALL_FILE) SomeConfigFile.xml $(INSTALL_ROOT)C:\temp
Ideal scenario would be that I can check if any of those
copy /y
failed. -
What if you add the
/v
parameter ? -
@kshegunov said in qmake install error detection on Windows:
target.depends = baseLibs
This was a very promising idea but unfortunately it looks like
.depends
does not work with otherINSTALLS
tagets