Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt cmake deployment API and Cpack not working for macos
Forum Updated to NodeBB v4.3 + New Features

Qt cmake deployment API and Cpack not working for macos

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 1 Posters 299 Views 1 Watching
  • 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.
  • MesrineM Offline
    MesrineM Offline
    Mesrine
    wrote on last edited by Mesrine
    #1

    Hello everyone,
    I am trying to use Qt cmake deployment API, cpack and the IFW from CMake but have problems for Macos bundles.
    It seems that cpackIFW runs internally the macdeploy tool and this one fails to find app bundle.
    If I run cmake --install . there is no error because it is running macdeploy from CMAKEINSTALLPREFIX but when executing cpack -B package -G "IFW;TGZ" --config CPackConfig.cmake it fails to find the app bundle.
    The cmake I use is here.
    Any help will be much appreciated.

    MesrineM 1 Reply Last reply
    0
    • MesrineM Mesrine

      Hello everyone,
      I am trying to use Qt cmake deployment API, cpack and the IFW from CMake but have problems for Macos bundles.
      It seems that cpackIFW runs internally the macdeploy tool and this one fails to find app bundle.
      If I run cmake --install . there is no error because it is running macdeploy from CMAKEINSTALLPREFIX but when executing cpack -B package -G "IFW;TGZ" --config CPackConfig.cmake it fails to find the app bundle.
      The cmake I use is here.
      Any help will be much appreciated.

      MesrineM Offline
      MesrineM Offline
      Mesrine
      wrote on last edited by Mesrine
      #2

      @Mesrine
      When running cpack in verbose mode it returns :

      CPack Verbose: Running Qt deploy tool for QVaultCli.app in working directory '/Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/vaultCli/data'
      

      this comes from here

      So it seems QT_DEPLOY_PREFIX = CMAKE_INSTALL_PREFIX the latter is set by cpack.
      I can see that the bundle is installed but in the Unspecified component.

      CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app
      CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents
      CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/MacOS
      CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/MacOS/QVaultCli
      CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/Info.plist
      

      But macdeploy is run from the vaultCli component.
      Lets try removing the components in the cmake install command of the deploy script .

      MesrineM 1 Reply Last reply
      0
      • MesrineM Mesrine

        @Mesrine
        When running cpack in verbose mode it returns :

        CPack Verbose: Running Qt deploy tool for QVaultCli.app in working directory '/Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/vaultCli/data'
        

        this comes from here

        So it seems QT_DEPLOY_PREFIX = CMAKE_INSTALL_PREFIX the latter is set by cpack.
        I can see that the bundle is installed but in the Unspecified component.

        CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app
        CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents
        CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/MacOS
        CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/MacOS/QVaultCli
        CPack Verbose: Installing: /Users/runner/work/_temp/build/package/_CPack_Packages/Darwin/IFW/QtVault-v0.1.2+gbed06b0.20240325092904-Darwin_21.6.0-x86_64-AppleClang/packages/Unspecified/data/./QVaultCli.app/Contents/Info.plist
        

        But macdeploy is run from the vaultCli component.
        Lets try removing the components in the cmake install command of the deploy script .

        MesrineM Offline
        MesrineM Offline
        Mesrine
        wrote on last edited by Mesrine
        #3

        @Mesrine said in Qt cmake deployment API and Cpack not working for macos:

        Unspecified

        That was the problem.
        It seems that

        install(TARGETS QVaultCli
                                BUNDLE DESTINATION .
                                 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
                       COMPONENT vaultCli
                                   )
        

        Do not add the bundle to the cpack vaultCli component.

        1 Reply Last reply
        0
        • MesrineM Mesrine has marked this topic as solved on

        • Login

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