diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 955c4c9..193f9a3 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -9,7 +9,6 @@ add_executable(astra target_link_libraries(astra PUBLIC ${LIBRARIES} - libxiv astra_core astra_desktop astra_cli diff --git a/launcher/core/CMakeLists.txt b/launcher/core/CMakeLists.txt index d7fd47e..4133e59 100644 --- a/launcher/core/CMakeLists.txt +++ b/launcher/core/CMakeLists.txt @@ -38,8 +38,8 @@ target_include_directories(astra_core PUBLIC ${CMAKE_BINARY_DIR} include) target_link_libraries(astra_core PUBLIC - libxiv physis + z # FIXME: remove! ${LIBRARIES} Qt5::Core Qt5::Network diff --git a/launcher/core/src/gameinstaller.cpp b/launcher/core/src/gameinstaller.cpp index 9a8a199..80ea66a 100644 --- a/launcher/core/src/gameinstaller.cpp +++ b/launcher/core/src/gameinstaller.cpp @@ -1,9 +1,9 @@ #include "gameinstaller.h" -#include #include #include #include +#include #include "launchercore.h" @@ -25,7 +25,7 @@ void installGame(LauncherCore& launcher, ProfileSettings& profile, std::function file.write(reply->readAll()); file.close(); - extractBootstrapFiles((dataDir + "/ffxivsetup.exe").toStdString(), installDirectory.toStdString()); + physis_install_game(installDirectory.toStdString().c_str(), (dataDir + "/ffxivsetup.exe").toStdString().c_str()); qDebug() << "Done installing to " << installDirectory << "!"; diff --git a/launcher/core/src/launchercore.cpp b/launcher/core/src/launchercore.cpp index c23f37f..6446681 100755 --- a/launcher/core/src/launchercore.cpp +++ b/launcher/core/src/launchercore.cpp @@ -27,8 +27,6 @@ #include "settingswindow.h" #include "assetupdater.h" #include "encryptedarg.h" -#include "gamedata.h" -#include "exdparser.h" #ifdef ENABLE_WATCHDOG #include "watchdog.h" @@ -712,14 +710,17 @@ void LauncherCore::addRegistryKey(const ProfileSettings& settings, } void LauncherCore::readGameData(ProfileSettings& profile) { - GameData data(profile.gamePath.toStdString() + "/game/sqpack"); + auto path = profile.gamePath.toStdString() + "/game"; + GameData* game_data = physis_gamedata_initialize(path.c_str()); - if(auto exh = data.readExcelSheet("ExVersion")) { - auto path = getEXDFilename(*exh, "exversion", "en", exh->pages[0]); - auto exd = readEXD(*exh, *data.extractFile("exd/" + path), exh->pages[0]); + EXH* exh = physis_gamedata_read_excel_sheet_header(game_data, "ExVersion"); + if(exh != nullptr) { + physis_EXD exd = physis_gamedata_read_excel_sheet(game_data, "ExVersion", exh, Language::English, 0); - for(auto row : exd.rows) { - expansionNames.push_back(row.data[0].data.c_str()); + for(int i = 0; i < exd.row_count; i++) { + expansionNames.push_back(exd.row_data[i].column_data[0].string._0); } } + + physis_gamedata_free(game_data); } diff --git a/launcher/main.cpp b/launcher/main.cpp index 48b947c..153e96c 100755 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -5,14 +5,15 @@ #include #include #include +#include -#include "sapphirelauncher.h" -#include "squareboot.h" -#include "gameinstaller.h" +#include "../launcher/tablet/include/tabletinterface.h" +#include "cmdinterface.h" #include "config.h" #include "desktopinterface.h" -#include "cmdinterface.h" -#include "../launcher/tablet/include/tabletinterface.h" +#include "gameinstaller.h" +#include "sapphirelauncher.h" +#include "squareboot.h" int main(int argc, char* argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);