Deployment problems with C++ sdk for 100.5 runtime windows using msvc2017_64

924
3
05-28-2019 04:02 PM
SelimOzel
New Contributor III

My problem is actually quite similar to the one posted in [1]. I am trying to deploy one of the sample apps at the moment, GetElevationAtPoint. I build it as release on my Windows 10 laptop. Afterwards, I copy the executable to an empty folder. In that folder I run:

C:\Qt\5.12.2\msvc2017_64\bin\windeployqt.exe --release GetElevationAtPoint.exe

There are still some .dll files left. I grab (and copy under my release folder) runtimecore.dll, ArcGISRuntimeToolkitCppApi.dll and EsriCommonQt.dll from:

C:\Program Files (x86)\ArcGIS SDKs\Qt100.5\sdk\windows\x64\bin

I do the same with all .dll files under:

C:\Qt\5.12.2\msvc2017_64\bin

Finally I copy vcruntime140.dll and msvcp140.dll from the folder:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Remote Debugger\x64


Once these steps are completed, the app actually runs on a target machine. However, it gives me a complete white screen. I can still see some of the UI artifacts but the main map layout is just complete white. 

I haven't been able to figure out why that is the case so far. Some help would be great. I should also mention that I haven't added any license token to the code. Is that required? This is just an in-house release for testing, so it's not going to customers or outside world. 

Finally, the app seems to be 300 mb with all .dll files and everything. Is it possible to reduce that size?

Thanks a lot! 

[1] https://community.esri.com/message/788099-re-deployment-problems-with-c-sdk-for-1002-runtime-windows...

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

A good trick is to look at the Sample Viewer app to see what you might be missing. The most common missing elements are the 2 OpenSSL libs (libeay and ssleay). I'd suggest cross referencing to see what you are missing. 

As far as reducing size, I'd suggest first getting everything working, then systematically removing items. What you need totally depends what your app does. For example, I created a simple app that only launches a mapview and was able to get the size down to 162 mb for Windows 64-bit. Using a tool like TreeSize or something similar, you can see what files are taking up the most space. I find that windeployqt ends up copying extra things you might not need. For example, in the simple app example, I found I don't need the translation files, anything related to webview or webengine, xml, qt quick imagine style, and more.

SelimOzel
New Contributor III

I think adding those files worked for me. Thanks for the fast response!

Just out of curiosity. Were they documented anywhere? I am just wondering if there is a deployment guide I missed somewhere.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

We mention the OpenSSL requirement in the setup topic - https://developers.arcgis.com/qt/latest/qml/guide/install-and-set-up-on-windows.htm#ESRI_SECTION1_7E.... This links off to some Qt documentation about it