qmake install error detection on Windows
-
Hi Guys, I'm facing an annoying deployment problem when using
qmakeTake this example .pro file:
target.path = C:/temp baseLibs.path = C:/temp baseLibs.files = "SomeConfigFile.xml" INSTALLS += baseLibs targetand that the target is
MyApp.exeNow let's imagine I call
nmake installwhile I haveC:/temp/MyApp.exeopen. 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 toINSTALLSbut 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:\tempIdeal scenario would be that I can check if any of those
copy /yfailed. -
What if you add the
/vparameter ? -
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:\tempIdeal scenario would be that I can check if any of those
copy /yfailed.Just a wild guess, but what if you add dependency of the one target to the other?
Something like:target.path = C:/temp baseLibs.path = C:/temp baseLibs.files = "SomeConfigFile.xml" target.depends = baseLibs -
Just a wild guess, but what if you add dependency of the one target to the other?
Something like:target.path = C:/temp baseLibs.path = C:/temp baseLibs.files = "SomeConfigFile.xml" target.depends = baseLibs@kshegunov said in qmake install error detection on Windows:
target.depends = baseLibs
This was a very promising idea but unfortunately it looks like
.dependsdoes not work with otherINSTALLStagets