Apps built with ArcGIS Runtime SDK for Qt are self-contained. For example, deploying a Windows app does not add keys to the Windows registry. Deploying apps can be as simple as copying and pasting your app's executable files along with other dependent files to a different machine or device. Likewise, uninstalling can be as simple as deleting the files. The SDK lets you build and deploy self-contained, stand-alone apps or build and deploy capabilities into existing software.
Follow the steps below to ensure you've licensed the capabilities that your app uses and that you understand associated costs.
- License the capabilities you included in the app. License your app describes license levels and costs associated with deployment.
- Attribute Esri in your app. For details, see the attribution section in License your app.
- Prepare your app:
- For Android, compile your app, and then use the androiddeployqt deployment tool provided by the Qt Company to create an .apk. If publishing to the Google Play store, consult the Android documentation for a checklist of items to review before publishing.
- For iOS, build your Qt project, open the output .xcodeproj file in Xcode, and create an .ipa by archiving your app. Note that apps can be distributed either through an in-house enterprise program or by submitting your app to the App Store.
- For macOS, compile your app, and use the Mac deployment tool provided by the Qt Company. This tool bundles the dependencies into an application bundle. Details about using Qt's Mac deployment tool are found later in this topic.
- For Linux, compile your app. Place the executable (.exe) and any associated resources such as packages, data, or client files, inside a folder you intend to use as a deployment folder. You can get details from the article Linux deployment on the Qt Company's website.
- For Windows, build your Qt project. , and use the Windows deployment tool provided by the Qt company. This tool creates a deployable folder containing all the dependencies needed to run the app.
- For Linux and Windows, if you are using Local Server, use the Local Server Deployment Builder tool that was installed on your development machine with Local Server.
- In addition, if you will run local services based on map documents, and those map documents use third-party fonts, then you must make sure that those third-party fonts are installed on each client machine where those services will run. Otherwise, the corresponding local service may fail to start or may fail to render symbols that use those fonts.
- The deployment folder now contains everything you need to deploy your app. To distribute and deploy your app, copy and paste the deployment folder onto each of your end-user's machines or devices. Each deployment folder can be self-contained and consists of the following:
- Your app (client files).
- Supporting library files your app uses.
- Runtime components from step 4 in a folder named arcgisruntime100.4.0.
- Supporting files, such as data for local use.
- Test the app by running it from this location.
For ArcGIS Runtime SDK deployments to Linux, it is particularly important that an app is not tested by running it from the deployment folder, as the SDK creates files that are specific to the current machine and user. To test a Linux deployment, make a copy of the deployment folder, test using one copy, and deploy the other clean copy. Similarly, deployments to Linux should only be run from a USB if they are not intended to be deployed to a different machine.
Using Qt's Mac deployment tool
To deploy an OS X app on the Mac, you must create an OS X app bundle (a bundle) containing the executable and all of its dependencies. The Qt Company made this process easier for Qt developers by providing the Mac Deployment Tool. While assembling the bundle, the tool modifies all of the dependencies in the bundle to reference the libraries inside the bundle rather than the libraries on the machine where your app was originally built.
Before using the Mac Deployment Tool with the ArcGIS Runtime SDK for Qt libraries, you must create various symbolic links. The links tell the Mac Deployment Tool where to find required ArcGIS Runtime dependencies. At minimum, create a symbolic link to libEsriRuntimeQt.dylib in /usr/lib. Usually you need symbolic links to
ln -s $HOME/ArcGIS/<version>/sdk/OSX/x64/lib/libEsriRuntimeQt.dylib /usr/lib/libEsriRuntimeQt.dylib
ln -s $HOME/<QtHome>/clang_64/plugins/platforms/libqcocoa.dylib /usr/plugins/platforms/libqcocoa.dylib
ln -s $HOME/<QtHome>/clang_64/plugins/printsupport/libcocoaprintersupport.dylib /usr/plugins/printsupport/libcocoaprintersupport.dylib
Note:If later you begin using different versions of Qt or the ArcGIS Runtime SDK for Qt, you must recreate these symbolic links.
After you create the symbolic links, run the Mac Deployment
Tool. Specify the path to the OS X app bundle and, using the optional qmldir parameter, specify the path to the
folder containing your app's QML source files. This ensures that
the tool scans the import statements in the QML source files for any additional dependencies.
$HOME/<QtHome>/clang_64/bin/macdeployqt SampleProject.app -qmldir=../../SampleProject/qml