| 168 | } |
| 169 | |
| 170 | static int RunLoaderExport(Configurator& configurator, const CommandLine& command_line) { |
| 171 | std::string configuration_name; |
| 172 | int result = ::GetConfigurationName(configurator, command_line, false, configuration_name); |
| 173 | if (result != 0) { |
| 174 | return -1; |
| 175 | } |
| 176 | |
| 177 | const bool exported = |
| 178 | configurator.configurations.ExportConfiguration(configurator.layers, command_line.GetOutputPath(), configuration_name); |
| 179 | if (exported) { |
| 180 | fprintf(stdout, "vkconfig: `%s` layers configuration exported to:\n `%s`\n\n", configuration_name.c_str(), |
| 181 | command_line.GetOutputPath().AbsolutePath().c_str()); |
| 182 | } else { |
| 183 | fprintf(stderr, "vkconfig: Failed to export `%s` layers configuration...\n", |
| 184 | command_line.GetOutputPath().AbsolutePath().c_str()); |
| 185 | return -1; |
| 186 | } |
| 187 | |
| 188 | return ::RunLoaderList(configurator, command_line); |
| 189 | } |
| 190 | |
| 191 | static int RunLoaderDelete(Configurator& configurator, const CommandLine& command_line) { |
| 192 | std::string configuration_name; |
no test coverage detected