mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Point Dalamud to our data directory
This changes the location for assets, config, and plugins.
This commit is contained in:
parent
511763e33f
commit
31c3499bcb
1 changed files with 16 additions and 3 deletions
|
@ -156,7 +156,7 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
|
||||||
gameProcess->setProcessChannelMode(QProcess::MergedChannels);
|
gameProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||||
|
|
||||||
if(profile.enableDalamud) {
|
if(profile.enableDalamud) {
|
||||||
connect(gameProcess, &QProcess::readyReadStandardOutput, [this, gameProcess, profile] {
|
connect(gameProcess, &QProcess::readyReadStandardOutput, [this, gameProcess, profile, dataDir] {
|
||||||
QString output = gameProcess->readAllStandardOutput();
|
QString output = gameProcess->readAllStandardOutput();
|
||||||
bool success;
|
bool success;
|
||||||
int dec = output.toInt(&success, 10);
|
int dec = output.toInt(&success, 10);
|
||||||
|
@ -167,8 +167,21 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
|
||||||
|
|
||||||
qDebug() << "Now launching dalamud...";
|
qDebug() << "Now launching dalamud...";
|
||||||
|
|
||||||
|
QJsonObject startInfo;
|
||||||
|
startInfo["WorkingDirectory"] = QJsonValue();
|
||||||
|
startInfo["ConfigurationPath"] = dataDir + "/dalamudConfig.json";
|
||||||
|
startInfo["PluginDirectory"] = dataDir + "/installedPlugins";
|
||||||
|
startInfo["AssetDirectory"] = dataDir + "/DalamudAssets";
|
||||||
|
startInfo["DefaultPluginDirectory"] = dataDir + "/devPlugins";
|
||||||
|
startInfo["DelayInitializeMs"] = 5;
|
||||||
|
startInfo["GameVersion"] = profile.gameVersion;
|
||||||
|
startInfo["Language"] = profile.language;
|
||||||
|
startInfo["OptOutMbCollection"] = false;
|
||||||
|
|
||||||
|
QString argsEncoded = QJsonDocument(startInfo).toJson().toBase64();
|
||||||
|
|
||||||
auto dalamudProcess = new QProcess();
|
auto dalamudProcess = new QProcess();
|
||||||
dalamudProcess->setProcessChannelMode(QProcess::MergedChannels);
|
dalamudProcess->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||||
|
|
||||||
QStringList dalamudEnv = gameProcess->environment();
|
QStringList dalamudEnv = gameProcess->environment();
|
||||||
|
|
||||||
|
@ -180,7 +193,7 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
|
||||||
|
|
||||||
QString dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
QString dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||||
|
|
||||||
dalamudProcess->start(profile.winePath, {dataDir + "/Dalamud/" + "Dalamud.Injector.exe", output});
|
dalamudProcess->start(profile.winePath, {dataDir + "/Dalamud/" + "Dalamud.Injector.exe", output, argsEncoded});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue