diff options
| author | Rémi Verschelde | 2017-08-27 21:07:15 +0200 |
|---|---|---|
| committer | Rémi Verschelde | 2017-08-27 22:13:45 +0200 |
| commit | 7ad14e7a3e6f87ddc450f7e34621eb5200808451 (patch) | |
| tree | 8804d0dd24cc126087462edfbbbf73ed61b56b0e /editor/export_template_manager.cpp | |
| parent | 37da8155a4500a9386027b4d791a86186bc7ab4a (diff) | |
| download | godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.gz godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.zst godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.zip | |
Diffstat (limited to 'editor/export_template_manager.cpp')
| -rw-r--r-- | editor/export_template_manager.cpp | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 8883fe517..147d5f90c 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -313,77 +313,6 @@ void ExportTemplateManager::_bind_methods() { ClassDB::bind_method("_uninstall_template", &ExportTemplateManager::_uninstall_template); ClassDB::bind_method("_uninstall_template_confirm", &ExportTemplateManager::_uninstall_template_confirm); ClassDB::bind_method("_install_from_file", &ExportTemplateManager::_install_from_file); - -#if 0 - FileAccess *fa = NULL; - zlib_filefunc_def io = zipio_create_io_from_file(&fa); - - unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io); - if (!pkg) { - - current_option = -1; - //confirmation->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Can't open export templates zip.")); - accept->popup_centered_minsize(); - return; - } - int ret = unzGoToFirstFile(pkg); - - int fc = 0; //count them - - while (ret == UNZ_OK) { - fc++; - ret = unzGoToNextFile(pkg); - } - - ret = unzGoToFirstFile(pkg); - - EditorProgress p("ltask", TTR("Loading Export Templates"), fc); - - fc = 0; - - while (ret == UNZ_OK) { - - //get filename - unz_file_info info; - char fname[16384]; - ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0); - - String file = fname; - - Vector<uint8_t> data; - data.resize(info.uncompressed_size); - - //read - ret = unzOpenCurrentFile(pkg); - ret = unzReadCurrentFile(pkg, data.ptr(), data.size()); - unzCloseCurrentFile(pkg); - - print_line(fname); - /* - for(int i=0;i<512;i++) { - print_line(itos(data[i])); - } - */ - - file = file.get_file(); - - p.step(TTR("Importing:") + " " + file, fc); - - FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path() + "/templates/" + file, FileAccess::WRITE); - - ERR_CONTINUE(!f); - f->store_buffer(data.ptr(), data.size()); - - memdelete(f); - - ret = unzGoToNextFile(pkg); - fc++; - } - - unzClose(pkg); -#endif } ExportTemplateManager::ExportTemplateManager() { |
