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.
  • V Offline
    V Offline
    VRonin
    wrote on 6 Dec 2017, 11:45 last edited by VRonin 12 Jun 2017, 11:47
    #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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Dec 2017, 22:22 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
      • V Offline
        V Offline
        VRonin
        wrote on 7 Dec 2017, 08:18 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

        K 1 Reply Last reply 9 Dec 2017, 20:02
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 8 Dec 2017, 22:02 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
          • V VRonin
            7 Dec 2017, 08:18

            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.

            K Offline
            K Offline
            kshegunov
            Moderators
            wrote on 9 Dec 2017, 20:02 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

            V 1 Reply Last reply 11 Dec 2017, 08:44
            0
            • K kshegunov
              9 Dec 2017, 20:02

              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
              
              V Offline
              V Offline
              VRonin
              wrote on 11 Dec 2017, 08:44 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

              6/6

              11 Dec 2017, 08:44

              • 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