提出cocosdx3.11两个bug

bug(1)

android 执行 removeDirectory无效,不知道最新版改掉没有。
原文件中没有走到 #if !defined(CC_PLATFORM_IOS) 这里

bool FileUtils::removeDirectory(const std::string& path)
{
    // FIXME: Why using subclassing? an interface probably will be better
    // to support different OS
    // FileUtils::removeDirectory is subclassed on iOS/tvOS
    // and system() is not available on tvOS
#if !defined(CC_PLATFORM_IOS)
    if (path.size() > 0 && path[path.size() - 1] != '/')
    {
        CCLOGERROR("Fail to remove directory, path must terminate with '/': %s", path.c_str());
        return false;
    }

    std::string command = "rm -r ";
    // Path may include space.
    command += "\"" + path + "\"";
    if (system(command.c_str()) >= 0)
        return true;
    else
#endif
        return false;
}

bug(2)

lua 热更新官方Demo中的AssetsManager.cpp中update无效
跟中源文件发现如下

void AssetsManager::update()
{
    // all operation in checkUpdate, nothing need to do
    // keep this function for compatibility
}

这个排版可以的:sweat_smile:

  1. 帮楼主把排版改好了
  2. @minggo 不知道3.13里面这两个BUG还有么?

@wstcok2003
问题1在3.13解决了:https://github.com/cocos2d/cocos2d-x/pull/16062
问题2我测试了报网络错误,我会查一下什么原因。不过也可以用AssetsManagerEx,这个是加强版。

嗯好的~谢谢回复~
加强版是好用的,因为第一次做热更新这块,所以选择了简易版的入手。
简易版用checkUpdate的方法是没问题的,只是官方demo里给出的是update方法。

不过还是希望加强版热更新这块的文档能详细一些。希望官方文档里有热更新这块的教程,
尤其是project.manifest配置文件中的一些参数的用法。比如Demo里面project.manifest
文件中
“remoteManifestUrl” : “http://cocos2d-x.org/assets/cpp-tests-resources/assets_manager/AMTestScene1/project_dev.manifest”,
“remoteVersionUrl” : “http://cocos2d-x.org/assets/cpp-tests-resources/assets_manager/AMTestScene1/version_dev.manifest”,
“version” : “1.0.0”,

remoteManifestUrl与remoteVersionUrl区别,
project_dev.manifest与version_dev.manifest区别。
:)

膜拜一下王大大~:heart_eyes:

这代码是在https://github.com/cocos2d/cocos2d-x/pull/13893 中修改的。我也不知道啥原因,@minggo,有没有想法?

@wstcok2003, 我看逻辑,好像现在是用checkUpdate接口了。

我看最新3.13.1里面已经支持全平台了。

太棒了,我现在项目刚测试出来发现android上无法删除directory的bug, 啥也不说,升级cocos引擎。

放弃升级引擎了,最新的3.13.1,binary方式真机根本编不过。

具体什么错误?