Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt deploy for Mac Os doesn't work



  • I have built an app on qt for MacOS and deployed it. However when I tried using it on an other Mac, it shows error. !![alt text](Screen Shot 2020-01-12 at 11.56.52 PM.png image url)
    This same thing happens on multiple Mac I've tried. I've tried to update Mac OS to the latest one but its still doesnt work.
    Does anyone know why?

    Thank you!



  • Hi, I use macdeployqt and it works for me. How does your command line look when you run macdeployqt?



  • I deployed it directly in QC by choosing option to build the release version for Mac Desktop. I works fine on my Mac but doesn't on any other Mac.


  • Lifetime Qt Champion

    Hi
    You need all the Qt libraries with the ".exe".
    macdeployqt is very helpful for that.
    in QC you simply build a .exe in release mode but its still need other files
    with it. QC does not handle that for you.

    https://www.ics.com/blog/your-guide-deploying-qt-applications-macos



  • Can you please show me how to use macdeployqt?


  • Lifetime Qt Champion

    @Aj501
    hi
    Read the tut. its very good at explaining.

    The actual use is just
    macdeployqt <ApplicationName>.app
    (if you are not using QML)



  • Thank you! so I navigated to my build directory, which is:
    build-NickBilliardsPrjQT-MacDesktop-Release
    and then I ran the command: macdeployqt NickBilliards.app
    but I got this error saying: zsh: command not found: macdeployqt
    I noticed my macdeployqt is not in the same directory as my build directory. Should this be the problem?


  • Lifetime Qt Champion

    @Aj501
    Hi
    Just use the full path to it.
    It does not have to be (is normally not) in the build directory.



  • While I tried to find the path to macdeployqt using find / -iname macdeployqt, I only found it in Qt version 5.12 .5 and 5.13, which were the previous versions I used. I supposed the macdeployqt in the older version will not work for my newly release app.
    My qt is now of version 5.14 and the project is in this newer version, but I can't find 5.14, hence I can't find the macdeployqt, in my Qt directory. Do you know why?


  • Lifetime Qt Champion

    Hi,

    How did you install Qt ?



  • I installed it using usual steps. I started with version 5.12.5 and 5.13 and the app was built and deployed on these two version, but when I updated QC to version 5.14 and deployed the app again, it's not showing up in any directory except the built release version of the app. I don't know what else I can say about my installation of Qt as I followed the standard (normal) installation steps.



  • @SGaist Even I tried to cd in to the macdeployqt which resides in qt version 5.12.5 and ran the command "macdeployqt myapp.app", it still says this: "zsh: command not found: macdeployqt"


  • Lifetime Qt Champion

    You are on a Unix system. To run an application from a specific folder either cd into the folder and call ./exec_name or use the full path to the executable file.

    Please explain the method you used. On macOS, there are at least 3 different ways that can be called standard to install Qt.



  • @SGaist said in Qt deploy for Mac Os doesn't work:

    To run an application from a specific folder either

    I don't remember detail steps but I used the Qt online installation and used the suggested version of Qt for my Mac. Would it be easier now if I uninstall Qt and reinstall it? Do you have a favorite method of installing Qt?


  • Lifetime Qt Champion

    The online installer is fine. The goal was to ensure that the version to check is the same for everybody.

    Did you pass any parameter to macdeployqt ?


Log in to reply