diff options
Diffstat (limited to 'editor/export_template_manager.cpp')
-rw-r--r-- | editor/export_template_manager.cpp | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 5ff9b795d7..147d5f90c6 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -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() { |