* Extracts a given gothic installer executable * @return success */
| 425 | * @return success |
| 426 | */ |
| 427 | static bool extractInstaller(const std::string& installerFile) |
| 428 | { |
| 429 | |
| 430 | if (!Utils::fileExists(installerFile)) |
| 431 | { |
| 432 | LogError() << "Non-valid gamedata and no installer to extract found!"; |
| 433 | return false; |
| 434 | } |
| 435 | |
| 436 | LogInfo() << "Extracting installer: " << installerFile; |
| 437 | |
| 438 | if (!zTools::extractInstaller(installerFile, CONTENT_BASE_PATH + "/Gothic")) |
| 439 | { |
| 440 | LogError() << "Failed to extract installer: " << installerFile; |
| 441 | return false; |
| 442 | } |
| 443 | |
| 444 | return true; |
| 445 | } |
| 446 | |
| 447 | #endif |