Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于Linux下资源加载问题? #854

Open
ytchw101 opened this issue Sep 8, 2023 · 2 comments
Open

关于Linux下资源加载问题? #854

ytchw101 opened this issue Sep 8, 2023 · 2 comments

Comments

@ytchw101
Copy link

ytchw101 commented Sep 8, 2023

awtk-linux-fb程序 ,资源放在默认的/release/assets/default/raw 下运行一切正常。但我想和之前做的嵌入式平台一样 部分资源编译到应用中 (即应用直接从rom中加载)
我是修改xxx_assets_defaut.inc文件
#include "default/inc/images/xxx.res"
...
assets_manager_add
...
这样资源编译到应用中后,运行提示 assets_manager_add: Assertion '! "mmap model not supportedc assets this is in rom
问:是Linux不能把资源文件编译到应用中使用吗》?还是 需要哪些地方要修改 比如打开什么宏定义等? 该怎么做。。?

@RainMic1019
Copy link

需要在 awtk-linux-fb/awtk_config.py 中取消宏定义 LOAD_ASSET_WITH_MMAP

@ytchw101
Copy link
Author

哦 好的 ,刚试了下 是可以! 但还有个问题 就是如果部分资源 想用mmap加载 可以的吗? 比如 我用到的字体资源 有的10几M - 几十M , 不用mmap加载的话 第一次会 卡1 - 3..秒(应该是加载慢) 后面再使用此字体 好像不会卡 谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants