diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 6b2d568..7c48c86 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1 +1,23 @@ add_subdirectory(libxiv) + +include(FetchContent) + +FetchContent_Declare( + Corrosion + GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git + GIT_TAG v0.2.1 +) + +FetchContent_MakeAvailable(Corrosion) + +FetchContent_Declare( + libphysis + GIT_REPOSITORY https://git.sr.ht/~redstrate/libphysis + GIT_TAG main +) + +FetchContent_MakeAvailable(libphysis) + +corrosion_import_crate(MANIFEST_PATH ${libphysis_SOURCE_DIR}/Cargo.toml) + +target_include_directories(physis INTERFACE ${libphysis_SOURCE_DIR}/target/public) \ No newline at end of file diff --git a/launcher/core/CMakeLists.txt b/launcher/core/CMakeLists.txt index 91ad0f2..e67a8ae 100644 --- a/launcher/core/CMakeLists.txt +++ b/launcher/core/CMakeLists.txt @@ -39,6 +39,7 @@ target_include_directories(astra_core PUBLIC include) target_link_libraries(astra_core PUBLIC libxiv + physis ${LIBRARIES} Qt5::Core Qt5::Network diff --git a/launcher/core/src/launchercore.cpp b/launcher/core/src/launchercore.cpp index 5aa2b47..5eecafe 100755 --- a/launcher/core/src/launchercore.cpp +++ b/launcher/core/src/launchercore.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "launchercore.h" #include "sapphirelauncher.h" @@ -500,7 +501,7 @@ void LauncherCore::readGameVersion() { profile->bootVersion = readVersion(profile->gamePath + "/boot/ffxivboot.ver"); auto sqpackDirectories = QDir(profile->gamePath + "/game/sqpack/").entryList(QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot); - profile->gameVersions.resize(sqpackDirectories.size()); + profile->gameVersions.resize(sqpackDirectories.size() + 1); for(auto dir : sqpackDirectories) { if(dir.contains("ex") || dir == "ffxiv") {