Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qmake install error detection on Windows
QtWS25 Last Chance

qmake install error detection on Windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qmakewindowsdeploymentmake install
6 Posts 3 Posters 2.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.
  • VRoninV Offline
    VRoninV Offline
    VRonin
    wrote on last edited by VRonin
    #1

    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 have C:/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 to INSTALLS but it doesn't solve my problem

    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
    ~Napoleon Bonaparte

    On a crusade to banish setIndexWidget() from the holy land of Qt

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Since this is going to be a Windows specific issue, did you check the content of the Makefile regarding the install step ?

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

      1 Reply Last reply
      1
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        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.

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        kshegunovK 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What if you add the /v parameter ?

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

          1 Reply Last reply
          0
          • VRoninV VRonin

            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.

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by
            #5

            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
            

            Read and abide by the Qt Code of Conduct

            VRoninV 1 Reply Last reply
            0
            • kshegunovK kshegunov

              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
              
              VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              @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 other INSTALLS tagets

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              0

              • Login

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