Esempio n. 1
0
void Dirs::extractDataDir()
{
#if defined(ANDROID) && defined(USE_SDL2)
    Files::setCopyCallBack(&updateProgress);
    resetProgress();
    extractAssets();

    const std::string zipName = std::string(getenv(
        "APPDIR")).append(
        "/data.zip");
    const std::string dirName = std::string(getenv(
        "APPDIR")).append(
        "/data");
    Files::extractZip(zipName, "data", dirName);
    Files::extractLocale();
#endif  // defined(ANDROID) && defined(USE_SDL2)
}
Esempio n. 2
0
void Dirs::extractDataDir()
{
#ifdef ANDROID
#ifdef USE_SDL2
    Files::setCopyCallBack(&updateProgress);
    resetProgress();
    extractAssets();

    const std::string zipName = std::string(getenv(
        "APPDIR")).append("/data.zip");
    const std::string dirName = std::string(getenv(
        "APPDIR")).append("/data");
    Files::extractZip(zipName, "data", dirName);
    Files::extractLocale();
#endif
#endif

#if defined __native_client__
    const std::string dirName = _nacl_dir.append("/data");
    Files::extractZip("/http/data.zip", "data", dirName);
#endif
}