Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. installer.executeDetached() behaves differently between Mac & Linux

installer.executeDetached() behaves differently between Mac & Linux

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 2 Posters 542 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
    vyau
    wrote on last edited by
    #1

    Hello: I have used QtInstaller to package my application. I tried launching it on Linux and Mac respectively. In both cases, the UI portion comes up just fine.
    At the very end of the UI installer, I have the directive to:

    installer.executeDetached("myScript.bash");

    It should execute a bash script. On Linux, it did launch.
    On mac, when I clicked on myinstaller.app, it launches UI but won't execute my bash script at the end.

    Does executeDetached() behaves differently between Mac and Linux?

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

      Hi,

      Might be a silly question but are you sure that your script can run on macOS ?
      What does that script do ?

      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 Offline
        V Offline
        vyau
        wrote on last edited by
        #3

        yes, bash script runs fine on Mac. I can execute it manually, I just cannot launch it from executeDetached() for some reason.
        The script fires off a bunch of docker containers, using docker command.

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

          Did you check your system logs ?
          I am suspecting that you are changing users to install your package and that one does not have access to the Docker daemon.

          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 Offline
            V Offline
            vyau
            wrote on last edited by
            #5

            @SGaist I did check logs, nothing stands out...No errors.

            I did notice something. From terminal, I cd into the myApplication.app directory and under Contents/MacOS to locate the actual binary.
            I then run it manually. That works too.

            That led me to think, what does executeDetached() do? Is it a full shell environment?

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

              No it is not. It will try to execute whatever you ask but it does not mean you have a shell.

              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 Offline
                V Offline
                vyau
                wrote on last edited by
                #7

                @SGaist If I did not sign my Mac app, the one i used binarycreator to create. Do you think that may have caused "executeDetached()" to fail?

                I did not sign my app and did not know I have to

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

                  Depending on the macOS version you may have to also notarize it.

                  I currently do not know whether there's any relation between the two but I would not find it surprising.

                  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

                  • Login

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