Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved installer.executeDetached() behaves differently between Mac & Linux

    Tools
    2
    8
    130
    Loading More Posts
    • 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
      vyau last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • V
          vyau last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • V
              vyau last edited by

              @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 Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • V
                  vyau last edited by

                  @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 Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    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 Reply Quote 0
                    • First post
                      Last post