From 069ec5a5db02cef944082d9e008174feb51cac3e Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 13 May 2023 17:37:30 -0400 Subject: [PATCH] Use git version of libphysis, update for API changes --- external/CMakeLists.txt | 7 ++++--- launcher/core/src/gameinstaller.cpp | 6 ++++-- launcher/core/src/launchercore.cpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index ea33025..c29f0cb 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -6,7 +6,7 @@ include(FetchContent) FetchContent_Declare( Corrosion GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git - GIT_TAG v0.2.2 + GIT_TAG v0.3.5 ) FetchContent_MakeAvailable(Corrosion) @@ -14,12 +14,13 @@ FetchContent_MakeAvailable(Corrosion) FetchContent_Declare( libphysis GIT_REPOSITORY https://git.sr.ht/~redstrate/libphysis - GIT_TAG 0.1.3 + GIT_TAG main ) FetchContent_MakeAvailable(libphysis) -corrosion_import_crate(MANIFEST_PATH ${libphysis_SOURCE_DIR}/Cargo.toml) +corrosion_import_crate(MANIFEST_PATH ${libphysis_SOURCE_DIR}/Cargo.toml + FEATURES game_install) find_package(PkgConfig REQUIRED) pkg_check_modules(UNSHIELD REQUIRED IMPORTED_TARGET libunshield) diff --git a/launcher/core/src/gameinstaller.cpp b/launcher/core/src/gameinstaller.cpp index 8084593..8ec1df9 100644 --- a/launcher/core/src/gameinstaller.cpp +++ b/launcher/core/src/gameinstaller.cpp @@ -24,8 +24,10 @@ void installGame(LauncherCore& launcher, ProfileSettings& profile, const std::fu file.write(reply->readAll()); file.close(); - physis_install_game( - installDirectory.toStdString().c_str(), (dataDir + "/ffxivsetup.exe").toStdString().c_str()); + const std::string installDirectoryStd = installDirectory.toStdString(); + const std::string fileNameStd = file.fileName().toStdString(); + + physis_install_game(fileNameStd.c_str(), installDirectoryStd.c_str()); qDebug() << "Done installing to " << installDirectory << "!"; diff --git a/launcher/core/src/launchercore.cpp b/launcher/core/src/launchercore.cpp index ff37152..86de0a4 100755 --- a/launcher/core/src/launchercore.cpp +++ b/launcher/core/src/launchercore.cpp @@ -650,7 +650,7 @@ void LauncherCore::addRegistryKey(const ProfileSettings& settings, QString key, } void LauncherCore::readGameData(ProfileSettings& profile) { - EXH* exh = physis_gamedata_read_excel_sheet_header(profile.gameData, "ExVersion"); + physis_EXH* exh = physis_gamedata_read_excel_sheet_header(profile.gameData, "ExVersion"); if (exh != nullptr) { physis_EXD exd = physis_gamedata_read_excel_sheet(profile.gameData, "ExVersion", exh, Language::English, 0);