diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dae556..9af0253 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ ob_standard_project_setup() # Additional Project Variables set(PROJECT_FORMAL_NAME "CLI Flashpoint") -set(TARGET_FP_VERSION_PREFIX 12.0) +set(TARGET_FP_VERSION_PREFIX 12.1) # Configuration options # Handled by fetched libs, but set this here formally since they aren't part of the main project @@ -79,7 +79,7 @@ ob_fetch_qx( # Fetch libfp (build and import from source) include(OB/Fetchlibfp) -ob_fetch_libfp("v0.5") +ob_fetch_libfp("v0.5.1") # Fetch QI-QMP (build and import from source) include(OB/FetchQI-QMP) diff --git a/app/src/kernel/driver.h b/app/src/kernel/driver.h index bfbff3a..f57a8e3 100644 --- a/app/src/kernel/driver.h +++ b/app/src/kernel/driver.h @@ -66,7 +66,7 @@ class Driver : public QObject // Error Messages static inline const QString ERR_LAUNCHER_RUNNING_TIP = u"Please close the Launcher first."_s; - static inline const QString ERR_INSTALL_INVALID_TIP = u"Check its location and compatibility with your Flashpoint version."_s; + static inline const QString ERR_INSTALL_INVALID_TIP = u"You may need to update CLIFp."_s; // Logging static inline const QString LOG_EVENT_FLASHPOINT_SEARCH = u"Searching for Flashpoint root..."_s; diff --git a/app/src/task/t-mount.cpp b/app/src/task/t-mount.cpp index 6de84cb..934f471 100644 --- a/app/src/task/t-mount.cpp +++ b/app/src/task/t-mount.cpp @@ -75,7 +75,7 @@ void TMount::perform() //-Setup Mounter(s)------------------------------------ - if(mDaemon == Fp::Daemon::FpProxy) + if(mDaemon == Fp::Daemon::FpProxy || mDaemon == Fp::Daemon::FpGameServer) { initMounter(mMounterProxy); mMounterProxy->setFilePath(mPath); @@ -122,6 +122,7 @@ void TMount::perform() switch(mDaemon) { case Fp::Daemon::FpProxy: + case Fp::Daemon::FpGameServer: mMounterProxy->mount(); break; diff --git a/app/src/tools/mounter_proxy.cpp b/app/src/tools/mounter_proxy.cpp index 3c63caa..1eff247 100644 --- a/app/src/tools/mounter_proxy.cpp +++ b/app/src/tools/mounter_proxy.cpp @@ -4,6 +4,9 @@ // Qt Includes #include #include +#include +#include +#include // Qx Includes #include @@ -96,7 +99,7 @@ quint16 MounterProxy::proxyServerPort() const { return mProxyServerPort; } QString MounterProxy::filePath() const { return mFilePath; } void MounterProxy::setProxyServerPort(quint16 port) { mProxyServerPort = port; } -void MounterProxy::setFilePath(const QString& path) { mFilePath = path; } +void MounterProxy::setFilePath(const QString& path) { mFilePath = QDir::toNativeSeparators(path); } //-Signals & Slots------------------------------------------------------------------------------------------------------------ //Private Slots: @@ -139,9 +142,15 @@ void MounterProxy::mount() // Header mountReq.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - - // Data (could use QJsonDocument but for such a simple object that's overkill - QByteArray data = "{\"filePath\":\""_ba + mFilePath.toLatin1() + "\"}"_ba; + // These headers are used by the stock launcher, but don't seem to be needed + // + // mountReq.setRawHeader("Connection"_ba, "close"_ba); + // mountReq.setRawHeader("Accept"_ba, "application/json, text/plain, */*"_ba); + // mountReq.setRawHeader("Accept-Encoding"_ba, "gzip, compress, deflate, br"_ba); + + // Data + QJsonDocument jdData(QJsonObject{{u"filePath"_s, mFilePath}}); + QByteArray data = jdData.toJson(QJsonDocument::Compact); //-POST Request--------------------------------- mProxyMountReply = mNam.post(mountReq, data);