mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
48 lines
1.3 KiB
Bash
Executable File
48 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# android-mktemplate generates a template json file suitable for use with the
|
|
# androiddeployqt tool.
|
|
|
|
set -eu
|
|
|
|
# QT_PATH is already pre-set in our docker container environment. Includes trailing slash.
|
|
QT_PATH=${QT_PATH:-/usr/local/Qt-5.15.13/}
|
|
|
|
main() {
|
|
|
|
if [[ $# -ne 2 ]] ; then
|
|
echo "Usage: android-mktemplate.sh appname output.json" >&2
|
|
exit 1
|
|
fi
|
|
local ARG_APPNAME="$1"
|
|
local ARG_DESTFILE="$2"
|
|
|
|
# Available fields are documented in the template file at
|
|
# @ref /usr/local/Qt-5.15.13/mkspecs/features/android/android_deployment_settings.prf
|
|
cat > "${ARG_DESTFILE}" <<EOF
|
|
{
|
|
"_description": "Generated by miqt/android-mktemplate",
|
|
"application-binary": "${ARG_APPNAME}",
|
|
"architectures": {
|
|
"arm64-v8a" : "aarch64-linux-android"
|
|
},
|
|
|
|
"android-extra-libs": "/opt/android_openssl/ssl_1.1/arm64-v8a/libssl_1_1.so,/opt/android_openssl/ssl_1.1/arm64-v8a/libcrypto_1_1.so",
|
|
|
|
"android-min-sdk-version": "23",
|
|
"android-target-sdk-version": "30",
|
|
"ndk": "/opt/android-sdk/ndk/22.1.7171670",
|
|
"ndk-host": "linux-x86_64",
|
|
"qt": "${QT_PATH}",
|
|
"sdk": "/opt/android-sdk",
|
|
"sdkBuildToolsRevision": "30.0.2",
|
|
"stdcpp-path": "/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/",
|
|
"tool-prefix": "llvm",
|
|
"toolchain-prefix": "llvm",
|
|
"useLLVM": true
|
|
}
|
|
EOF
|
|
}
|
|
|
|
main "$@"
|