From 579daafda8e0a80337b69f0f08994bac3c3fdfa0 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 7 May 2025 17:55:00 -0400 Subject: [PATCH] Link to steamwrap and libsteam_api.so instead of copying it This way it can be updated when the Astra flatpak updates. --- launcher/src/compatibilitytoolinstaller.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/launcher/src/compatibilitytoolinstaller.cpp b/launcher/src/compatibilitytoolinstaller.cpp index 1ee1379..1adef84 100644 --- a/launcher/src/compatibilitytoolinstaller.cpp +++ b/launcher/src/compatibilitytoolinstaller.cpp @@ -63,8 +63,12 @@ void CompatibilityToolInstaller::installCompatibilityTool() QProcess::execute(QStringLiteral("chmod"), {QStringLiteral("+x"), astraToolDir.absoluteFilePath(QStringLiteral("run.sh"))}); // copy required files - QFile::copy(QStringLiteral("/app/bin/steamwrap"), astraToolDir.absoluteFilePath(QStringLiteral("steamwrap"))); - QFile::copy(QStringLiteral("/app/bin/libsteam_api.so"), astraToolDir.absoluteFilePath(QStringLiteral("libsteam_api.so"))); + const QDir homeDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first(); + const QDir filesDir = homeDir.absoluteFilePath(QStringLiteral(".local/share/flatpak/app/zone.xiv.astra/current/active/files/bin/")); + + // we want to link these so they are updated when our flatpak updates + QFile::link(filesDir.absoluteFilePath(QStringLiteral("steamwrap")), astraToolDir.absoluteFilePath(QStringLiteral("steamwrap"))); + QFile::link(filesDir.absoluteFilePath(QStringLiteral("libsteam_api.so")), astraToolDir.absoluteFilePath(QStringLiteral("libsteam_api.so"))); const QString toolManifestContents = QStringLiteral( "\"manifest\"\n"