示例#1
0
文件: export.cpp 项目: ex/godot
bool EditorExportPlatformJavaScript::can_export(String *r_error) const {


	bool valid=true;
	String err;

	if (!exists_export_template("javascript_debug.zip") || !exists_export_template("javascript_release.zip")) {
		valid=false;
		err+="No export templates found.\nDownload and install export templates.\n";
	}

	if (custom_debug_package!="" && !FileAccess::exists(custom_debug_package)) {
		valid=false;
		err+="Custom debug package not found.\n";
	}

	if (custom_release_package!="" && !FileAccess::exists(custom_release_package)) {
		valid=false;
		err+="Custom release package not found.\n";
	}

	if (r_error)
		*r_error=err;

	return valid;
}
示例#2
0
bool EditorExportPlatformBB10::can_export(String *r_error) const {

	bool valid=true;
	String bb_deploy=EditorSettings::get_singleton()->get("blackberry/host_tools");
	String err;

	if (!FileAccess::exists(bb_deploy.plus_file("blackberry-deploy"))) {

		valid=false;
		err+="Blackberry host tools not configured in editor settings.\n";
	}

	if (!exists_export_template("bb10.zip")) {
		valid=false;
		err+="No export template found.\nDownload and install export templates.\n";
	}

	String debug_token=EditorSettings::get_singleton()->get("blackberry/debug_token");

	if (!FileAccess::exists(debug_token)) {
		valid=false;
		err+="No debug token set, will not be able to test on device.\n";
	}


	if (custom_package!="" && !FileAccess::exists(custom_package)) {
		valid=false;
		err+="Custom release package not found.\n";
	}

	if (r_error)
		*r_error=err;

	return valid;
}
示例#3
0
文件: export.cpp 项目: nakoff/godot
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {

	bool valid = true;
	String err;

	if (!exists_export_template("osx.zip", &err)) {
		valid = false;
	}

	if (p_preset->get("custom_package/debug") != "" && !FileAccess::exists(p_preset->get("custom_package/debug"))) {
		valid = false;
		err += "Custom debug package not found.\n";
	}

	if (p_preset->get("custom_package/release") != "" && !FileAccess::exists(p_preset->get("custom_package/release"))) {
		valid = false;
		err += "Custom release package not found.\n";
	}

	if (!err.empty())
		r_error = err;

	return valid;
}