mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
When running in a Flatpak, spawn Wine using flatpak-spawn --host
This allows you to use system Wine without any troubles!
This commit is contained in:
parent
39d9ca5fa6
commit
79466c02cf
3 changed files with 14 additions and 5 deletions
|
@ -7,6 +7,7 @@ find_package(Qt5 COMPONENTS Core Widgets Network CONFIG REQUIRED)
|
|||
|
||||
option(ENABLE_WATCHDOG "Build with Tesseract support (needed for Watchdog)" OFF)
|
||||
option(USE_OWN_LIBRARIES "Build with own libraries" OFF)
|
||||
option(BUILD_FLATPAK "Build with Flatpak support in mind" OFF)
|
||||
|
||||
if(ENABLE_WATCHDOG)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
@ -171,6 +172,10 @@ if(ENABLE_WATCHDOG)
|
|||
target_compile_definitions(astra PRIVATE ENABLE_WATCHDOG)
|
||||
endif()
|
||||
|
||||
if(BUILD_FLATPAK)
|
||||
target_compile_definitions(astra PRIVATE FLATPAK)
|
||||
endif()
|
||||
|
||||
install(TARGETS astra
|
||||
DESTINATION "${INSTALL_BIN_PATH}")
|
||||
|
||||
|
|
2
external/libxiv
vendored
2
external/libxiv
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 79c482ac97f212cd968ea8717645a05b5bd40fac
|
||||
Subproject commit 8b3aed1f29d210a029cd62a6e59bf43db5ce516c
|
|
@ -220,8 +220,6 @@ void LauncherCore::launchExecutable(const ProfileSettings& profile, QProcess* pr
|
|||
#endif
|
||||
}
|
||||
|
||||
process->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
if (isGame) {
|
||||
if (profile.useGamescope) {
|
||||
|
@ -270,6 +268,11 @@ void LauncherCore::launchExecutable(const ProfileSettings& profile, QProcess* pr
|
|||
env.insert("DYLD_FALLBACK_LIBRARY_PATH", xivLibPath);
|
||||
}
|
||||
|
||||
#if defined(FLATPAK)
|
||||
arguments.push_back("flatpak-spawn");
|
||||
arguments.push_back("--host");
|
||||
#endif
|
||||
|
||||
arguments.push_back(profile.winePath);
|
||||
#endif
|
||||
|
||||
|
@ -475,7 +478,8 @@ void LauncherCore::readWineInfo(ProfileSettings& profile) {
|
|||
profile.wineVersion = wineProcess->readAllStandardOutput().trimmed();
|
||||
});
|
||||
|
||||
wineProcess->start(profile.winePath, {"--version"});
|
||||
launchExecutable(profile, wineProcess, {"--version"}, false, false);
|
||||
|
||||
wineProcess->waitForFinished();
|
||||
#endif
|
||||
}
|
||||
|
@ -692,4 +696,4 @@ void LauncherCore::addRegistryKey(const ProfileSettings& settings,
|
|||
auto process = new QProcess(this);
|
||||
process->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
||||
launchExecutable(settings, process, {"reg", "add", key, "/v", value, "/d", data, "/f" }, false, false);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue