Select to view content in your preferred language

module "Esri.ArcGISRuntime.Toolkit" is not installed when running on separate computer

1014
6
Jump to solution
10-10-2024 03:16 PM
Labels (2)
Paige
by
Occasional Contributor

I have built a Qt C++ application that uses ArcGIS and ArcGIS Toolkit. I have also created a script that does the following:

  • Creates a folder called release/
  • Uses windeployqt6 to package the executable and its dependencies for deployment in the release/ folder
  • Copy-pasting the remaining DLLs that windeployqt6 missed to release/

When I run the executable from the release/ folder on my Windows 10 machine, the application works perfectly. However, if I move the release/ folder that my script created to another Windows 10 computer, the application hangs with this error:

QQmlApplicationEngine failed to load component
qrc:/qml/MyMap.qml:3:1: module "Esri.ArcGISRuntime.Toolkit" is not installed

Can anybody tell me why this isn't working? I'm baffled that it would run completely fine on my machine, but immediately fail on another, very similar machine. I've been struggling with this very hard and would greatly appreciate a solution.

0 Kudos
1 Solution

Accepted Solutions
Paige
by
Occasional Contributor

Hi @bnoble0110 , thank you so much for your help. I ended up finding the problem after I posted my comment this morning. Basically, I had created my own CMakeLists.txt that I was using with ArcGISToolkit 200.4.0, and it was not installing the module correctly. I updated the ArcGISToolkit version to 200.5.0 and followed the toolkitcpp installation instructions here , and now it is working. (Or rather, I'm getting a new error, but it happens after I should have encountered the "module not  installed" error if that was still happening. You gotta celebrate the small victories in software development 🙃) Thanks again for your help! I greatly appreciate the responses 🙂

View solution in original post

6 Replies
bnoble0110
Esri Contributor

Hello @Paige 

 

Can you share how your script is calling `windeployqt6`? I just ran through deploying a basic `NorthArrow` toolkit sample using `CMake` from one windows machine to another. I did also have to copy over the missed DLLs that `windeployqt6` missed like you.

For the following example, i used `deploy-TestWindowsDeployApp` as my deployment folder. The app components itself (i.e. the `.pro` file and all the source files etc) are located in `TestWindowsDeployApp`

My work flow was essentially this:

1.] Copy the outputted executable from the build into the `/deploy-TestWindowsDeployApp` folder.

2.] Run windeployqt on that executable in the following way `./windeployqt6.exe --qmldir C:\Users\bnoble0110\TestWindowsDeployApp --release C:\Users\bri12415\deploy-TestWindowsDeployApp\TestWindowsDeployApp.exe`

3.] Copy the missing DLLS to `C:\Users\bri12415\deploy-TestWindowsDeployApp`

 

 

I ran into a similar `failed to load component` error with `QtQuick.Controls`, and it was because I had initially forgotten the `qmldir` argument when executing `windeployqt6.exe`

Paige
by
Occasional Contributor

Thanks for your response!

Say my source files, CMakeLists.txt, etc. are in `MyApp/` and my deploy folder is called `deploy-MyApp/` Here's my workflow:

1. Copy the outputted executable from the build into `deploy-MyApp/`

2. Run windeployqt6 with this command:

windeployqt6.exe \
   --qmldir C:/Qt/6.7.0/msvc2019_64/qml/ \
   --qmldir MyApp/qml/ \
   -sensors -websockets \
   --no-translations \
   deploy-MyApp/

3. Copy missing DLLs (including EsriCommonQtd.dll and runtimecore.dll from ArcGIS) to `deploy-MyApp`

I have tried adding a few variations of including the Toolkit with the qmldir option, for example:

   --qmldir ArcGISToolkit/uitools/import

 But I'm still getting the "module not installed" error for ArcGIS Toolkit when I add that in.

The other differences that I noticed are that 1) you are including the --release tag when I am not, 2) your command ends with the executable itself, while I am only specifying the path of the executable, and 3) you are using windeployqt, while I used windeployqt6. I wonder if one of those differences could fix it?

Paige
by
Occasional Contributor

I tried re-running my script with each of the changes mentioned in the last paragraph of my above reply (i.e. using the --release tag, etc.), but that didn't resolve the problem. I'm still very stuck on this.

0 Kudos
bnoble0110
Esri Contributor

Can you try your workflow with this basic NorthArrow sample app I attached? It's set up for the 200.5 version of the Maps SDK on windows.

Paige
by
Occasional Contributor

Hi @bnoble0110 , thank you so much for your help. I ended up finding the problem after I posted my comment this morning. Basically, I had created my own CMakeLists.txt that I was using with ArcGISToolkit 200.4.0, and it was not installing the module correctly. I updated the ArcGISToolkit version to 200.5.0 and followed the toolkitcpp installation instructions here , and now it is working. (Or rather, I'm getting a new error, but it happens after I should have encountered the "module not  installed" error if that was still happening. You gotta celebrate the small victories in software development 🙃) Thanks again for your help! I greatly appreciate the responses 🙂

bnoble0110
Esri Contributor

Haha awesome, I am glad to hear you got through that road block! I definitely understand where you're coming from with the small victories 😅

If you need help with the new error you're encountering feel free to open up a new post or continue the conversation here. Best of luck!