如何使用Qt添加android扩展文件 [英] How to add android expansion files using Qt

查看:32
本文介绍了如何使用Qt添加android扩展文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Qt/QML 开发一个 Android 应用程序,由于要捆绑的媒体文件,我的应用程序将远远大于 50 MB Google Play 商店的限制,因此我必须使用扩展文件.经过一番搜索,我在 页面 上发现了一行说 Qt 资源系统可以帮助制作.obb扩展文件:

I am currently developing an Android app using Qt / QML and my app will be a lot larger than the 50 MB Google Play Store limit due to media files that are to be bundled, so I have to use extension files. After some searching I found on a page a line saying that Qt resource system can help make .obb extension files:

对于不符合Google Play商店50MB限制的大资源,qrc可以生成可以放入obb的rcc文件"

"For large resources that do not fit into the Google Play store 50 MB limit, qrc can generate rcc files that can be put in obb"

但我找不到有关如何执行此操作或如何从我的代码访问这些文件的任何信息.

but I can not find any information on how to do this or how to access those files from my code.

我使用 Qt 制作了一个 .rcc 文件.现在正在尝试将其转换为 .obb.有人用 jobb 工具做过这个吗?

I have made an .rcc file using Qt. Trying to convert it to .obb now. Anyone done this using the jobb tool?

我还想我可以直接上传 .rcc 文件,因为 Google Play 接受任何文件格式的扩展文件,但是我无法对其进行加密.. 但是我如何访问 .rcc 文件?我是否必须编写一些 Java 代码,或者我可以让它在 Qt C++/QML 中工作?

I was also thinking that I could just upload the .rcc file directly as Google Play accepts any file format for expansion files, but then I would not be able to get it encrypted.. but how could I access the .rcc file? Do I have to write some Java code or could I get it to work from Qt C++/QML?

我想到了.我使用 Qt 命令提示符中可用的 rcc 工具创建了一个外部二进制资源文件.使用 QResource 类,我可以加载外部二进制资源文件并像普通的 qrc 资源文件一样访问它.

I figured it out. I created an external binary resource file using the rcc tool available in Qt command prompt. Using QResource class I can load the external binary resource file and access it as it was a normal qrc resource file.

推荐答案

我遇到了类似的扩展文件问题并解决了.虽然我没有涉及任何加密问题.

I was facing a similar issue with expansion files and solved it. Although I did not cover any encryption issues.

请参考以下答案:https://stackoverflow.com/a/31911151/3155461

这篇关于如何使用Qt添加android扩展文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆