()
| 323 | } |
| 324 | |
| 325 | private static boolean startupWithoutGUI() |
| 326 | { |
| 327 | loadProperties(false); |
| 328 | validateEnvironment(false); |
| 329 | |
| 330 | PCGenTaskExecutor executor = new PCGenTaskExecutor(); |
| 331 | executor.addPCGenTask(createLoadPluginTask()); |
| 332 | executor.addPCGenTask(new GameModeFileLoader()); |
| 333 | executor.addPCGenTask(new CampaignFileLoader()); |
| 334 | executor.run(); |
| 335 | |
| 336 | UIDelegate uiDelegate = new ConsoleUIDelegate(); |
| 337 | |
| 338 | BatchExporter exporter = new BatchExporter(commandLineArguments.getExportSheet().map(File::getPath).orElse(null), uiDelegate); |
| 339 | |
| 340 | boolean result = true; |
| 341 | if (commandLineArguments.getPartyFile().isPresent()) |
| 342 | { |
| 343 | result = exporter.exportParty(commandLineArguments.getPartyFile().map(File::getPath).orElseThrow(), |
| 344 | commandLineArguments.getOutputFile().map(File::getPath).orElse(null)); |
| 345 | } |
| 346 | |
| 347 | if (commandLineArguments.getCharacterFile().isPresent()) |
| 348 | { |
| 349 | result = exporter.exportCharacter(commandLineArguments.getCharacterFile().map(File::getPath).orElseThrow(), |
| 350 | commandLineArguments.getOutputFile().map(File::getPath).orElse(null)); |
| 351 | } |
| 352 | |
| 353 | return result; |
| 354 | } |
| 355 | |
| 356 | public static void shutdown(boolean success) |
| 357 | { |
no test coverage detected