In Qt Creator 4.11.0 on Projects page check “Build .aab”:
This will create .aab file.
(more…)I have an Android QT app with more than has 14K active users at the moment of writing this post. The app is relatively stable, its crash rate is 0.34%:
(more…)I keep working on my Lines Game and probably I try to make it the best Lines Game in the world, but there is some disappointing incident that prevents it from being the best and makes it a usual game that glitches a bit. To see the glitch in action download the beta version of the game.
Adding Interstitial Ads to a QT application on Android platform is an interesting and relatively exciting job. I learned the following facts while doing it:
QT does not work with OpenSSL 1.0 anymore. Versions QT 5.12.4 and above require OpenSSL 1.1, but fortunately OpenSSL 1.1 can be easily compiled with MS2017 as follows:
set PATH=%PATH%;C:\Perl64\bin
set PATH=%PATH%;C:\PFiles\nasm-2.14.02-win64
perl Configure VC-WIN64A
nmake
The key to the success is using ‘VS2017 x64 Native Tools Command Prompt‘, but not ‘VS2017 Developer Command Prompt’.
To make QT use OpenSSL, two dlls
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
should be copied to QT binary directory, for example, C:\Qt\Qt5.13.0\5.13.0\msvc2017_64\bin
.NET Framework version 4.5 and higher can be determined with the following C++ code:
#include <windows.h>
bool IsDotNet45Installed()
{
DWORD value{};
DWORD dataSize = sizeof(value);
const LONG retCode = ::RegGetValue(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\",
L"Release",
RRF_RT_REG_DWORD,
nullptr,
&value,
&dataSize
);
if (retCode != ERROR_SUCCESS)
{
return false;
}
return value >= 378389;
}
I tried to build QT 5.11.1 for Android on Windows, and “configure.bat” completed successfully, but “mingw32-make” failed with with the following error:
No rule to make target 'vulkan/qvulkanfunctions_p.h', needed by '.obj\qvulkaninstance.obj'.
It is the bug fixed in QT 5.11.2 that is planned on August/September 2018.
When I build the master branch and copied the following files from it to \qtbase\src\gui\vulkan manually:
qvulkanfunctions.h qvulkanfunctions_p.cpp qvulkanfunctions_p.h
and started “mingw32-make” again I got another error:
I installed Perl, downloaded and extracted OpenSSL 1.1.0h and built 64 bit version in VS2015 x64 Native Tools Command Prompt with the following commands:
set PATH=%PATH%;C:\Perl64\bin perl Configure VC-WIN64A no-asm nmake
32 bit version can be built with VC-WIN32 configuration option as described in INSTALL:
on Windows (only pick one of the targets for configuration): $ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE } $ nmake $ nmake test $ nmake install
probably ‘A’ suffix means AMD and ‘I’ means something else, so we need ‘A’.
The following regular expression (find/replace pair) in Visual Studio format removes extra whitespace and @ symbol from a DEF-file:
^[ \t]+(\b(?<name>_\w+|[\w-[0-9_]]\w*)\b)[ \t]+@(?<index>\d+)(?=\r?$) ${name}\t${index}
and converts it to such a form when it can be imported to MS Excel and sorted by the function number, so you can manually add new functions by incrementing the last number.
To convert the file back the following find/replace pair can be used:
^(\b(?<name>_\w+|[\w-[0-9_]]\w*)\b)[ \t](?<index>\d+)(?=\r?$) \t${name}\t\t@${index}
First I installed Android Studio. When it started I set an option to create the application with Native C++ support and Android NDK was automatically installed to C:\Users\AppData\Local\Android\Sdk\ndk-bundle, also I added Android-19 API level and somehow CMake was installed to C:\Users\AppData\Local\Android\Sdk\cmake\3.6.4111459. Then in QT Creator I opened Tools->Options->Devices->Android and specified the following paths:
I am not sure it is a correct way, but I was able to do this:
git clone --recursive https://code.qt.io/qt/qt5.git --branch v5.10.1
and all the submodules were checked out with commit hashes tag v5.10.1 points to:
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. ... Submodule path 'qt3d': checked out '31f424bb81cd2583920d3d521e1e01f01c2d28e2' ...