自己修改底层源码解决了
unzFile zipfile = unzOpen(FileUtils::getInstance()->getSuitableFOpen(outFileName).c_str());
改为:
ssize_t size = 0;
unsigned char *zipFileData = FileUtils::getInstance()->getFileData(outFileName, “rb”, &size);
unzFile zipfile = unzOpenBuffer(zipFileData, size);
实现
标记一下 正准备要用了
升级第三方库之后,重新生成项目打包 ,这个错怎么改啊
\frameworks\cocos2d-x\external\unzip\ioapi.cpp:115:16: error: use of undeclared identifier ‘fopen64’; did you mean ‘fopen’?
file = fopen64((const char*)filename, mode_fopen);
^~~~~~~
fopen
D:/SDK/ndk-bundle/sysroot/usr/include\stdio.h:232
note: ‘fopen’ declared here
FILE* fopen(const char* __path, const char* __mode);
^
\frameworks\cocos2d-x\external\unzip\ioapi.cpp:147
error: use of undeclared identifier ‘ftello64’
ret = ftello64((FILE *)stream);
^
\frameworks\cocos2d-x\external\unzip\ioapi.cpp:190
error: use of undeclared identifier ‘fseeko64’; did you mean ‘lseek64’?
if(fseeko64((FILE *)stream, offset, fseek_origin) != 0)
^~~~~~~~
lseek64
D:/SDK/ndk-bundle/sysroot/usr/include\unistd.h:234
note: ‘lseek64’ declared here
off64_t lseek64(int _fd, off64t __offset, int __whence);
^
\frameworks\cocos2d-x\external\unzip\ioapi.cpp:190:17: error: cannot initialize a parameter of type ‘int’ with an rvalue of type ‘FILE *’ (aka ‘__sFILE *’)
if(fseeko64((FILE *)stream, offset, fseek_origin) != 0)
^~~~~~~~~~~~~~
D:/SDK/ndk-bundle/sysroot/usr/include\unistd.h:234:21: note: passing argument to parameter ‘__fd’ here
off64_t lseek64(int _fd, off64t __offset, int __whence);
从这个位置下载 zip,现在是 v3-deps-156
https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/releases
@397136899 后面又补充了提交
这个是3.17.1 以后的更新吗? 是否后面还会出个3.17.2 补丁
3.17.1 的修复版本未来会有的,但是目前并没有确定发布计划。近期有计划的是 cocos2d-x(多渲染后端)的 alpha 版本,预计很快。
上面的是 3.17.1 后的 bug 修复,代码还没合并。如果 3.17.1 版本有重要的 bug,短期可行的做法,就是开发者手动合并。
对比文件,发现 Cocos2dxEngineDataManager在3.17.1之后删除了,是对华为机器性能优化无效吗?