[Interest] android: package commandline application in APK
Alexander Dyagilev
alervdvcw at gmail.com
Thu Jul 18 01:02:02 CEST 2019
Well, it seems i've found a solution:
1. Deploy via assets:
.pro file:
my_bin.path = /assets
my_bin.files += /path/to/bin
INSTALLS += my_bin
2. At the first run, copy the file and set permissions:
QFile file("assets:/mybin");
auto dstFilePath = "./mybin";
if (file.exists() && !QFile::exists(dstFilePath))
{
file.copy(dstFilePath);
QFile::setPermissions(dstFilePath,
QFile::ExeOwner | QFile::ReadOwner |
QFile::ExeUser | QFile::ReadUser |
QFile::ExeGroup | QFile::ReadGroup |
QFile::ExeOther | QFile::ReadOther);
}
On 7/17/2019 8:56 PM, Alexander Dyagilev wrote:
> Hello,
>
> I want to include some console binary file into my APK and launch it
> when my app runs.
>
> Is it possible?
>
More information about the Interest
mailing list