2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Generates an xml file to match the library in lib/ listing the dependencies
|
|
|
|
# of the module on JNI-based libraries etc. Used for deployment of an Android
|
|
|
|
# app.
|
|
|
|
|
2013-06-08 09:50:45 +00:00
|
|
|
ANDROID_DEPENDS_DIR = $$MODULE_BASE_OUTDIR/lib/
|
2013-03-04 09:16:42 +00:00
|
|
|
DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
|
|
|
|
|
|
|
|
!build_pass {
|
2013-04-26 14:23:16 +00:00
|
|
|
!isEmpty(MODULE_PLUGIN_TYPES) {
|
|
|
|
for(PLUGIN_TYPE, MODULE_PLUGIN_TYPES) {
|
|
|
|
ANDROID_BUNDLED_FILES += "plugins/$$PLUGIN_TYPE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-04 09:16:42 +00:00
|
|
|
!isEmpty(ANDROID_JAR_DEPENDENCIES) {
|
|
|
|
for(JAR_FILE, ANDROID_JAR_DEPENDENCIES) {
|
|
|
|
INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
|
|
|
|
!isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
|
|
|
|
JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
|
|
|
|
FILE_CONTENT += "<jar file=\"$$JAR_FILE\" $$INIT_CLASS />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-26 14:23:16 +00:00
|
|
|
!isEmpty(ANDROID_BUNDLED_JAR_DEPENDENCIES) {
|
|
|
|
for(JAR_FILE, ANDROID_BUNDLED_JAR_DEPENDENCIES) {
|
|
|
|
INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
|
|
|
|
!isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
|
|
|
|
JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
|
|
|
|
FILE_CONTENT += "<jar bundling=\"1\" file=\"$$JAR_FILE\" $$INIT_CLASS />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-04 09:16:42 +00:00
|
|
|
!isEmpty(ANDROID_LIB_DEPENDENCIES) {
|
|
|
|
for(LIB_FILE, ANDROID_LIB_DEPENDENCIES) {
|
2013-05-08 16:19:12 +00:00
|
|
|
EXTENDS = $$section(LIB_FILE, ":", 1, 1)
|
|
|
|
!isEmpty(EXTENDS): EXTENDS = "extends=\"$$EXTENDS\""
|
|
|
|
LIB_FILE = $$section(LIB_FILE, ":", 0, 0)
|
|
|
|
FILE_CONTENT += "<lib file=\"$$LIB_FILE\" $$EXTENDS />"
|
2013-03-04 09:16:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
|
|
|
|
for(REPLACEMENT, ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
|
|
|
|
REPLACEMENT_FILE = $$section(REPLACEMENT, ":", 0, 0)
|
|
|
|
LIB_FILE = $$section(REPLACEMENT, ":", 1, 1)
|
|
|
|
FILE_CONTENT += "<lib file=\"$$LIB_FILE\" replaces=\"$$REPLACEMENT_FILE\" />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-26 14:23:16 +00:00
|
|
|
!isEmpty(ANDROID_BUNDLED_FILES) {
|
|
|
|
for (BUNDLED_FILE, ANDROID_BUNDLED_FILES) {
|
|
|
|
FILE_CONTENT += "<bundled file=\"$$BUNDLED_FILE\" />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-07 12:36:31 +00:00
|
|
|
!isEmpty(ANDROID_PERMISSIONS) {
|
|
|
|
for (ANDROID_PERMISSION, ANDROID_PERMISSIONS) {
|
|
|
|
FILE_CONTENT += "<permission name=\"$$ANDROID_PERMISSION\" />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(ANDROID_FEATURES) {
|
|
|
|
for (ANDROID_FEATURE, ANDROID_FEATURES) {
|
|
|
|
FILE_CONTENT += "<feature name=\"$$ANDROID_FEATURE\" />"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-04 09:16:42 +00:00
|
|
|
!isEmpty(FILE_CONTENT) {
|
|
|
|
FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$DEPENDENCY_FILE, FILE_CONTENT)|error()
|
2013-03-04 09:16:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-26 14:23:16 +00:00
|
|
|
!isEmpty(ANDROID_JAR_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS)|!isEmpty(ANDROID_BUNDLED_JAR_DEPENDENCIES)|!isEmpty(ANDROID_BUNDLED_FILES) {
|
2013-03-04 09:16:42 +00:00
|
|
|
install_dependencies_file.files = $$DEPENDENCY_FILE
|
|
|
|
install_dependencies_file.path = $$[QT_INSTALL_LIBS]
|
|
|
|
INSTALLS += install_dependencies_file
|
|
|
|
}
|